login
A238392
Triangle read by rows: each row is an initial segment of the terms of A000123 followed by its reflection.
1
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, 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, 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
OFFSET
0,5
COMMENTS
Triangle read by rows: each row is an initial segment of the terms of A000123 followed by its reflection.
LINKS
Indranil Ghosh, Rows 0..125, flattened
FORMULA
T(n,k) = A000123(min(k,n-k)).
Sum_{k=0..n} T(n,k) = A000123(n).
T(2*n,n) = A000123(n).
EXAMPLE
Triangle begins:
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, 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, 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;
1, 2, 4, 6, 10, 14, 20, 20, 14, 10, 6, 4, 2, 1;
MATHEMATICA
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 *)
PROG
(PARI) a(n) = if(n==0, 1, a(n-1) + a(floor(n/2)));
tabl(nn) = {for(n=0, nn, for(k=0, n, print1(a(min(k, n - k)), ", "); ); print(); ); };
tabl(13); \\ Indranil Ghosh, Mar 14 2017
(Python)
def a(n): return 1 if n==0 else a(n - 1) + a(n/2)
i=0
for n in range(0, 126):
....for k in range(0, n+1):
........print str(i)+" "+str(a(min(k, n - k)))
........i+=1 # Indranil Ghosh, Mar 14 2017
CROSSREFS
Sequence in context: A320748 A320747 A348690 * A144464 A138015 A327742
KEYWORD
easy,nonn,tabl
AUTHOR
Philippe Deléham, Feb 26 2014
STATUS
approved