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.

A323355 a(1)=1; for n >= 2, a(n) = Sum_{i=1..A000120(n)} a(z(i)), where z(i) are the positions of 1's in the binary expansion of n, counted from left to right.

This page as a plain text file.
%I A323355 #20 Jul 24 2023 02:35:31
%S A323355 1,1,2,1,3,2,4,1,2,3,4,2,3,4,5,1,4,2,5,3,6,4,7,2,5,3,6,4,7,5,8,1,3,4,
%T A323355 6,2,4,5,7,3,5,6,8,4,6,7,9,2,4,5,7,3,5,6,8,4,6,7,9,5,7,8,10,1,5,3,7,4,
%U A323355 8,6,10,2,6,4,8,5,9,7,11,3,7,5,9,6,10,8,12,4,8,6,10,7,11,9,13,2,6,4
%N A323355 a(1)=1; for n >= 2, a(n) = Sum_{i=1..A000120(n)} a(z(i)), where z(i) are the positions of 1's in the binary expansion of n, counted from left to right.
%H A323355 Amiram Eldar, <a href="/A323355/b323355.txt">Table of n, a(n) for n = 1..10000</a>
%e A323355 n=13, decimal 13 is 1101 in binary, the 1's are at positions 1,2,4. So a(13) = a(1) + a(2) + a(4).
%t A323355 a[1] = 1; a[n_] := a[n] = Total[a /@ (Position[IntegerDigits[n, 2], 1] // Flatten)]; Array[a, 100] (* _Amiram Eldar_, Jul 24 2023 *)
%o A323355 (PARI) lista(nn) = {my(va = vector(nn), vb); va[1] = 1; for (n=2, nn, vb = binary(n); va[n] = sum(k=1, #vb, vb[k]*va[k]);); va;} \\ _Michel Marcus_, Jan 12 2019
%Y A323355 Cf. A007088, A000120.
%K A323355 base,nonn
%O A323355 1,3
%A A323355 _Ctibor O. Zizka_, Jan 12 2019