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.

A121722 Triangle T(n,k) = 1 + k*n*(n+1)/2, read by rows.

Original entry on oeis.org

1, 1, 2, 1, 4, 7, 1, 7, 13, 19, 1, 11, 21, 31, 41, 1, 16, 31, 46, 61, 76, 1, 22, 43, 64, 85, 106, 127, 1, 29, 57, 85, 113, 141, 169, 197, 1, 37, 73, 109, 145, 181, 217, 253, 289, 1, 46, 91, 136, 181, 226, 271, 316, 361, 406, 1, 56, 111, 166, 221, 276, 331, 386, 441, 496, 551
Offset: 0

Views

Author

Roger L. Bagula, Sep 08 2006

Keywords

Comments

A triangular form based on the Hex number recursion: a(n) = 2*a(n-1) - a(n-1) + 6: A003215 form as generalized to Integer m.
A solution for the general type for m held constant: a(n) = 2*a(n-1) - a(n-2) + m, with first two values as {1, 1+m}.

Examples

			Triangle begins as:
  1;
  1,  2;
  1,  4,  7;
  1,  7, 13, 19;
  1, 11, 21, 31, 41;
  1, 16, 31, 46, 61, 76;
		

Crossrefs

Programs

  • GAP
    Flat(List([0..10], n-> List([0..n], k-> 1 + k*Binomial(n+1,2) ))); # G. C. Greubel, Nov 21 2019
  • Magma
    [1+k*Binomial(n+1,2): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 21 2019
    
  • Maple
    seq(seq( 1 + k*binomial(n+1,2), k=0..n), n=0..10); # G. C. Greubel, Nov 21 2019
  • Mathematica
    f[n_Integer] = Module[{a}, a[n]/.RSolve[{a[n]==2*a[n-1]-a[n-2]+m, a[0] ==1, a[1]==1+m}, a[n], n][[1]]//FullSimplify] (* formula of triangle *)
    Table[Table[1+k*n*(1+n)/2, {k,0,n}], {n,0,10}]//Flatten
  • PARI
    T(n, k) = 1 + k*binomial(n+1,2); \\ G. C. Greubel, Nov 21 2019
    
  • Sage
    [[1+k*binomial(n+1,2) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Nov 21 2019
    

Formula

T(n, k) = 1 + k*binomial(n+1,2).

Extensions

Edited by G. C. Greubel, Nov 21 2019