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

A143972 Eigentriangle by rows, A143971 * (A108300 * 0^(n-k)); 1<=k<=1.

Original entry on oeis.org

1, 4, 1, 7, 4, 5, 10, 7, 20, 16, 13, 10, 35, 64, 53, 16, 13, 50, 112, 212, 175, 19, 16, 65, 160, 371, 700, 578, 22, 19, 80, 208, 530, 1225, 2312, 1909, 25, 28, 95, 256, 689, 1750, 4046, 7636, 6305, 28, 25, 110, 304, 848, 2275, 5780, 23363, 25220, 20824
Offset: 1

Views

Author

Gary W. Adamson, Sep 06 2008

Keywords

Comments

Right border = A108300: (1, 1, 5, 16, 53, 175, 578,...). Row sums = (1, 5, 16, 53, 175, 578,...) = INVERT transform of (1, 4, 7, 10,...).
Sum of n-th row terms = rightmost term of next row.
Comment in A108300 states that (5, 16, 53, 175,...) is related to the numbers of hydrogen bonds in hydrocarbons.

Examples

			First few rows of the triangle =
1;
4, 1;
7, 4, 5;
10, 7, 10, 16;
13, 10, 35, 64, 53;
16, 13, 50, 112, 212, 175;
19, 16, 65, 160, 371, 700, 578;
22, 19, 80, 208, 530, 1225, 2312, 1909;
25, 22, 95, 256, 689, 1750, 4046, 7636, 6305;
... Example: row 4 = (10, 7, 20, 16) = termwise products of (10, 7, 4, 1) and (1, 1, 5, 16) = (10*1, 7*1, 4*5, 1*16), where (10, 7, 4, 1) = row 4 of triangle A143971.
		

Crossrefs

Formula

Eigentriangle by rows, A143971 * (A108300 * 0^(n-k)); 1<=k<=1
Triangle A143971 = (1; 4,1; 7,4,1; 10,7,4,1;...). A108300 * 0^(n-k) = an infinite lower triangular matrix with A108300 (1, 1, 5, 16, 53, 175, 578, 1909,...) in the main diagonal and the rest zeros. By rows, = termwise products of n-th row terms of A143971 and n terms of A108300.

A228916 Indices of primes in sequence A108300.

Original entry on oeis.org

1, 3, 9, 15, 39, 225, 231, 363, 687, 1299, 1335, 1809, 2367, 12735
Offset: 1

Views

Author

Vaclav Kotesovec, Sep 08 2013

Keywords

Comments

Conjecture: for n>1 a(n) is a multiple of 3.
The indices greater than 363 yield probable primes. - Vaclav Kotesovec, Oct 28 2013
Next term > 100000. - Tyler Busby, Mar 29 2024

Crossrefs

