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.

A158786 Irregular triangle T(n, k) = A000032(n-2*k+1) if (n-2*k) mod 2 = 0, otherwise 25*A000032(n-2*k), read by rows.

Original entry on oeis.org

1, 25, 4, 1, 100, 25, 11, 4, 1, 275, 100, 25, 29, 11, 4, 1, 725, 275, 100, 25, 76, 29, 11, 4, 1, 1900, 725, 275, 100, 25, 199, 76, 29, 11, 4, 1, 4975, 1900, 725, 275, 100, 25, 521, 199, 76, 29, 11, 4, 1, 13025, 4975, 1900, 725, 275, 100, 25, 1364, 521, 199, 76, 29, 11, 4, 1, 34100, 13025, 4975, 1900, 725, 275, 100, 25
Offset: 2

Views

Author

Roger L. Bagula and Gary W. Adamson, Mar 26 2009

Keywords

Examples

			Irregular triangle begins as:
     1;
    25;
     4,    1;
   100,   25;
    11,    4,   1;
   275,  100,  25;
    29,   11,   4,   1;
   725,  275, 100,  25;
    76,   29,  11,   4,  1;
  1900,  725, 275, 100, 25;
   199,   76,  29,  11,  4,   1;
  4975, 1900, 725, 275, 100, 25;
		

References

  • H. S. M. Coxeter, Regular Polytopes, 3rd ed., Dover, NY, 1973, pp. 159-162.

Crossrefs

Programs

  • Mathematica
    (* First program *)
    e[n_, 0]:= Sqrt[5]*(GoldenRatio^(n) + GoldenRatio^(-n));
    e[n_, k_]:= If[k>n-1, 0, (e[n-1, k]*e[n, k-1] +1)/e[n-1, k-1]];
    T[n_,k_]:= 5*Rationalize[N[e[n, k]]];
    Table[T[n, k], {n, 2, 16}, {k, Mod[n, 2] +1, n-1,2}]//Flatten
    (* Second program *)
    f[n_]:= f[n]= If[EvenQ[n], LucasL[n-1], 25*LucasL[n-2]];
    T[n_, k_]:= f[n-2*k];
    Table[T[n, k], {n, 2, 16}, {k, 0, (n-2)/2}]//Flatten (* G. C. Greubel, Dec 06 2021 *)
  • Sage
    def A158786(n,k): return lucas_number2(n-2*k-1,1,-1) if ((n-2*k)%2==0) else 25*lucas_number2(n-2*k-2,1,-1)
    flatten([[A158786(n,k) for k in (0..((n-2)//2))] for n in (2..16)]) # G. C. Greubel, Dec 06 2021

Formula

T(n, k) = 5*e(n, k), where e(n,k) = (e(n-1, k)*e(n, k-1) + 1)/e(n-1, k-1), and e(n, 0) = sqrt(5)*(GoldenRatio^(n) + GoldenRatio^(-n)).
From G. C. Greubel, Dec 06 2021: (Start)
T(n, k) = A000032(n-2*k+1) if (n-2*k) mod 2 = 0, otherwise 25*A000032(n-2*k).
Sum_{k=0..floor(n/2)} T(n, k) = A000032(n) - 2 if (n mod 2 = 0), otherwise 25*(A000032(n-1) - 2). (End)

Extensions

Edited by G. C. Greubel, Dec 06 2021