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 A102662 #23 Aug 19 2025 08:37:31 %S A102662 1,1,3,1,5,3,1,7,11,3,1,9,23,17,3,1,11,39,51,23,3,1,13,59,113,91,29,3, %T A102662 1,15,83,211,255,143,35,3,1,17,111,353,579,489,207,41,3,1,19,143,547, %U A102662 1143,1323,839,283,47,3,1,21,179,801,2043,3045,2651,1329,371,53,3,1,23,219 %N A102662 Triangle read by rows: T(1,1)=1,T(2,1)=1,T(2,2)=3, T(k-1,r-1)+T(k-1,r)+T(k-2,r-1). %C A102662 Generalization of A008288 (use initial terms 1,1,3). Triangle seen as lower triangular matrix: The absolute values of the coefficients of the characteristic polynomials of the n X n matrix are the (n+1)th row of A038763. Row sums give A048654. %D A102662 Boris A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8. %H A102662 Reinhard Zumkeller, <a href="/A102662/b102662.txt">Rows n=0..149 of triangle, flattened</a> %H A102662 Boris A. Bondarenko, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/pascal.html">Generalized Pascal Triangles and Pyramids</a>, English translation published by Fibonacci Association, Santa Clara Univ., Santa Clara, CA, 1993; see p. 37. %F A102662 From _Clark Kimberling_, Feb 20 2012: (Start) %F A102662 A102662=v and A207624=u, defined together as follows: %F A102662 u(n,x)=u(n-1,x)+v(n-1,x), v(n,x)=2*x*u(n-1,x)+x*v(n-1,x)+1, %F A102662 where u(1,x)=1, v(1,x)=1; see the Mathematica section. (End) %e A102662 Triangle begins: %e A102662 1 %e A102662 1 3 %e A102662 1 5 3 %e A102662 1 7 11 3 %e A102662 1 9 23 17 3 %t A102662 u[1, x_] := 1; v[1, x_] := 1; z = 16; %t A102662 u[n_, x_] := u[n - 1, x] + v[n - 1, x] %t A102662 v[n_, x_] := 2 x*u[n - 1, x] + x*v[n - 1, x] + 1 %t A102662 Table[Factor[u[n, x]], {n, 1, z}] %t A102662 Table[Factor[v[n, x]], {n, 1, z}] %t A102662 cu = Table[CoefficientList[u[n, x], x], {n, 1, z}]; %t A102662 TableForm[cu] %t A102662 Flatten[%] (* A207624 *) %t A102662 Table[Expand[v[n, x]], {n, 1, z}] %t A102662 cv = Table[CoefficientList[v[n, x], x], {n, 1, z}]; %t A102662 TableForm[cv] %t A102662 Flatten[%] (* A102662 *) %t A102662 (* _Clark Kimberling_, Feb 20 2012 *) %o A102662 (PARI) T(k,r)=if(r>k,0,if(k==1,1,if(k==2,if(r==1,1,3),if(r==1,1,if(r==k,3,T(k-1,r-1)+T(k-1,r)+T(k-2,r-1)))))) %o A102662 BM(n) = M=matrix(n,n);for(i=1,n, for(j=1,n,M[i,j]=T(i,j)));M %o A102662 M=BM(10) %o A102662 for(i=1,10,s=0;for(j=1,i,s+=M[i,j]);print1(s,",")) %o A102662 (Haskell) %o A102662 a102662 n k = a102662_tabl !! n !! k %o A102662 a102662_row n = a102662_tabl !! n %o A102662 a102662_tabl = [1] : [1,3] : f [1] [1,3] where %o A102662 f xs ys = zs : f ys zs where %o A102662 zs = zipWith (+) ([0] ++ xs ++ [0]) $ %o A102662 zipWith (+) ([0] ++ ys) (ys ++ [0]) %o A102662 -- _Reinhard Zumkeller_, Feb 23 2012 %Y A102662 Cf. A038763, A048654, A008288. %K A102662 nonn,tabl,changed %O A102662 1,3 %A A102662 Lambert Klasen (lambert.klasen(AT)gmx.net) and _Gary W. Adamson_, Feb 03 2005