A104732 Square array T[i,j]=T[i-1,j]+T[i-1,j-1], T[1,j]=j, T[i,1]=1, read by antidiagonals.
1, 2, 1, 3, 3, 1, 4, 5, 4, 1, 5, 7, 8, 5, 1, 6, 9, 12, 12, 6, 1, 7, 11, 16, 20, 17, 7, 1, 8, 13, 20, 28, 32, 23, 8, 1, 9, 15, 24, 36, 48, 49, 30, 9, 1, 10, 17, 28, 44, 64, 80, 72, 38, 10, 1, 11, 19, 32, 52, 80, 112, 129, 102, 47, 11, 1, 12, 21, 36, 60, 96, 144, 192, 201, 140, 57, 12, 1
Offset: 1
Examples
The first few rows of the triangle (= rising diagonals of the square array) are: 1; 2, 1; 3, 3, 1; 4, 5, 4, 1; 5, 7, 8, 5, 1; 6, 9, 12, 12, 6, 1; ...
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
Maple
A104732 := proc(i,j) coeftayl(coeftayl(x*y/(1-x)^2/(1-y*(1+x)),y=0,i),x=0,j) ; end: for d from 1 to 20 do for j from d to 1 by -1 do printf("%d,",A104732(d-j+1,j)) ; od: od: # R. J. Mathar, May 04 2008
-
Mathematica
nn = 10; Map[Select[#, # > 0 &] &,Drop[CoefficientList[ Series[y x/(1 - x - y x + y x^3)/(1 - x), {x, 0, nn}], {x, y}], 1]] // Grid (* Geoffrey Critzer, Mar 17 2015 *)
-
Python
def A104732_rows(n): """Produces n rows of A104732 triangle""" from operator import iadd a,b,c = [], [1], [1] for i in range(2,n+1): a,b = b, [i]+list(map(iadd,a,b[:-1]))+[1] c+=b return c # Alec Mihailovs (alec(AT)mihailovs.com), May 04 2008
Formula
The triangle is extracted from A * B; where A = [1; 2, 1; 3, 2, 1;...], B = [1; 0, 1; 0, 1, 1; 0, 0, 2, 1;...]; both infinite lower triangular matrices with the rest of the terms zeros. The sequence in "B" (1, 0, 1, 0, 1, 1, 0, 0, 2, 1...) = A026729.
As a square array, g.f. Sum T[i,j] x^j y^i = xy/((1-(1+x)y)*(1-x)^2). - Alec Mihailovs (alec(AT)mihailovs.com), Apr 26 2008
Extensions
Edited by M. F. Hasler, Apr 26 2008
More terms from R. J. Mathar and Alec Mihailovs (alec(AT)mihailovs.com), May 04 2008
Comments