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 A154325 #26 Jul 17 2025 00:48:57 %S A154325 1,1,1,1,2,1,1,2,2,1,1,2,2,2,1,1,2,2,2,2,1,1,2,2,2,2,2,1,1,2,2,2,2,2, %T A154325 2,1,1,2,2,2,2,2,2,2,1,1,2,2,2,2,2,2,2,2,1,1,2,2,2,2,2,2,2,2,2,1,1,2, %U A154325 2,2,2,2,2,2,2,2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,1 %N A154325 Triangle with interior all 2's and borders 1. %C A154325 This triangle follows a general construction method as follows: Let a(n) be an integer sequence with a(0)=1, a(1)=1. Then T(n,k,r):=[k<=n](1+r*a(k)*a(n-k)) defines a symmetrical triangle. %C A154325 Row sums are n + 1 + r*Sum_{k=0..n} a(k)*a(n-k) and central coefficients are 1+r*a(n)^2. %C A154325 Here a(n)=1-0^n and r=1. Row sums are A004277. %C A154325 Eigensequence of the triangle = A000129, the Pell sequence. - _Gary W. Adamson_, Feb 12 2009 %C A154325 Inverse has general element T(n,k)*(-1)^(n-k). - _Paul Barry_, Oct 06 2010 %F A154325 Number triangle T(n,k) = [k<=n](2-0^(n-k)-0^k+0^(n+k)) = [k<=n](2-0^(k*(n-k))). %F A154325 a(n) = 2 - A103451(n). - _Omar E. Pol_, Jan 18 2009 %e A154325 Triangle begins %e A154325 1; %e A154325 1, 1; %e A154325 1, 2, 1; %e A154325 1, 2, 2, 1; %e A154325 1, 2, 2, 2, 1; %e A154325 1, 2, 2, 2, 2, 1; %e A154325 1, 2, 2, 2, 2, 2, 1; %e A154325 From _Paul Barry_, Oct 06 2010: (Start) %e A154325 Production matrix is %e A154325 1, 1; %e A154325 0, 1, 1; %e A154325 0, -1, 0, 1; %e A154325 0, 1, 0, 0, 1; %e A154325 0, -1, 0, 0, 0, 1; %e A154325 0, 1, 0, 0, 0, 0, 1; %e A154325 0, -1, 0, 0, 0, 0, 0, 1; %e A154325 0, 1, 0, 0, 0, 0, 0, 0, 1; (End) %t A154325 a[n_] := %t A154325 If[Length@ %t A154325 NestWhileList[# - %t A154325 Floor[(Sqrt[8 # + 1] - 1)/2] (Floor[(Sqrt[8 # + 1] - 1)/2] + 1)/ %t A154325 2 &, n, # > 1 &] <= 2, 1, 2] (* _David Naccache_, Jul 13 2025 *) %o A154325 (PARI) row(n) = vector(n+1, k, k--; (2-0^(k*(n-k)))); \\ _Michel Marcus_, Jul 13 2025 %Y A154325 Cf. A000129, A103451, A129765. %K A154325 easy,nonn,tabl %O A154325 0,5 %A A154325 _Paul Barry_, Jan 07 2009 %E A154325 More terms from _Michel Marcus_, Jul 13 2025