|
|
A268384
|
|
Characteristic function of A001317.
|
|
5
|
|
|
0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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, 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, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
a(0) = 0, a(1) = 1, and for n > 1, a(n) = 0 if A006068(n) is odd, otherwise a(A006068(n)/2).
|
|
PROG
|
(Scheme, two variants)
(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
|
|
|
STATUS
|
approved
|
|
|
|