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

This page as a plain text file.
%I A297212 #32 Jun 18 2025 06:10:56
%S A297212 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,
%T A297212 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,
%U A297212 5,6,6,6,5,6,6,6,6,6,6,5,5,6,6,6,6,6,6,5,6,6
%N A297212 a(0)=1; a(1)=1; for n >= 2, a(n) = a(A023416(n)) + a(A000120(n)).
%H A297212 Michael De Vlieger, <a href="/A297212/b297212.txt">Table of n, a(n) for n = 0..10000</a>
%H A297212 B. Balamohan, A. Kuznetsov and S. Tanny, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL10/Tanny/tanny3.html">On the behavior of a variant of Hofstadter's Q-sequence</a>, J. Integer Sequences, Vol. 10 (2007), #07.7.1.
%H A297212 Nathaniel D. Emerson, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL9/Emerson/emerson6.html">A Family of Meta-Fibonacci Sequences Defined by Variable-Order Recursions</a>, J. Integer Sequences, Vol. 9 (2006), #06.1.8.
%e A297212 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.
%t A297212 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 *)
%o A297212 (PARI) a(n) = if (n<=1, 1, a(hammingweight(n)) + a(#binary(n)-hammingweight(n)));
%Y A297212 Cf. A000120, A023416.
%K A297212 nonn,base
%O A297212 0,3
%A A297212 _Ctibor O. Zizka_, Dec 27 2017
%E A297212 More terms from _Michel Marcus_, Mar 16 2022