login
A147612
If n is a Jacobsthal number then 1 else 0.
12
1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
OFFSET
0,1
COMMENTS
a(A001045(n)) = 1; a(A147613(n)) = 0.
FORMULA
a(n) = 0^(j(n,1)*j(n,-1)) with j(n,i) = if n mod 2 = 0 then n else j((n+i)/2,-i).
a(n) = A105348(n), for n <> 1. - R. J. Mathar, Nov 19 2008
For n > 0, a(n) = A000035(A281228(A265746(n))), where A000035(A281228(n)) is the characteristic function of powers of 3 (A000244). - Antti Karttunen, Oct 09 2017
MATHEMATICA
With[{s = LinearRecurrence[{1, 2}, {0, 1}, 24]}, Array[If[FreeQ[s, #], 0, 1] &, 105, 0]] (* Michael De Vlieger, Oct 09 2017 *)
PROG
(PARI)
A147612aux(n, i) = if(!(n%2), n, A147612aux((n+i)/2, -i));
A147612(n) = 0^(A147612aux(n, 1)*A147612aux(n, -1)); \\ Antti Karttunen, Oct 09 2017
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Nov 08 2008
STATUS
approved