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.
%I A105321 #50 Aug 10 2025 18:23:00 %S A105321 1,3,4,6,6,6,8,12,10,6,8,12,12,12,16,24,18,6,8,12,12,12,16,24,20,12, %T A105321 16,24,24,24,32,48,34,6,8,12,12,12,16,24,20,12,16,24,24,24,32,48,36, %U A105321 12,16,24,24,24,32,48,40,24,32,48,48,48,64,96,66,6,8,12,12,12,16,24,20,12,16 %N A105321 Convolution of binomial(1,n) and Gould's sequence A001316. %C A105321 A universal function related to the spherical growth of repeated truncations of maps. %C A105321 a(n) = (number of ones in row n of triangle A249133) = (number of odd terms in row n of triangle A249095) = A000120(A249184(n)). - _Reinhard Zumkeller_, Nov 14 2014 %H A105321 Reinhard Zumkeller, <a href="/A105321/b105321.txt">Table of n, a(n) for n = 0..10000</a> %H A105321 David Applegate, Omar E. Pol and N. J. A. Sloane, <a href="/A000695/a000695_1.pdf">The Toothpick Sequence and Other Sequences from Cellular Automata</a>, Congressus Numerantium, Vol. 206 (2010), 157-191. [There is a typo in Theorem 6: (13) should read u(n) = 4.3^(wt(n-1)-1) for n >= 2.] %H A105321 T. Pisanski and T. W. Tucker, <a href="http://www.imfm.si/preprinti/PDF/00696.pdf">Growth in Repeated Truncations of Maps</a>, Preprint series, Univ. of Ljubljana, Vol. 38 (2000), 696. %H A105321 T. Pisanski and T. W. Tucker, <a href="http://www.imfm.si/preprinti/PDF/00696.pdf">Growth in Repeated Truncations of Maps</a>, Atti. Sem. Mat. Fis. Univ. Modena, Vol. 49 (2001), 167-176. %H A105321 N. J. A. Sloane, <a href="/wiki/Catalog_of_Toothpick_and_CA_Sequences_in_OEIS">Catalog of Toothpick and Cellular Automata Sequences in the OEIS</a> - _Omar E. Pol_, May 29 2010 %F A105321 G.f. (1+x)*Product{k>=0, 1+2x^(2^k)}; %F A105321 a(n) = Sum_{k=0..n, binomial(1, n-k)*Sum_{j=0..k, binomial(k, j) mod 2}}. %F A105321 a(n) = 2*A048460(n) for n>=2. - _Omar E. Pol_, Jan 02 2011 %F A105321 a((2*n-1)*2^p) = (2^p+2)*A001316(n-1), p >= 0 and n >= 1, with a(0) = 1. - _Johannes W. Meijer_, Jan 28 2013 %F A105321 a(n) = A001316(n) + A001316(n-1) for n > 0. - _Reinhard Zumkeller_, Nov 14 2014 %e A105321 From _Omar E. Pol_, May 29 2010: (Start) %e A105321 If written as a triangle: %e A105321 1; %e A105321 3; %e A105321 4; %e A105321 6,6; %e A105321 6,8,12,10; %e A105321 6,8,12,12,12,16,24,18; %e A105321 6,8,12,12,12,16,24,20,12,16,24,24,24,32,48,34; %e A105321 6,8,12,12,12,16,24,20,12,16,24,24,24,32,48,36,12,16,24,24,24,32,48,40,24,32,48,48,48,64,96,66; (End) %p A105321 nmax := 74: A001316 := n -> if n <= -1 then 0 else 2^add(i, i=convert(n, base, 2)) fi: for p from 0 to ceil(log[2](nmax)) do for n from 1 to nmax/(p+2)+1 do a((2*n-1)*2^p) := (2^p+2) * A001316(n-1) od: od: a(0) :=1: seq(a(n), n=0..nmax); # _Johannes W. Meijer_, Jan 28 2013 %t A105321 f[n_] := Sum[Binomial[1, n - k]Mod[Binomial[k, j], 2], {k, 0, n}, {j, 0, k}]; Array[f, 75, 0] (* _Robert G. Wilson v_, Jun 28 2010 *) %o A105321 (Haskell) %o A105321 a105321 n = if n == 0 then 1 else a001316 n + a001316 (n - 1) %o A105321 -- _Reinhard Zumkeller_, Nov 14 2014 %o A105321 (PARI) a(n) = sum(k=0, n, binomial(1, n-k)*sum(j=0, k, binomial(k, j) % 2)); \\ _Michel Marcus_, Apr 29 2018 %o A105321 (Python) %o A105321 def A105321(n): return (1<<n.bit_count())+(1<<(n-1).bit_count()) if n else 1 # _Chai Wah Wu_, Jul 30 2025 %o A105321 (Python) # (fast way for big vectors) %o A105321 import numpy # (version >= 2.0.0) %o A105321 n_up_to = 2**22 %o A105321 A000079 = 1 << numpy.arange(n_up_to.bit_length()) %o A105321 A001316 = A000079[(numpy.bitwise_count(numpy.arange(n_up_to)))] %o A105321 A105321 = A001316 %o A105321 A105321[1:] += A001316[0:-1] %o A105321 print(A105321[0:100]) # _Karl-Heinz Hofmann_, Aug 01 2025 %Y A105321 Cf. A139250, A139251, A173522, A048460. %Y A105321 Cf. A001316, A000120, A249184, A249095, A249133. %K A105321 easy,nonn %O A105321 0,2 %A A105321 _Paul Barry_, Apr 01 2005