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-4 of 4 results.

A027960 'Lucas array': triangular array T read by rows.

Original entry on oeis.org

1, 1, 3, 1, 1, 3, 4, 4, 1, 1, 3, 4, 7, 8, 5, 1, 1, 3, 4, 7, 11, 15, 13, 6, 1, 1, 3, 4, 7, 11, 18, 26, 28, 19, 7, 1, 1, 3, 4, 7, 11, 18, 29, 44, 54, 47, 26, 8, 1, 1, 3, 4, 7, 11, 18, 29, 47, 73, 98, 101, 73, 34, 9, 1, 1, 3, 4, 7, 11, 18, 29, 47, 76, 120, 171, 199, 174, 107, 43, 10, 1
Offset: 0

Views

Author

Keywords

Comments

The k-th row contains 2k+1 numbers.
Columns in the right half consist of convolutions of the Lucas numbers with the natural numbers.
T(n,k) = number of strings s(0),...,s(n) such that s(n)=n-k. s(0) in {0,1,2}, s(1)=1 if s(0) in {1,2}, s(1) in {0,1,2} if s(0)=0 and for 1 <= i <= n, s(i) = s(i-1)+d, with d in {0,2} if s(i)=2i, in {0,1,2} if s(i)=2i-1, in {0,1} if 0 <= s(i) <= 2i-2.

Examples

			                           1
                       1,  3,  1
                   1,  3,  4,  4,  1
               1,  3,  4,  7,  8,  5,   1
           1,  3,  4,  7, 11, 15, 13,   6,  1
        1, 3,  4,  7, 11, 18, 26, 28,  19,  7,  1
     1, 3, 4,  7, 11, 18, 29, 44, 54,  47, 26,  8, 1
  1, 3, 4, 7, 11, 18, 29, 47, 73, 98, 101, 73, 34, 9, 1
		

Crossrefs

Central column is the Lucas numbers without initial 2: A000204.
Columns in the right half include A027961, A027962, A027963, A027964, A053298.
Bisection triangles are in A026998 and A027011.
Row sums: A036563, A153881 (alternating sign).
Diagonals of the form T(n, 2*n-p): A000012 (p=0), A000027 (p=1), A034856 (p=2), A027965 (p=3), A027966 (p=4), A027967 (p=5), A027968 (p=6), A027969 (p=7), A027970 (p=8), A027971 (p=9), A027972 (p=10).
Diagonals of the form T(n, n+p): A000032 (p=0), A027961 (p=1), A023537 (p=2), A027963 (p=3), A027964 (p=4), A053298 (p=5), A027002 U A027018 (p=6), A027007 U A027014 (p=7), A027003 U A027019 (p=8).

