login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A326816 a(0) = 0, a(1) = 1, and for n > 1, a(n) = Sum_{k = 0..n} a((n-k) AND k) (where AND denotes the bitwise AND operator). 1
0, 1, 1, 0, 3, 2, 2, 0, 9, 10, 10, 12, 12, 8, 4, 0, 27, 38, 46, 60, 66, 68, 72, 72, 90, 84, 76, 72, 44, 24, 8, 0, 81, 130, 182, 228, 302, 332, 384, 360, 526, 572, 636, 600, 624, 576, 568, 432, 764, 888, 996, 1008, 972, 936, 888, 864, 712, 560, 408, 320, 144 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
This sequence combines features of A006581 and of A007461.
LINKS
FORMULA
a(n) is odd iff n is a power of 2.
a(n) = 0 iff n = 2^k with k = 0 or k = 2.
a(2^k) = 3^(k-1) for any k > 0.
a(2^k+1) = A056182(k-1) for any k > 1.
EXAMPLE
a(2) = a(2 AND 0) + a(1 AND 1) + a(0 AND 2) = a(0) + a(1) + a(0) = 1.
MAPLE
a:= proc(n) option remember; `if`(n<2, n,
add(a(Bits[And](n-k, k)), k=0..n))
end:
seq(a(n), n=0..80); # Alois P. Heinz, Oct 20 2019
PROG
(PARI) a = vector(61); for (n=0, #a-1, print1 (a[1+n] = if (n==0, 0, n==1, 1, sum (k=0, n, a[1+bitand(n-k, k)])) ", "))
CROSSREFS
Sequence in context: A326152 A308181 A361862 * A323557 A155917 A291770
KEYWORD
nonn,look,base
AUTHOR
Rémy Sigrist, Oct 20 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 16 14:46 EDT 2024. Contains 375976 sequences. (Running on oeis4.)