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.

A107449 Irregular triangle T(n, k) = 10 - ( (b(n) + k^2 + k + 1) mod 10 ), where b(n) = A056486(n-1) - (1/2)*[n=1], for n >= 1 and 1 <= k <= b(n) - 1, read by rows.

Original entry on oeis.org

5, 3, 9, 3, 7, 3, 7, 9, 9, 7, 3, 7, 9, 1, 7, 1, 3, 3, 1, 7, 1, 3, 3, 1, 7, 1, 3, 3, 7, 3, 7, 9, 9, 7, 3, 7, 9, 9, 7, 3, 7, 9, 9, 7, 3, 7, 9, 9, 7, 3, 7, 9, 9, 7, 3, 7, 9, 9, 7, 3, 7, 9, 9, 7, 3, 7, 9, 3, 9, 3, 5, 5, 3, 9, 3, 5, 5, 3, 9, 3, 5, 5, 3, 9, 3, 5, 5, 3, 9, 3, 5, 5, 3, 9, 3, 5, 5, 3, 9, 3, 5, 5, 3, 9, 3
Offset: 1

Views

Author

Roger L. Bagula, May 26 2005

Keywords

Examples

			The irregular triangle begins as:
  5;
  3, 9, 3;
  7, 3, 7, 9, 9, 7, 3, 7, 9;
  1, 7, 1, 3, 3, 1, 7, 1, 3, 3, 1, 7, 1, 3, 3;
		

Crossrefs

Programs

  • Magma
    b:= func< n | n eq 1 select 2 else 2^(n-3)*(9-(-1)^n) >;
    A107448:= func< n, k | 10 - ((b(n) +k^2 +k +1) mod 10) >;
    [5,3,9,3] cat [A107448(n, k): k in [1..b(n)-1], n in [3..8]]; // G. C. Greubel, Mar 24 2024
    
  • Mathematica
    b[n_]:= 2^(n-3)*(9-(-1)^n) -Boole[n==1]/2;
    T[n_, k_]:= 10  -Mod[k^2+k+1+b[n], 10];
    Table[T[n, k], {n,8}, {k,b[n]-1}]//Flatten (* G. C. Greubel, Mar 24 2024 *)
  • SageMath
    def b(n): return 2^(n-3)*(9-(-1)^n) - int(n==1)/2
    def A107449(n, k): return 10 - ((b(n) + k^2+k+1)%10);
    flatten([[A107449(n, k) for k in range(1, b(n))] for n in range(1, 8)]) # G. C. Greubel, Mar 24 2024

Formula

T(n, k) = 10 - (b(n) + k^2 + k + 1) mod 10, where b(n) = A056486(n-1) - (1/2)*[n=1], for n >= 1 and 1 <= k <= b(n) - 1. - G. C. Greubel, Mar 24 2024

Extensions

Edited by G. C. Greubel, Mar 24 2024