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 A367076 #39 Oct 18 2024 14:53:15 %S A367076 0,1,0,3,4,3,0,6,10,12,12,12,10,6,0,10,18,24,28,32,34,34,32,34,34,32, %T A367076 28,24,18,10,0,15,28,39,48,57,64,69,72,79,84,87,88,89,88,85,80,85,88, %U A367076 89,88,87,84,79,72,69,64,57,48,39,28,15,0,21,40,57,72,87 %N A367076 Irregular triangle read by rows: T(n,k) (0 <= n, 0 <= k < 2^n). T(n,k) = -Sum_{i=0..k} A365968(n,i). %H A367076 John Tyler Rascoe, <a href="/A367076/b367076.txt">Rows n = 0..12, flattened</a> %H A367076 Wikipedia, <a href="https://en.wikipedia.org/wiki/Blancmange_curve">Blancmange curve</a>. %H A367076 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %F A367076 T(n,k) = Sum_{i=0..n} abs(k + 1 - (2^i) * round((k+1)/2^i)) * i. %F A367076 G.f. for n-th row: 1/(1-x) * Sum_{i=1..n} (i/(1+x^2^(i-1)) * Product_{j=0..i-2} 1 + x^2^j). %e A367076 Triangle begins: %e A367076 k=0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 %e A367076 n=0: 0; %e A367076 n=1: 1, 0; %e A367076 n=2: 3, 4, 3, 0; %e A367076 n=3: 6, 10, 12, 12, 12, 10, 6, 0; %e A367076 n=4; 10, 18, 24, 28, 32, 34, 34, 32, 34, 34, 32, 28, 24, 18, 10, 0; %t A367076 nmax=10; row[n_]:=Join[CoefficientList[Series[1/(1-x)*Sum[ i/(1+x^2^(i-1))*Product[1+x^2^j,{j,0,i-2}],{i,n}],{x,0,2^n-1}],x],{0}]; Array[row,6,0] (* _Stefano Spezia_, Dec 23 2023 *) %o A367076 (Python) %o A367076 def row_gen(n): %o A367076 x = 0 %o A367076 for k in range(2**n): %o A367076 b = bin(k)[2:].zfill(n) %o A367076 x += sum((-1)**(int(b[n-i])+1)*i for i in range(1,n+1)) %o A367076 yield(-x) %o A367076 def A367076_row_n(n): return(list(row_gen(n))) %Y A367076 Cf. A000217 (column k=0), A028552 (column k=1), A192021 (row sums). %Y A367076 Cf. A004074, A249071, A274575, A277914, A296062, A365968. %K A367076 nonn,easy,look,tabf %O A367076 0,4 %A A367076 _John Tyler Rascoe_, Nov 05 2023