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.

A238392 Triangle read by rows: each row is an initial segment of the terms of A000123 followed by its reflection.

This page as a plain text file.
%I A238392 #17 May 23 2025 23:46:19
%S A238392 1,1,1,1,2,1,1,2,2,1,1,2,4,2,1,1,2,4,4,2,1,1,2,4,6,4,2,1,1,2,4,6,6,4,
%T A238392 2,1,1,2,4,6,10,6,4,2,1,1,2,4,6,10,10,6,4,2,1,1,2,4,6,10,14,10,6,4,2,
%U A238392 1,1,2,4,6,10,14,14,10,6,4,2,1,1,2,4,6,10,14,20,14,10,6,4,2,1
%N A238392 Triangle read by rows: each row is an initial segment of the terms of A000123 followed by its reflection.
%C A238392 Triangle read by rows: each row is an initial segment of the terms of A000123 followed by its reflection.
%H A238392 Indranil Ghosh, <a href="/A238392/b238392.txt">Rows 0..125, flattened</a>
%F A238392 T(n,k) = A000123(min(k,n-k)).
%F A238392 Sum_{k=0..n} T(n,k) = A000123(n).
%F A238392 T(2*n,n) = A000123(n).
%e A238392 Triangle begins:
%e A238392   1;
%e A238392   1, 1;
%e A238392   1, 2, 1;
%e A238392   1, 2, 2, 1;
%e A238392   1, 2, 4, 2,  1;
%e A238392   1, 2, 4, 4,  2,  1;
%e A238392   1, 2, 4, 6,  4,  2,  1;
%e A238392   1, 2, 4, 6,  6,  4,  2,  1;
%e A238392   1, 2, 4, 6, 10,  6,  4,  2,  1;
%e A238392   1, 2, 4, 6, 10, 10,  6,  4,  2,  1;
%e A238392   1, 2, 4, 6, 10, 14, 10,  6,  4,  2, 1;
%e A238392   1, 2, 4, 6, 10, 14, 14, 10,  6,  4, 2, 1;
%e A238392   1, 2, 4, 6, 10, 14, 20, 14, 10,  6, 4, 2, 1;
%e A238392   1, 2, 4, 6, 10, 14, 20, 20, 14, 10, 6, 4, 2, 1;
%t A238392 a[n_] := If[n==0,  1, a[n - 1] + a[Floor[n/2]]]; Flatten[Table[a[Min[k, n - k]], {n, 0, 13}, {k, 0, n}]] (* _Indranil Ghosh_, Mar 14 2017 *)
%o A238392 (PARI) a(n) = if(n==0, 1, a(n-1) + a(floor(n/2)));
%o A238392 tabl(nn) = {for(n=0, nn, for(k=0, n, print1(a(min(k, n - k)),", ");); print(););};
%o A238392 tabl(13); \\ _Indranil Ghosh_, Mar 14 2017
%o A238392 (Python)
%o A238392 def a(n): return 1 if n==0 else a(n - 1) + a(n//2)
%o A238392 i=0
%o A238392 for n in range(0, 126):
%o A238392     for k in range(0, n+1):
%o A238392         print(str(i)+" "+str(a(min(k, n - k))))
%o A238392         i+=1 # _Indranil Ghosh_, Mar 14 2017
%Y A238392 Cf. A000123, A004197.
%K A238392 easy,nonn,tabl
%O A238392 0,5
%A A238392 _Philippe Deléham_, Feb 26 2014