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.

A297212 a(0)=1; a(1)=1; for n >= 2, a(n) = a(A023416(n)) + a(A000120(n)).

Original entry on oeis.org

1, 1, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 4, 5, 4, 4, 4, 4, 5, 5, 6, 5, 6, 6, 5, 5, 6, 6, 5, 6, 5, 5, 4, 5, 6, 6, 5, 6, 5, 5, 4, 6, 5, 5, 4, 5, 4, 4, 4, 4, 5, 5, 6, 5, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 5, 5, 6, 6, 6, 6, 6, 6, 5, 6, 6
Offset: 0

Views

Author

Ctibor O. Zizka, Dec 27 2017

Keywords

Examples

			n=7, A000120(7)=3, A023416(7)=0. a(7)=a(3)+a(0), a(3)=a(2)+a(0), a(2)=a(1)+a(1). So a(7) = a(1)+a(1)+a(0)+a(0) = 2*a(0) + 2*a(1) = 4.
		

Crossrefs

Programs

  • Mathematica
    a[0] = a[1] = 1; a[n_] := a[n] = a[#1] + a[#2] & @@ DigitCount[n, 2]; Array[a, 90, 0] (* Michael De Vlieger, Mar 16 2022 *)
  • PARI
    a(n) = if (n<=1, 1, a(hammingweight(n)) + a(#binary(n)-hammingweight(n)));

Extensions

More terms from Michel Marcus, Mar 16 2022