OFFSET
0
COMMENTS
a(k) = 1 iff k is in A001317, and 0 for all other values.
The recursive formula is based on the fact that only from the terms of A001317 we can reach all the way down to 1 when repeatedly applying the map k -> A006068(k)/2 as long as it is possible to iterate (before A006068(k) is odd).
This sequence is not multiplicative. The smallest counterexample is for n = A000215(6) = 4294967297 which is the first composite Fermat number. In this case a(n) = 1 which is not the product of a(641) and a(6700417) which are both zero. - Andrew Howroyd, Aug 08 2018
LINKS
FORMULA
PROG
(Scheme, two variants)
(definec (A268384 n) (cond ((<= n 1) n) ((odd? (A006068 n)) 0) (else (A268384 (/ (A006068 n) 2))))) ;; Uses the memoization-macro definec
(Python)
from itertools import count, islice
def A268384_gen(): # generator of terms
a = -1
for n in count(0):
b = int(''.join(str(int(not(~n&k))) for k in range(n+1)), 2)
yield from (0, )*(b-a-1)
yield 1
a = b
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 10 2016
STATUS
approved