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.

Showing 1-3 of 3 results.

A051340 A simple 2-dimensional array, read by antidiagonals: T[i,j] = 1 for j>0, T[i,0] = i+1; i,j = 0,1,2,3,...

Original entry on oeis.org

1, 1, 2, 1, 1, 3, 1, 1, 1, 4, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13
Offset: 0

Views

Author

Keywords

Comments

Warning: contributions from Kimberling refer to an alternate version indexed by 1 instead of 0. Other contributors (Adamson in A125026/A130301/A130295) refer to this considering the upper right triangle set to zero, T[i,j]=0 for j>i. - M. F. Hasler, Aug 15 2015
From Clark Kimberling, Feb 05 2011: (Start)
A member of the accumulation chain:
... < A051340 < A141419 < A185874 < A185875 < A185876 < ...
(See A144112 for the definition of accumulation array.)
In the m-th accumulation array of A051340,
row_1 = C(m,1) and column_1 = C(1,m+1), for m>=0. (End)

Examples

			Northwest corner:
  1...1...1...1...1...1...1
  2...1...1...1...1...1...1
  3...1...1...1...1...1...1
  4...1...1...1...1...1...1
  5...1...1...1...1...1...1
  6...1...1...1...1...1...1
The Mathematica code shows that the weight array of this array (i.e., the array of which this array is the accumulation array), has northwest corner
  1....0...0...0...0...0...0
  1...-1...0...0...0...0...0
  1...-1...0...0...0...0...0
  1...-1...0...0...0...0...0
  1...-1...0...0...0...0...0. - _Clark Kimberling_, Feb 05 2011
		

Crossrefs

Programs

  • Magma
    [k eq n select n+1 else 1: k in [0..n], n in [0..15]]; // G. C. Greubel, Mar 18 2023
    
  • Maple
    A051340 := proc(n, k) if k=0 then n+1; else 1; end if; end proc: # R. J. Mathar, Jul 16 2015
  • Mathematica
    (* This program generates A051340, then its accumulation array A141419, then its weight array described under Example. *)
    f[n_,0]:=0; f[0,k_]:=0;  (* needed for the weight array *)
    f[n_,1]:=n; f[n_,k_]:=1/;k>1;
    TableForm[Table[f[n,k],{n,1,10},{k,1,15}]] (* A051340 *)
    Table[f[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten
    s[n_,k_]:=Sum[f[i,j],{i,1,n},{j,1,k}]; (* accumulation array of {f(n,k)} *)
    TableForm[Table[s[n,k],{n,1,10},{k,1,15}]] (* A141419 *)
    Table[s[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten
    w[m_,n_]:=f[m,n]+f[m-1,n-1]-f[m,n-1]-f[m-1,n]/;Or[m>0,n>0];
    TableForm[Table[w[n,k],{n,1,10},{k,1,15}]] (* weight array *)
    Table[w[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten (* Clark Kimberling, Feb 05 2011 *)
    f[n_] := Join[ Table[1, {n - 1}], {n}]; Array[ f, 14] // Flatten (* Robert G. Wilson v, Mar 04 2012 *)
    Table[PadLeft[{n},n,1],{n,15}]//Flatten (* Harvey P. Dale, Jun 17 2025 *)
  • Python
    from math import comb, isqrt
    def A051340(n):
        a = (m:=isqrt(k:=n+2<<1))+(k>m*(m+1))
        return 1 if n-comb(a,2)+1 else a-1 # Chai Wah Wu, Jun 21 2025
  • SageMath
    def A051340(n,k): return n+1 if (k==n) else 1
    flatten([[A051340(n,k) for k in range(n+1)] for n in range(16)]) # G. C. Greubel, Mar 18 2023
    

Formula

For n>0, a(n(n+3)/2)=n+1, and if k is not of the form n*(n+3)/2, then a(k)=1. - Benoit Cloitre, Oct 31 2002, corrected by M. F. Hasler, Aug 15 2015
T(n,0) = n+1 and T(n,k) = 1 if k >= 0, for n >= 0. - Clark Kimberling, Feb 05 2011

Extensions

Edited by M. F. Hasler, Aug 15 2015

A083706 a(n) = 2^(n+1) + n - 1.

Original entry on oeis.org

1, 4, 9, 18, 35, 68, 133, 262, 519, 1032, 2057, 4106, 8203, 16396, 32781, 65550, 131087, 262160, 524305, 1048594, 2097171, 4194324, 8388629, 16777238, 33554455, 67108888, 134217753, 268435482, 536870939, 1073741852, 2147483677, 4294967326, 8589934623, 17179869216
Offset: 0

Views

Author

N. J. A. Sloane, Jun 15 2003

Keywords

Comments

Is A247983(n+1) = A247983(n) if and only if n is in A083706? - Clark Kimberling, Sep 28 2014
a(n) is the least number of nodes in a height-n 2-3-4 tree, if using the top-down insertion algorithm and there have been no deletions. - Daniel S. Roche, Oct 05 2014
Also the number of independent vertex sets and vertex covers in the n-crown graph. - Andrew Howroyd, May 14 2017

Crossrefs

Programs

Formula

G.f.: (1-2*x^2)/((1-x)^2*(1-2*x)).
a(n) = 2*a(n-1) + 3 - n.
Row sums of A130301. - Gary W. Adamson, May 20 2007
From Elmo R. Oliveira, Mar 06 2025: (Start)
E.g.f.: exp(x)*(x + 2*exp(x) - 1).
a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3). (End)

A130300 A007318 * A130296.

Original entry on oeis.org

1, 3, 1, 8, 3, 1, 20, 7, 4, 1, 48, 15, 11, 5, 1, 112, 31, 26, 16, 6, 1, 256, 63, 57, 42, 22, 7, 1, 576, 127, 120, 99, 64, 29, 8, 1, 1280, 255, 247, 219, 163, 93, 37, 9, 1, 2816, 511, 502, 466, 382, 256, 130, 46, 10, 1
Offset: 1

Views

Author

Gary W. Adamson, May 20 2007

Keywords

Comments

Row sums = A001787: (1, 4, 12, 32, 80, 192, ...).
Left border = A001792: (1, 3, 8, 20, 48, 112, ...).

Examples

			First few rows of the triangle:
    1;
    3,  1;
    8,  3,  1;
   20,  7,  4,  1;
   48, 15, 11,  5,  1;
  112, 31, 26, 16,  6,  1;
  256, 63, 57, 42, 22,  7,  1;
  ...
		

Crossrefs

Formula

Binomial transform of A130296.
Showing 1-3 of 3 results.