login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A341509
a(n) = 2^j if n is of the form 2^i - 2^j with i > j, and 0 otherwise.
3
0, 1, 2, 1, 4, 0, 2, 1, 8, 0, 0, 0, 4, 0, 2, 1, 16, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 4, 0, 2, 1, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 4, 0, 2, 1, 64, 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, 32, 0, 0, 0, 0, 0, 0, 0, 0
OFFSET
0,3
FORMULA
a(0) = 0, and for n >= 1, a(n) = A340375(n) * A006519(n).
a(n) = A156552(A014963(A005940(1+n))).
PROG
(PARI)
A006519(n) = (1<<valuation(n, 2));
A340375(n) = if(n<5, 1, n>>=valuation(n, 2); n++; n>>valuation(n, 2)==1); \\ After function "is" given in A023758
A341509(n) = if(!n, n, A340375(n)*A006519(n));
CROSSREFS
Cf. A023758 (after its initial zero, gives the positions nonzero terms).
Sequence in context: A137629 A220504 A087569 * A048614 A001442 A226952
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 13 2021
STATUS
approved