Programs

  • Mathematica
    seq=RecurrenceTable[{a[n]==3*a[n-1]+a[n-2],a[0]==1,a[1]==5},a,{n,1,1000}]; Select[Range[1000],PrimeQ[seq[[#]]]&]

A052924 Expansion of g.f.: (1-x)/(1 - 3*x - x^2).

Original entry on oeis.org

1, 2, 7, 23, 76, 251, 829, 2738, 9043, 29867, 98644, 325799, 1076041, 3553922, 11737807, 38767343, 128039836, 422886851, 1396700389, 4612988018, 15235664443, 50319981347, 166195608484, 548906806799, 1812916028881
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Euler encountered this sequence when finding the largest root of z^2 - 3z - 1 = 0. - V. Frederick Rickey (fred-rickey(AT)usma.edu), Aug 20 2003
Let M = a triangle with the Pell series A000129 (1, 2, 5, 12, ...) in each column, with the leftmost column shifted upwards one row. A052924 starting (1, 2, 7, 23, ...) = lim_{n->infinity} M^n, the left-shifted vector considered as a sequence. - Gary W. Adamson, Jul 31 2010
a(n) is the number of compositions of n when there are 2 types of 1 and 3 types of other natural numbers. - Milan Janjic, Aug 13 2010
Equals partial sums of A108300 prefaced with a 1: (1, 1, 5, 16, 53, 175, 578, ...). - Gary W. Adamson, Feb 15 2012

References

  • L. Euler, Introductio in analysin infinitorum, 1748, section 338. English translation by John D. Blanton, Introduction to Analysis of the Infinite, 1988, Springer, p. 286.

Crossrefs

A108300 (first differences), A006190 (partial sums), A355981 (primes).

Programs

  • GAP
    a:=[1,2];; for n in [3..30] do a[n]:=3*a[n-1]+a[n-2]; od; a; # G. C. Greubel, Jun 09 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x)/(1-3*x-x^2) )); // G. C. Greubel, Jun 09 2019
    
  • Maple
    spec:= [S,{S=Sequence(Prod(Sequence(Z),Union(Z,Z,Prod(Z,Z))))}, unlabeled]: seq(combstruct[count](spec,size=n), n=0..30);
    seq(coeff(series((1-x)/(1-3*x-x^2), x, n+1), x, n), n = 0..30); # G. C. Greubel, Oct 16 2019
  • Mathematica
    CoefficientList[Series[(1-x)/(1-3*x-x^2), {x,0,30}], x] (* G. C. Greubel, Jun 09 2019 *)
  • PARI
    Vec((1-x)/(1-3*x-x^2)+O(x^30)) \\ Charles R Greathouse IV, Nov 20 2011
    
  • Sage
    ((1-x)/(1-3*x-x^2)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jun 09 2019
    

Formula

a(n) = 3*a(n-1) + a(n-2).
a(n) = Sum_{alpha=RootOf(-1+3*x+x^2)} (1/13)*(1+5*alpha)*alpha^(-1-n).
With offset 1: a(1)=1; for n > 1, a(n) = Sum_{i=1..3*n-4} a(ceiling(i/3)). - Benoit Cloitre, Jan 04 2004
Binomial transform of A006130. a(n) = (1/2 - sqrt(13)/26)*(3/2 - sqrt(13)/2)^n + (1/2 + sqrt(13)/26)*(3/2 + sqrt(13)/2)^n. - Paul Barry, Jul 20 2004
From Creighton Dement, Nov 04 2004: (Start)
a(n) = A006190(n+1) - A006190(n);
4*a(n) = 9*A006190(n+1) - A006497(n+1) - 2*A003688(n+1). (End)
Numerators in continued fraction [1, 2, 3, 3, 3, ...], where the latter = 0.69722436226...; the length of an inradius of a right triangle with legs 2 and 3. - Gary W. Adamson, Dec 19 2007
If p[1]=2, p[i]=3, (i>1), and if A is Hessenberg matrix of order n defined by: A[i,j] = p[j-i+1], (i<=j), A[i,j] = -1, (i=j+1), and A[i,j]=0 otherwise. Then, for n >= 1, a(n-1) = det A. - Milan Janjic, Apr 29 2010
a(n) = A006190(n) + A003688(n). - R. J. Mathar, Jul 06 2012
a(n) = Sum_{k=0..n-2} A168561(n-2,k)*3^k + 2 * Sum_{k=0..n-1} A168561(n-1,k)*3^k, n>0. - R. J. Mathar, Feb 14 2024
From Peter Bala, Jul 08 2025: (Start)
The following series telescope:
Sum_{n >= 1} 1/(a(n) + 3*(-1)^(n+1)/a(n)) = 1/2, since 1/(a(n) + 3*(-1)^(n+1)/a(n)) = b(n) - b(n+1), where b(n) = (1/3) * (a(n) + a(n-1)) / (a(n)*a(n-1)).
Sum_{n >= 1} (-1)^(n+1)/(a(n) + 3*(-1)^(n+1)/a(n)) = 1/6, since 1/(a(n) + 3*(-1)^(n+1)/a(n)) = c(n) + c(n+1), where c(n) = (1/3) * (a(n) - a(n-1)) / (a(n)*a(n-1)). (End)

Extensions

More terms from James Sellers, Jun 06 2000

A152187 a(n) = 3*a(n-1) + 5*a(n-2), with a(0)=1, a(1)=5.

Original entry on oeis.org

1, 5, 20, 85, 355, 1490, 6245, 26185, 109780, 460265, 1929695, 8090410, 33919705, 142211165, 596232020, 2499751885, 10480415755, 43940006690, 184222098845, 772366329985, 3238209484180, 13576460102465, 56920427728295
Offset: 0

Views

Author

Philippe Deléham, Nov 28 2008

Keywords

Comments

Unsigned version of A152185.
From Johannes W. Meijer, Aug 01 2010: (Start)
The a(n) represent the number of n-move routes of a fairy chess piece starting in a given side square (m = 2, 4, 6 and 8) on a 3 X 3 chessboard. This fairy chess piece behaves like a king on the eight side and corner squares but on the central square the king goes crazy and turns into a red king, see A179596.
The sequence above corresponds to 24 red king vectors, i.e., A[5] vectors, with decimal values 27, 30, 51, 54, 57, 60, 90, 114, 120, 147, 150, 153, 156, 177, 180, 210, 216, 240, 282, 306, 312, 402, 408 and 432. These vectors lead for the corner squares to A015523 and for the central square to A179606.
This sequence belongs to a family of sequences with g.f. (1+2*x)/(1 - 3*x - k*x^2). Red king sequences that are members of this family are A007483 (k=2), A108981 (k=4), A152187 (k=5; this sequence), A154964 (k=6), A179602 (k=7) and A179598 (k=8). We observe that there is no red king sequence for k=3. Other members of this family are A036563 (k=-2), A054486 (k=-1), A084244 (k=0), A108300 (k=1) and A000351 (k=10).
Inverse binomial transform of A015449 (without the first leading 1).
(End)

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3,5},{1,5},40] (* Harvey P. Dale, May 03 2013 *)

Formula

G.f.: (1+2*x)/(1 - 3*x - 5*x^2).
Lim_{k->infinity} a(n+k)/a(k) = (A072263(n) + A015523(n)*sqrt(29))/2. - Johannes W. Meijer, Aug 01 2010
G.f.: G(0)*(1+2*x)/(2-3*x), where G(k) = 1 + 1/(1 - x*(29*k-9)/(x*(29*k+20) - 6/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 17 2013

A374439 Triangle read by rows: the coefficients of the Lucas-Fibonacci polynomials. T(n, k) = T(n - 1, k) + T(n - 2, k - 2) with initial values T(n, k) = k + 1 for k < 2.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 1, 2, 2, 2, 1, 2, 3, 4, 1, 1, 2, 4, 6, 3, 2, 1, 2, 5, 8, 6, 6, 1, 1, 2, 6, 10, 10, 12, 4, 2, 1, 2, 7, 12, 15, 20, 10, 8, 1, 1, 2, 8, 14, 21, 30, 20, 20, 5, 2, 1, 2, 9, 16, 28, 42, 35, 40, 15, 10, 1, 1, 2, 10, 18, 36, 56, 56, 70, 35, 30, 6, 2
Offset: 0

Views

Author

Peter Luschny, Jul 22 2024

Keywords

Comments

There are several versions of Lucas and Fibonacci polynomials in this database. Our naming follows the convention of calling polynomials after the values of the polynomials at x = 1. This assumes a regular sequence of polynomials, that is, a sequence of polynomials where degree(p(n)) = n. This view makes the coefficients of the polynomials (the terms of a row) a refinement of the values at the unity.
A remarkable property of the polynomials under consideration is that they are dual in this respect. This means they give the Lucas numbers at x = 1 and the Fibonacci numbers at x = -1 (except for the sign). See the example section.
The Pell numbers and the dual Pell numbers are also values of the polynomials, at the points x = -1/2 and x = 1/2 (up to the normalization factor 2^n). This suggests a harmonized terminology: To call 2^n*P(n, -1/2) = 1, 0, 1, 2, 5, ... the Pell numbers (A000129) and 2^n*P(n, 1/2) = 1, 4, 9, 22, ... the dual Pell numbers (A048654).
Based on our naming convention one could call A162515 (without the prepended 0) the Fibonacci polynomials. In the definition above only the initial values would change to: T(n, k) = k + 1 for k < 1. To extend this line of thought we introduce A374438 as the third triangle of this family.
The triangle is closely related to the qStirling2 numbers at q = -1. For the definition of these numbers see A333143. This relates the triangle to A065941 and A103631.

Examples

			Triangle starts:
  [ 0] [1]
  [ 1] [1, 2]
  [ 2] [1, 2, 1]
  [ 3] [1, 2, 2,  2]
  [ 4] [1, 2, 3,  4,  1]
  [ 5] [1, 2, 4,  6,  3,  2]
  [ 6] [1, 2, 5,  8,  6,  6,  1]
  [ 7] [1, 2, 6, 10, 10, 12,  4,  2]
  [ 8] [1, 2, 7, 12, 15, 20, 10,  8,  1]
  [ 9] [1, 2, 8, 14, 21, 30, 20, 20,  5,  2]
  [10] [1, 2, 9, 16, 28, 42, 35, 40, 15, 10, 1]
.
Table of interpolated sequences:
  |  n | A039834 & A000045 | A000032 |   A000129   |   A048654  |
  |  n |     -P(n,-1)      | P(n,1)  |2^n*P(n,-1/2)|2^n*P(n,1/2)|
  |    |     Fibonacci     |  Lucas  |     Pell    |    Pell*   |
  |  0 |        -1         |     1   |       1     |       1    |
  |  1 |         1         |     3   |       0     |       4    |
  |  2 |         0         |     4   |       1     |       9    |
  |  3 |         1         |     7   |       2     |      22    |
  |  4 |         1         |    11   |       5     |      53    |
  |  5 |         2         |    18   |      12     |     128    |
  |  6 |         3         |    29   |      29     |     309    |
  |  7 |         5         |    47   |      70     |     746    |
  |  8 |         8         |    76   |     169     |    1801    |
  |  9 |        13         |   123   |     408     |    4348    |
		

Crossrefs

Triangles related to Lucas polynomials: A034807, A114525, A122075, A061896, A352362.
Triangles related to Fibonacci polynomials: A162515, A053119, A168561, A049310, A374441.
Sums include: A000204 (Lucas numbers, row), A000045 & A212804 (even sums, Fibonacci numbers), A006355 (odd sums), A039834 (alternating sign row).
Type m^n*P(n, 1/m): A000129 & A048654 (Pell, m=2), A108300 & A003688 (m=3), A001077 & A048875 (m=4).
Adding and subtracting the values in a row of the table (plus halving the values obtained in this way): A022087, A055389, A118658, A052542, A163271, A371596, A324969, A212804, A077985, A069306, A215928.
Columns include: A040000 (k=1), A000027 (k=2), A005843 (k=3), A000217 (k=4), A002378 (k=5).
Diagonals include: A000034 (k=n), A029578 (k=n-1), abs(A131259) (k=n-2).
Cf. A029578 (subdiagonal), A124038 (row reversed triangle, signed).

Programs

  • Magma
    function T(n,k) // T = A374439
      if k lt 0 or k gt n then return 0;
      elif k le 1 then return k+1;
      else return T(n-1,k) + T(n-2,k-2);
      end if;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jan 23 2025
    
  • Maple
    A374439 := (n, k) -> ifelse(k::odd, 2, 1)*binomial(n - irem(k, 2) - iquo(k, 2), iquo(k, 2)):
    # Alternative, using the function qStirling2 from A333143:
    T := (n, k) -> 2^irem(k, 2)*qStirling2(n, k, -1):
    seq(seq(T(n, k), k = 0..n), n = 0..10);
  • Mathematica
    A374439[n_, k_] := (# + 1)*Binomial[n - (k + #)/2, (k - #)/2] & [Mod[k, 2]];
    Table[A374439[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* Paolo Xausa, Jul 24 2024 *)
  • Python
    from functools import cache
    @cache
    def T(n: int, k: int) -> int:
        if k > n: return 0
        if k < 2: return k + 1
        return T(n - 1, k) + T(n - 2, k - 2)
    
  • Python
    from math import comb as binomial
    def T(n: int, k: int) -> int:
        o = k & 1
        return binomial(n - o - (k - o) // 2, (k - o) // 2) << o
    
  • Python
    def P(n, x):
        if n < 0: return P(n, x)
        return sum(T(n, k)*x**k for k in range(n + 1))
    def sgn(x: int) -> int: return (x > 0) - (x < 0)
    # Table of interpolated sequences
    print("|  n | A039834 & A000045 | A000032 |   A000129   |   A048654  |")
    print("|  n |     -P(n,-1)      | P(n,1)  |2^n*P(n,-1/2)|2^n*P(n,1/2)|")
    print("|    |     Fibonacci     |  Lucas  |     Pell    |    Pell*   |")
    f = "| {0:2d} | {1:9d}         |  {2:4d}   |   {3:5d}     |    {4:4d}    |"
    for n in range(10): print(f.format(n, -P(n, -1), P(n, 1), int(2**n*P(n, -1/2)), int(2**n*P(n, 1/2))))
    
  • SageMath
    from sage.combinat.q_analogues import q_stirling_number2
    def A374439(n,k): return (-1)^((k+1)//2)*2^(k%2)*q_stirling_number2(n+1, k+1, -1)
    print(flatten([[A374439(n, k) for k in range(n+1)] for n in range(13)])) # G. C. Greubel, Jan 23 2025

Formula

T(n, k) = 2^k' * binomial(n - k' - (k - k') / 2, (k - k') / 2) where k' = 1 if k is odd and otherwise 0.
T(n, k) = (1 + (k mod 2))*qStirling2(n, k, -1), see A333143.
2^n*P(n, -1/2) = A000129(n - 1), Pell numbers, P(-1) = 1.
2^n*P(n, 1/2) = A048654(n), dual Pell numbers.
T(2*n, n) = (1/2)*(-1)^n*( (1+(-1)^n)*A005809(n/2) - 2*(1-(-1)^n)*A045721((n-1)/2) ). - G. C. Greubel, Jan 23 2025

A182001 Riordan array ((2*x+1)/(1-x-x^2), x/(1-x-x^2)).

Original entry on oeis.org

1, 3, 1, 4, 4, 1, 7, 9, 5, 1, 11, 20, 15, 6, 1, 18, 40, 40, 22, 7, 1, 29, 78, 95, 68, 30, 8, 1, 47, 147, 213, 185, 105, 39, 9, 1, 76, 272, 455, 466, 320, 152, 49, 10, 1, 123, 495, 940, 1106, 891, 511, 210, 60, 11, 1, 199, 890, 1890, 2512, 2317, 1554, 770, 280, 72, 12, 1
Offset: 0

Views

Author

Philippe Deléham, Apr 05 2012

Keywords

Comments

Subtriangle of the triangle given by (0, 3, -5/3, -1/3, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, -2/3, 2/3, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.
Antidiagonal sums are A001045(n+2).

Examples

			Triangle begins :
    1;
    3,   1;
    4,   4,    1;
    7,   9,    5,    1;
   11,  20,   15,    6,    1;
   18,  40,   40,   22,    7,    1;
   29,  78,   95,   68,   30,    8,   1;
   47, 147,  213,  185,  105,   39,   9,   1;
   76, 272,  455,  466,  320,  152,  49,  10, 1;
  123, 495,  940, 1106,  891,  511, 210,  60, 11,  1;
  199, 890, 1890, 2512, 2317, 1554, 770, 280, 72, 12, 1;
(0, 3, -5/3, -1/3, 0, 0, ...) DELTA (1, 0, -2/3, 2/3, 0, 0, ...) begins:
  1;
  0,  1;
  0,  3,  1;
  0,  4,  4,  1;
  0,  7,  9,  5,  1;
  0, 11, 20, 15,  6, 1;
  0, 18, 40, 40, 22, 7, 1;
		

Crossrefs

Cf. Columns : A000032, A023607, A152881

Programs

  • Magma
    function T(n,k)
      if k lt 0 or k gt n then return 0;
      elif k eq n then return 1;
      elif k eq 0 then return Lucas(n+1);
      else return T(n-1,k) + T(n-1,k-1) + T(n-2,k);
      end if; return T; end function;
    [T(n,k): k in [0..n], n in [0..10]]; // G. C. Greubel, Feb 18 2020
  • Maple
    with(combinat);
    T:= proc(n, k) option remember;
          if k<0 or k>n then 0
        elif k=n then 1
        elif k=0 then fibonacci(n+2) + fibonacci(n)
        else T(n-1,k) + T(n-1,k-1) + T(n-2,k)
          fi; end:
    seq(seq(T(n, k), k=0..n), n=0..10); # G. C. Greubel, Feb 18 2020
  • Mathematica
    With[{m = 10}, CoefficientList[CoefficientList[Series[(1+2*x)/(1-x-y*x-x^2), {x, 0, m}, {y, 0, m}], x], y]] // Flatten (* Georg Fischer, Feb 18 2020 *)
    T[n_, k_]:= T[n, k]= If[k<0||k>n, 0, If[k==n, 1, If[k==0, LucasL[n+1], T[n-1, k] + T[n-1, k-1] + T[n-2, k] ]]]; Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten (* G. C. Greubel, Feb 18 2020 *)

Formula

G.f.: (1+2*x)/(1-x-y*x-x^2).
T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k), T(0,0) = T(1,1) = 1, T(1,0) = 3, T(n,k) = 0 if k<0 or if k>n.
Sum_{k=0..nn} T(n,k)*x^k = A000034(n), A000032(n+1), A048654(n), A108300(n), A048875(n) for x = -1, 0, 1, 2, 3 respectively.

Extensions

a(29) corrected by and a(55)-a(65) from Georg Fischer, Feb 18 2020
Showing 1-6 of 6 results.