Programs

  • Magma
    function T(n,k) // T = A027960
          if k le n then return Lucas(k+1);
          elif k gt 2*n then return 0;
          else return T(n-1, k-2) + T(n-1, k-1);
          end if;
    end function;
    [T(n,k): k in [0..2*n], n in [0..12]]; // G. C. Greubel, Jun 08 2025
  • Maple
    T:=proc(n,k)option remember:if(k=0 or k=2*n)then return 1:elif(k=1)then return 3:else return T(n-1,k-2) + T(n-1,k-1):fi:end:
    for n from 0 to 6 do for k from 0 to 2*n do print(T(n,k));od:od: # Nathaniel Johnston, Apr 18 2011
  • Mathematica
    (* First program *)
    t[, 0] = 1; t[, 1] = 3; t[n_, k_] /; (k == 2*n) = 1; t[n_, k_] := t[n, k] = t[n-1, k-2] + t[n-1, k-1]; Table[t[n, k], {n, 0, 8}, {k, 0, 2*n}] // Flatten (* Jean-François Alcover, Dec 27 2013 *)
    (* Second program *)
    f[n_, k_]:= f[n,k]= Sum[Binomial[2*n-k+j,j]*LucasL[2*(k-n-j)], {j,0,k-n-1}];
    A027960[n_, k_]:= LucasL[k+1] - f[n,k]*Boole[k>n];
    Table[A027960[n,k], {n,0,12}, {k,0,2*n}]//Flatten (* G. C. Greubel, Jun 08 2025 *)
  • PARI
    T(r,n)=if(r<0||n>2*r,return(0)); if(n==0||n==2*r,return(1)); if(n==1,3,T(r-1,n-1)+T(r-1,n-2)) /* Ralf Stephan, May 04 2005 */
    
  • SageMath
    @CachedFunction
    def T(n, k): # T = A027960
        if (k>2*n): return 0
        elif (kG. C. Greubel, Jun 01 2019; Jun 08 2025
    

Formula

T(n, k) = Lucas(k+1) for k <= n, otherwise the (2n-k)th coefficient of the power series for (1+2*x)/{(1-x-x^2)*(1-x)^(k-n)}.
Recurrence: T(n, 0)=T(n, 2n)=1 for n >= 0; T(n, 1)=3 for n >= 1; and for n >= 2, T(n, k) = T(n-1, k-2) + T(n-1, k-1) for 2 <= k <= 2*n-1.
From G. C. Greubel, Jun 08 2025: (Start)
T(n, k) = A000032(k+1) - f(n, k)*[k > n], where f(n, k) = Sum_{j=0..k-n-1} binomial(2*n -k+j, j)*A000032(2*(k-n-j)).
Sum_{k=0..A004396(n+1)} T(n-k, k) = A027975(n).
Sum_{k=0..n} T(n, k) = A027961(n).
Sum_{k=0..2*n} T(n, k) = A168616(n+2) + 2.
Sum_{k=n+1..2*n} (-1)^k*T(n, k) = A075193(n-1), n >= 1. (End)

Extensions

Edited by Ralf Stephan, May 04 2005

A027011 Triangular array T read by rows: T(n,k) = t(n, 2k+1) for 0 <= k <= floor((2n-1)/2), t given by A027960, n >= 0.

Original entry on oeis.org

3, 3, 4, 3, 7, 5, 3, 7, 15, 6, 3, 7, 18, 28, 7, 3, 7, 18, 44, 47, 8, 3, 7, 18, 47, 98, 73, 9, 3, 7, 18, 47, 120, 199, 107, 10, 3, 7, 18, 47, 123, 291, 373, 150, 11, 3, 7, 18, 47, 123, 319, 661, 654, 203, 12, 3, 7, 18, 47, 123, 322, 806, 1404, 1085, 267, 13, 3, 7, 18, 47
Offset: 1

Views

Author

Keywords

Comments

Right-edge columns are polynomials approximating Lucas(2n).

Examples

			                                          3
                                     3,   4
                                3,   7,   5
                           3,   7,  15,   6
                      3,   7,  18,  28,   7
                 3,   7,  18,  44,  47,   8
            3,   7,  18,  47,  98,  73,   9
       3,   7,  18,  47, 120, 199, 107,  10
  3,   7,  18,  47, 123, 291, 373, 150,  11
		

Crossrefs

This is a bisection of the "Lucas array " A027960, see A026998 for the other bisection.
Right-edge columns include A027965, A027967, A027969, A027971.
An earlier version of this entry had (unjustifiably) each row starting with 1.

Programs

  • Maple
    t:=proc(n,k)option remember:if(k=0 or k=2*n)then return 1:elif(k=1)then return 3:else return t(n-1,k-2) + t(n-1,k-1):fi:end:
    T:=proc(n,k)return t(n,2*k+1):end:
    for n from 0 to 8 do for k from 0 to floor((2*n-1)/2) do print(T(n,k));od:od: # Nathaniel Johnston, Apr 18 2011
  • Mathematica
    t[n_, k_] := t[n, k] = If[k == 0 || k == 2*n, 1, If[k == 1, 3, t[n-1, k-2] + t[n-1, k-1]]]; T[n_, k_] := t[n, 2*k+1]; Table[T[n, k], {n, 1, 12}, {k, 0, (2*n-1)/2}] // Flatten (* Jean-François Alcover, Nov 18 2013, after Nathaniel Johnston *)

Formula

T(n, k) = Lucas(2n) = A005248(n) for 2k+1 <= n, otherwise the (2n-2k+1)-th coefficient of the power series for (1+2x)/((1-x-x^2)(1-x)^(2k-n+1)).

Extensions

Edited by Ralf Stephan, May 05 2005

A074742 a(n) = (n^3 + 6n^2 - n + 12)/6.

Original entry on oeis.org

2, 3, 7, 15, 28, 47, 73, 107, 150, 203, 267, 343, 432, 535, 653, 787, 938, 1107, 1295, 1503, 1732, 1983, 2257, 2555, 2878, 3227, 3603, 4007, 4440, 4903, 5397, 5923, 6482, 7075, 7703, 8367, 9068, 9807, 10585, 11403, 12262, 13163, 14107, 15095, 16128, 17207, 18333
Offset: 0

Views

Author

Susanna Cuyler, Sep 06 2002

Keywords

References

  • A. Schultze, Advanced Algebra, Macmillan, London, 1910; p. 552.

Crossrefs

Cf. A027965.

Programs

  • Magma
    [(n^3 + 6*n^2 - n + 12)/6: n in [0..50]]; // Vincenzo Librandi, Jan 13 2012
  • Mathematica
    Table[(n^3 + 6n^2 - n + 12)/6, {n, 0, 49}] (* Alonso del Arte, Jan 13 2012 *)
    CoefficientList[Series[(2-5x+7x^2-3x^3)/(1-x)^4,{x,0,50}],x] (* or *) LinearRecurrence[ {4,-6,4,-1},{2,3,7,15},50] (* Harvey P. Dale, Aug 05 2022 *)
  • PARI
    a(n)=n*(n^2+6*n-1)/6+2 \\ Charles R Greathouse IV, Jan 13 2012
    

Formula

From R. J. Mathar, Sep 23 2008: (Start)
G.f.: (2 - 5*x + 7*x^2 - 3*x^3)/(1-x)^4.
a(n) = A027965(n+1), n > 0. (End)
E.g.f.: exp(x)*(12 + 6*x + 9*x^2 + x^3)/6. - Stefano Spezia, Jul 12 2023

A144680 Triangle read by rows, lower half of an array formed by A004736 * A144328 (transform).

Original entry on oeis.org

1, 2, 3, 3, 5, 7, 4, 7, 11, 14, 5, 9, 15, 21, 25, 6, 11, 19, 28, 36, 41, 7, 13, 23, 35, 47, 57, 63, 8, 15, 27, 42, 58, 73, 85, 92, 9, 17, 31, 49, 69, 89, 107, 121, 129, 10, 19, 35, 56, 80, 105, 129, 150, 166, 175
Offset: 1

Views

Author

Gary W. Adamson, Sep 19 2008

Keywords

Comments

Triangle read by rows, lower half of an array formed by A004736 * A144328 (transform).

Examples

			The array is formed by A004736 * A144328 (transform) where A004736 = the natural number decrescendo triangle and A144328 = a crescendo triangle. First few rows of the array =
  1, 1,  1,  1,  1,  1, ...
  2, 3,  3,  3,  3,  3, ...
  3, 5,  7,  7,  7,  7, ...
  4, 7, 11, 14, 14, 14, ...
  5, 9, 15, 21, 25, 25, ...
  ...
Triangle begins as:
   1;
   2,  3;
   3,  5,  7;
   4,  7, 11, 14;
   5,  9, 15, 21, 25;
   6, 11, 19, 28, 36,  41;
   7, 13, 23, 35, 47,  57,  63;
   8, 15, 27, 42, 58,  73,  85,  92;
   9, 17, 31, 49, 69,  89, 107, 121, 129;
  10, 19, 35, 56, 80, 105, 129, 150, 166, 175;
  ...
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_]:= (3*(k^2-k+2)*n - k*(k-1)*(2*k-1))/6;
    Table[T[n, k], {n,12}, {k,n}]//Flatten (* G. C. Greubel, Oct 18 2021 *)
  • Sage
    def A144680(n,k): return (3*(k^2-k+2)*n - k*(k-1)*(2*k-1))/6
    flatten([[A144680(n,k) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Oct 18 2021

Formula

Sum_{k=1..n} T(n, k) = A006008(n).
From G. C. Greubel, Oct 18 2021: (Start)
T(n, k) = (1/6)*( 3*(k^2 - k + 2)*n - k*(k-1)*(2*k-1) ).
T(n, n) = A004006(n).
T(n, n-1) = A050407(n+2).
T(n, n-2) = A027965(n-1) = A074742(n-2). (End)
Showing 1-4 of 4 results.