cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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).

This page as a plain text file.
%I A326816 #15 Oct 20 2019 15:11:22
%S A326816 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,
%T A326816 72,44,24,8,0,81,130,182,228,302,332,384,360,526,572,636,600,624,576,
%U A326816 568,432,764,888,996,1008,972,936,888,864,712,560,408,320,144
%N 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).
%C A326816 This sequence combines features of A006581 and of A007461.
%H A326816 Rémy Sigrist, <a href="/A326816/b326816.txt">Table of n, a(n) for n = 0..8191</a>
%F A326816 a(n) is odd iff n is a power of 2.
%F A326816 a(n) = 0 iff n = 2^k with k = 0 or k = 2.
%F A326816 a(2^k) = 3^(k-1) for any k > 0.
%F A326816 a(2^k+1) = A056182(k-1) for any k > 1.
%e A326816 a(2) = a(2 AND 0) + a(1 AND 1) + a(0 AND 2) = a(0) + a(1) + a(0) = 1.
%p A326816 a:= proc(n) option remember; `if`(n<2, n,
%p A326816       add(a(Bits[And](n-k, k)), k=0..n))
%p A326816     end:
%p A326816 seq(a(n), n=0..80);  # _Alois P. Heinz_, Oct 20 2019
%o A326816 (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)])) ", "))
%Y A326816 Cf. A006581, A007461, A056182.
%K A326816 nonn,look,base
%O A326816 0,5
%A A326816 _Rémy Sigrist_, Oct 20 2019