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 A359250 #23 Dec 19 2024 11:46:19 %S A359250 1,1,1,1,1,1,2,1,1,1,1,1,1,1,3,1,2,1,2,2,1,1,1,2,2,1,1,1,1,1,1,1,1,1, %T A359250 4,1,3,1,3,3,1,2,1,3,4,1,2,2,1,2,2,2,1,1,1,3,3,1,2,2,1,2,3,2,1,1,1,1, %U A359250 2,2,2,1,1,1,1,1,1,1,1,1,1,1,5,1,4,1,4,4 %N A359250 Irregular triangle read by rows where T(n,k) is the coefficient of y^k in polynomial P(n) defined by P(2n) = P(n) and P(2n+1) = y*P(n) + P(n+1) starting P(0) = 0, P(1) = 1. %C A359250 Row n length is wt(n) = A000120(n), the binary weight of n, so that k ranges 0 <= k < wt(n). %C A359250 Evaluated at y=1, the recurrence for P is per Stern's diatomic sequence so that row n has sum A002487(n). %C A359250 Evaluated at y=2, the recurrence for P is per A116528 so that Sum T(n,k)*2^k = A116528(n), and similarly variations such as y=10 for A178243. %C A359250 Array A178239(r,n) is P(n) evaluated at y=r, and in particular P(n) is the polynomial for the values in column n there. %C A359250 Column k=1, when that value exists, is T(n,1) = A080791(n-1), the number of 0 bits in n-1, since expressing the recurrence in Q(m) = P(m+1) adds y*Q(m-1) at each 0 bit in m. %C A359250 Reversing the bits of n is no change to P(n), so that P(n) = P(A030101(n)). %H A359250 Kevin Ryde, <a href="/A359250/b359250.txt">Table of n, a(n) for rows 0..2048, flattened</a> %H A359250 Kevin Ryde, <a href="/A359250/a359250.gp.txt">PARI/GP Code and Notes</a> %H A359250 Thomas Scheuerle, <a href="/A359250/a359250.png">Scatter plot a(n) for n = 1 to 114689</a>. This is in T(n,k) the range of n = 1 to 2^14. It looks a bit like narrow and tall fir trees like you could see in the Schwarzwald region. %F A359250 G.f.: Sum_{n>=0} P(n)*x^n = x * Product_{e>=0} 1 + x^(2^e) + y*x^(2^(e+1)). %e A359250 Triangle begins: %e A359250 k=0 1 2 %e A359250 n=0: (empty) %e A359250 n=1: 1, %e A359250 n=2: 1, %e A359250 n=3: 1, 1, %e A359250 n=4: 1, %e A359250 n=5: 1, 2, %e A359250 n=6: 1, 1, %e A359250 n=7: 1, 1, 1, %e A359250 n=8: 1, %e A359250 n=9: 1, 3, %o A359250 (MATLAB) %o A359250 function a = A359250( max_n ) %o A359250 ac = cell(1,1); ac{1} = [1]; %o A359250 for n = 2:max_n %o A359250 m = floor(n/2); %o A359250 if 2*m == n %o A359250 ac{n} = ac{m}; %o A359250 else %o A359250 ac{n} = [ac{m+1} zeros(1,(length(ac{m})+1)-length(ac{m+1}))] ... %o A359250 + [0 ac{m}]; %o A359250 end %o A359250 end %o A359250 a = cell2mat(ac); %o A359250 end % _Thomas Scheuerle_, Dec 28 2022 %o A359250 (PARI) \\ See links. %Y A359250 Cf. A000120 (row lengths), A002487 (row sums). %Y A359250 Cf. A178239 (array), A030101 (bit reversal). %Y A359250 Evaluated at y=2..10: A116528, A342633, A342634, A342635, A342603, A342636, A342637, A342638, A178243. %Y A359250 Cf. A125184. %K A359250 nonn,tabf,look,easy %O A359250 0,7 %A A359250 _Kevin Ryde_, Dec 28 2022