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.

Previous Showing 21-30 of 33 results. Next

A094717 a(n) = n! * Sum_{i+2j+3k=n} 1/(i!*(2j)!*(3k)!).

Original entry on oeis.org

1, 1, 2, 5, 12, 36, 113, 351, 1080, 3281, 9882, 29646, 88817, 266085, 797526, 2391485, 7173360, 21520080, 64563521, 193700403, 581120892, 1743392201, 5230206126, 15690618378, 47071766561, 141215033961, 423644570442, 1270932914165, 3812797945332, 11438393835996
Offset: 0

Views

Author

Benoit Cloitre, May 23 2004

Keywords

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-5*x+8*x^2-5*x^3+2*x^4-2*x^5)/((1-x)*(1-3*x)*(1+x+x^2)*(1-3*x+3*x^2)) )); // G. C. Greubel, Jul 14 2023
    
  • Maple
    A094717_list := proc(n) local i; exp(z)*cosh(z)*(exp(z)+2*exp(-z/2)* cos(z*sqrt(3/4)))/3; series(%,z,n+2); seq(simplify(i!*coeff(%,z,i)),i=0..n) end: A094717_list(27); # Peter Luschny, Jul 11 2012
  • Mathematica
    a[n_]:= n! Sum[Boole[i +2j +3k ==n]/(i! (2j)! (3k)!), {i,0,n}, {j,0,n}, {k,0,n}]; Table[a[n], {n,0,27}] (* Jean-François Alcover, Jul 06 2019 *)
    LinearRecurrence[{6,-12,10,-6,12,-9}, {1,1,2,5,12,36}, 40] (* G. C. Greubel, Jul 14 2023 *)
  • PARI
    a(n)=sum(i=0,n,sum(j=0,n,sum(k=0,n,if(n-i-2*j-3*k,0,n!/(i)!/(2*j)!/(3*k)!))))
    
  • SageMath
    def A094717_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1-5*x+8*x^2-5*x^3+2*x^4-2*x^5)/((1-x)*(1-3*x)*(1+x+x^2)*(1-3*x+3*x^2)) ).list()
    A094717_list(40) # G. C. Greubel, Jul 14 2023

Formula

Limit_{n->oo} a(n)/3^n = 1/6.
E.g.f.: exp(z)*cosh(z)*(exp(z) + 2*exp(-z/2)*cos(z*sqrt(3/4)))/3. - Peter Luschny, Jul 11 2012
G.f.: (1-5*x+8*x^2-5*x^3+2*x^4-2*x^5)/((1-x)*(1-3*x)*(1+x+x^2)*(1-3*x+3*x^2)). - Colin Barker, Dec 24 2012
From G. C. Greubel, Jul 14 2023: (Start)
a(n) = (1/6)*(1 + 3^n + 2*A049347(n) + A049347(n-1) + 2*A057083(n) - 3*A057083(n-1)).
a(n) = (1/6)*(1 + 3^n + A099837(n+3) + A057682(n+3)). (End)

A098172 Triangle T(n,k) with diagonals T(n,n-k) = binomial(n,3k).

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 4, 1, 0, 0, 0, 0, 10, 1, 0, 0, 0, 0, 1, 20, 1, 0, 0, 0, 0, 0, 7, 35, 1, 0, 0, 0, 0, 0, 0, 28, 56, 1, 0, 0, 0, 0, 0, 0, 1, 84, 84, 1, 0, 0, 0, 0, 0, 0, 0, 10, 210, 120, 1, 0, 0, 0, 0, 0, 0, 0, 0, 55, 462, 165, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 220, 924, 220, 1
Offset: 0

Views

Author

Paul Barry, Aug 30 2004

Keywords

Comments

Row sums are A024493.
From R. J. Mathar, Mar 22 2013: (Start)
The matrix inverse starts
1;
0, 1;
0, 0, 1;
0, 0, -1, 1;
0, 0, 4, -4, 1;
0, 0, -40, 40, -10, 1;
0, 0, 796, -796, 199, -20, 1;
0, 0, -27580, 27580, -6895, 693, -35, 1;
... (End)

Examples

			Rows begin
  {1},
  {0,1},
  {0,0,1},
  {0,0,1,1},
  {0,0,0,4,1},
  {0,0,0,0,10,1},
  ...
		

Crossrefs

Cf. A098158.

Programs

  • GAP
    Flat(List([0..12], n-> List([0..n], k-> Binomial(n, 3*(n-k)) ))); # G. C. Greubel, Mar 15 2019
  • Magma
    [[Binomial(n, 3*(n-k)): k in [0..n]]: n in [0..12]]; // G. C. Greubel, Mar 15 2019
    
  • Mathematica
    Table[Binomial[n, 3(n-k)], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Mar 15 2019 *)
  • PARI
    {T(n, k) = binomial(n, 3*(n-k))}; \\ G. C. Greubel, Mar 15 2019
    
  • Sage
    [[binomial(n, 3*(n-k)) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Mar 15 2019
    

Formula

Triangle T(n, k) = binomial(n, 3(n-k)).

A138635 a(n) =3*a(n-3)-3*a(n-6)+2*a(n-9).

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 1, 2, 1, 3, 3, 2, 6, 5, 5, 11, 10, 11, 21, 21, 22, 42, 43, 43, 85, 86, 85, 171, 171, 170, 342, 341, 341, 683, 682, 683, 1365, 1365, 1366, 2730, 2731, 2731, 5461, 5462, 5461, 10923, 10923, 10922, 21846, 21845, 21845, 43691, 43690, 43691, 87381
Offset: 0

Views

Author

Paul Curtz, May 14 2008

Keywords

Comments

As the recurrence shows, these are three interleaved sequences which obey recurrences b(n)=3*b(n-1)-3*b(n-2)+2*b(n-3), indicating that the b(n) equal their third differences.
These three sequences are A024495, A024494 (or A131708) and A024493 (or A130781).
Their starting "vectors" b(0,1,2) are 0,0,1 and 0,1,2 and 1,1,1, respectively, therefore linearly independent, such that other sequences with the same recursion as b(n) can be written as linear combinations of these.

Crossrefs

Formula

a(18*n) = 21*A133853(n).
G.f.: -x^2*(1+x^2-2*x^3+x^4-x^5+x^6)/((2*x^3-1)*(x^6-x^3+1)). - R. J. Mathar, May 17 2009

Extensions

Edited by R. J. Mathar, May 17 2009

A290285 Determinant of circulant matrix of order 3 with entries in the first row (-1)^j * Sum_{k>=0} binomial(n,3*k+j), j=0,1,2.

Original entry on oeis.org

1, 0, 0, 62, 666, 5292, 39754, 307062, 2456244, 19825910, 159305994, 1274445900, 10184391946, 81430393590, 651443132340, 5212260963062, 41700950994186, 333607607822412, 2668815050206474, 21350337149539062, 170802697195263924, 1366424509598012150
Offset: 0

Views

Author

Vladimir Shevelev, Jul 26 2017

Keywords

Comments

In the Shevelev link the author proved that, for even N>=2 and every n>=1, the determinant of circulant matrix of order N with entries in the first row being (-1)^j*Sum_{k>=0} binomial(n,N*k+j), j=0..N-1, is 0. This sequence shows what happens for the first odd N>2.

Crossrefs

Programs

  • Maple
    a:= n-> LinearAlgebra[Determinant](Matrix(3, shape=Circulant[seq(
            (-1)^j*add(binomial(n, 3*k+j), k=0..(n-j)/3), j=0..2)])):
    seq(a(n), n=0..25);  # Alois P. Heinz, Jul 27 2017
  • Mathematica
    ro[n_] := Table[(-1)^j Sum[Binomial[n, 3k+j], {k, 0, n/3}], {j, 0, 2}];
    M[n_] := Table[RotateRight[ro[n], m], {m, 0, 2}];
    a[n_] := Det[M[n]];
    Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Aug 09 2018 *)
  • PARI
    mj(j,n) = (-1)^j*sum(k=0, n\3, binomial(n, 3*k+j));
    a(n) = {m = matrix(3, 3); for (j=1, 3, m[1, j] = mj(j-1,n)); for (j=2, 3, m[2, j] = m[1, j-1]); m[2, 1] = m[1, 3]; for (j=2, 3, m[3, j] = m[2, j-1]); m[3, 1] = m[2, 3]; matdet(m);} \\ Michel Marcus, Jul 26 2017
    
  • Python
    from sympy.matrices import Matrix
    from sympy import binomial
    def mj(j, n):
        return (-1)**j*sum(binomial(n, 3*k + j) for k in range(n//3 + 1))
    def a(n):
        m=Matrix(3, 3, [0]*9)
        for j in range(3):m[0, j]=mj(j, n)
        for j in range(1, 3):m[1, j]=m[0, j - 1]
        m[1, 0]=m[0, 2]
        for j in range(1, 3):m[2, j] = m[1, j - 1]
        m[2, 0]=m[1, 2]
        return m.det()
    print([a(n) for n in range(22)]) # Indranil Ghosh, Jul 31 2017

Formula

G.f.: (1-12*x+48*x^2-73*x^3+6*x^4-60*x^5+736*x^6-576*x^7)/((1+x)*(-1+2*x)*(-1+8*x)* (1-x+x^2)*(1+2*x+4*x^2)*(1-4*x+16*x^2)). - Peter J. C. Moses, Jul 26 2017

Extensions

More terms from Peter J. C. Moses, Jul 26 2017

A373905 a(n) = Sum_{k=0..floor(n/3)} binomial(n+3*k,n-3*k).

Original entry on oeis.org

1, 1, 1, 2, 8, 29, 86, 224, 554, 1381, 3556, 9382, 24901, 65737, 172321, 450017, 1174985, 3072365, 8044478, 21074012, 55199573, 144535714, 378366976, 990441502, 2592800365, 6787973872, 17771619370, 46527959417, 121813193825, 318910531073, 834913179137
Offset: 0

Views

Author

Seiichi Manyama, Jun 22 2024

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n\3, binomial(n+3*k,n-3*k));

Formula

a(n) = 6*a(n-1) - 15*a(n-2) + 21*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6).
G.f.: 1/(1 - x - x^3/(1 - x)^5).

A086953 Binomial transform of (-1)^mod(n,3) (A257075).

Original entry on oeis.org

1, 0, 0, 2, 6, 12, 22, 42, 84, 170, 342, 684, 1366, 2730, 5460, 10922, 21846, 43692, 87382, 174762, 349524, 699050, 1398102, 2796204, 5592406, 11184810, 22369620, 44739242, 89478486, 178956972, 357913942, 715827882, 1431655764, 2863311530, 5726623062
Offset: 0

Views

Author

Paul Barry, Jul 25 2003

Keywords

Crossrefs

Programs

Formula

a(n+3)/2 = A024495(n+2). - corrected by Vladimir Shevelev, Aug 08 2017
a(n) = 0^n + Sum{k=0..floor((n-1)/3)} C(n-1, 3*k+2).
a(n) = Sum{k=0..n} C(n, k)(-1)^mod(k, 3).
G.f.: (1 - 3*x + 3*x^2)/((1 - 2*x)*(1 - x + x^2)). - Paul Barry, Dec 14 2004
From Vladimir Shevelev, Aug 02 2017: (Start)
a(n) = A024493(n) - A131708(n) + A024495(n);
a(n) = A024495(n) if and only if n == 1 (mod 3);
a(n) = A024495(n) - 1 if and only if n == 2 or 3 (mod 6);
a(n) = A024495(n) + 1 if and only if n == 0 or 5 (mod 6);
a(3*k+1) = 2*A024495(3*k). (End)
a(n) = A131370(n+1)/2. - Rick L. Shepherd, Aug 02 2017
3*a(n) = 2^n + 2*A057079(n+2). - R. J. Mathar, Aug 04 2017

A161869 Convergent of an infinite product of Pascal's triangles aerated by rows.

Original entry on oeis.org

1, 1, 2, 4, 8, 16, 33, 71, 160, 376, 912, 2256, 5633, 14093, 35170, 87344, 215680, 529568, 1293633, 3146515, 7627208, 18441476, 44510160, 107310480, 258566402, 622900466, 1500717220, 3616471960, 8717948688, 21023129472, 50713990918, 122374025914, 295366777856
Offset: 0

Views

Author

Gary W. Adamson, Jun 20 2009

Keywords

Comments

The sequence may be the binomial transform of A024493 interleaved with zeros. A024493 = (1, 1, 1, 2, 5, 11, 22,...); so the conjecture succeeds through a(12) = A007318 * [1, 0, 1, 0, 1, 0, 2, 0, 5, 0, 11,...].
Calculating more terms of the sequence shows the above conjecture is incorrect. - Peter Bala, Jul 07 2015

Examples

			Pascal(1)     Pascal(2)    Pascal(3)
1              1            1
1 1            0 0          0 0
1 2 1          1 1 0        0 0 0
1 3 3 1        0 0 0 0      1 1 0 0
1 4 6 4 1      1 2 1 0 0    0 0 0 0 0
...
First columns of
Pascal(1):
1, 1, 1, 1, 1, 1, 1, 1,...
Pascal(1)*Pascal(2):
1, 1, 2, 4, 8, 16, 32, 64,...
Pascal(1)*Pascal(2)*Pascal(3):
1, 1, 2, 4, 8, 16, 33, 71,...
Pascal(1)*Pascal(2)*Pascal(3)*Pascal(4):
1, 1, 2, 4, 8, 16, 33, 71,...
...
converging to A161869.
		

Crossrefs

Cf. A024493, A027826 (from first column of Pascal(2)^n as n -> inf).

Programs

  • Maple
    #A161869
    #define aerated Pascal matrices (note indexing starts at 1)
    Pascal := proc (n) local i, j, r;
    Matrix(33, 33, (i, j) -> (product(r-(mod(i-1, n)), r = 1 .. n-1))*binomial(floor((i-1)/n), j-1) )/factorial(n-1) end proc:
    #it suffices to take the product of the first four aerated
    #Pascal arrays to get 33 correct terms of the sequence
    seq((Pascal(1).Pascal(2).Pascal(3).Pascal(4))(n, 1), n = 1 .. 33);
    # Peter Bala, Jul 07 2015

Formula

From Peter Bala, Jul 07 2015: (Start)
Construct an infinite set of Pascal's triangles aerated by rows, denoted Pascal(1), Pascal(2), ..., where Pascal(1) = A007318, Pascal(2) is an aerated version of Pascal(1) with alternate rows 1, 3, 5, ... set equal to (0, 0, 0, ...), Pascal(3) is a further aeration of Pascal(1) with now two adjacent rows set equal to (0, 0, 0, ...), and so on.
The infinite product Pascal(1)*Pascal(2)*Pascal(3)*... is well-defined. This sequence is the first column of the infinite product - all the other entries in the product are zero. (End)

Extensions

Terms a(12) through a(32) added by Peter Bala, Jul 07 2015

A329479 Number of degree n polynomials f with all nonzero coefficients equal to 1 such that f(k) is divisible by 3 for all integers k.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 6, 15, 30, 66, 121, 242, 462, 903, 1806, 3570, 7225, 14450, 29070, 58311, 116622, 233586, 466489, 932978, 1864590, 3727815, 7455630, 14908530, 29822521, 59645042, 119301006, 238612935, 477225870, 954473586, 1908903481, 3817806962, 7635526542
Offset: 1

Views

Author

Peter Kagey, Nov 13 2019

Keywords

Comments

Equivalently, this counts strings of numbers of length n that start with a 1 and which yield a multiple of 3 when read in any base.

Examples

			For n = 7, the a(7) = 6 (0,1)-polynomials of degree seven such that f(0) = f(1) = f(2) = 0 (mod 3) are
x^7 + x^5 + x^3,
x^7 + x^6 + x^5 + x^4 + x^3 + x^2,
x^7 + x^5 + x,
x^7 + x^3 + x,
x^7 + x^6 + x^5 + x^4 + x^2 + x, and
x^7 + x^6 + x^4 + x^3 + x^2 + x.
		

Crossrefs

A008776(n) gives the number of polynomials of degree n+3 without the coefficient restriction.

Formula

a(2n) = A024495(n-1) * A024493(n).
a(2n+1) = A024495(n) * A024493(n).
Conjectured recurrence: a(n) = 2a(n-1) + 2a(n-2) - 5a(n-3) - 2a(n-4) + 10a(n-5) - 4a(n-6) - 4a(n-7) + 8a(n-8).

A102517 Expansion of (1+x^2)/((1-x+x^2)*(1+2*x^2)).

Original entry on oeis.org

1, 1, -1, -2, 1, 3, -2, -5, 5, 10, -11, -21, 22, 43, -43, -86, 85, 171, -170, -341, 341, 682, -683, -1365, 1366, 2731, -2731, -5462, 5461, 10923, -10922, -21845, 21845, 43690, -43691, -87381, 87382, 174763, -174763, -349526, 349525, 699051, -699050, -1398101, 1398101, 2796202, -2796203, -5592405
Offset: 0

Views

Author

Paul Barry, Jan 13 2005

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1+x^2)/((1-x+x^2)(1+2x^2)),{x,0,50}],x] (* or *) LinearRecurrence[{1,-3,2,-2},{1,1,-1,-2},50] (* Harvey P. Dale, Oct 28 2011 *)

Formula

G.f.: (1+x^2)^2/((1+x^2)^3+x^6)+x(1+x^2)/((1+x^2)^3+x^6).
a(n) = Sum_{k=0..floor(n/2)} T(n-k, k)*(-1)^k, T(n, k) = Sum_{i=0..k} C(n, i) (A008949).
a(n) = (-1)^(n/2)*(Sum_{k=0..floor(n/6)} C(n/2, 3*k))*(1+(-1)^n)/2 + (-1)^((n-1)/2)*(Sum_{k=0..floor((n+1)/6)} C((n+1)/2, 3*k+1))*(1-(-1)^n)/2.
a(n) = 2^(n/2)*(cos(Pi*n/2)/3+sqrt(2)*sin(Pi*n/2)/3)+cos(Pi*n/3+Pi/3)/3+sqrt(3)*sin(Pi*n/3+Pi/3)/3.
a(2*n) = (-1)^n*A024493(n); a(2*n+1) = (-1)^n*A024494(n).
a(0)=1, a(1)=1, a(2)=-1, a(3)=-2, a(n) = a(n-1)-3*a(n-2)+2*a(n-3)-2*a(n-4). - Harvey P. Dale, Oct 28 2011

A202349 Lexicographically earliest sequence such that the sequence and its first and second differences share no terms, and the 3rd differences are equal to the original sequence.

Original entry on oeis.org

1, 3, 9, 20, 39, 75, 148, 297, 597, 1196, 2391, 4779, 9556, 19113, 38229, 76460, 152919, 305835, 611668, 1223337, 2446677, 4893356, 9786711, 19573419, 39146836, 78293673, 156587349, 313174700, 626349399, 1252698795, 2505397588, 5010795177, 10021590357
Offset: 1

Views

Author

Eric Angelini, Jun 21 2016

Keywords

Comments

The sequence is completely determined by its first 3 terms. If the first terms are x, y, z, then the following terms are 2*x-3*y+3*z, 6*x-7*y+6*z, 12*x-12*y+11*z, 22*x-21*y+21*z, 42*x-41*y+42*z, 84*x-84*y+85*z, 170*x-171*y+171*z, 342*x-343*y+342*z. - Giovanni Resta, Jun 21 2016
Is it a theorem that, if x,y,z = 1,3,9, the sequence has the desired properties, or is it just a conjecture? - N. J. A. Sloane, Jun 21 2016
From Charlie Neder, Jan 10 2019: (Start)
No two terms among this sequence and its first and second differences are equal.
Proof: Representing the first and second differences by b(n) and c(n), we have that a-b is [-1, -3, -2, 1, 3, 2] with period 6, a-c is [-3, -2, -1, 3, 2, 1] with period 6, and b-c is [-2, 1, 3, 2, -1, -3] with period 6. Therefore, no two terms at the same index are equal. Since the sequence is forced to grow exponentially, only the first few terms need to be checked to confirm that no two terms at different indices are equal, proving the criterion always holds. (End)

Examples

			  1 3 9  20  39  75  148   297   597   1196
   2 6 11  19  36  73   149   300   599
    4 5   8  17  37  76   151    299
     1  3   9  20  39   75    148   <-- the starting sequence
		

Crossrefs

Cf. A024493, A130781, A069705 (inverse binomial transform assuming offset 0).
For many similar sequences, see the Index link.

Programs

  • Mathematica
    d = Differences; i = Intersection; sol = Solve[d@ d@ d@ Array[x, 50] == Array[x, 47], Array[x, 47, 4]][[1]]; a = (Array[x, 50] /. sol) /. {x[1] -> 1, x[2] -> 3, x[3] -> 9}; Print["Check = ", {i[a, d@ a], i[a, d@ d@ a], i[d@ a, d@ d@ a]}]; a (* Giovanni Resta, Jun 21 2016 *)
  • PARI
    first(n) = {n = max(n, 4); my(res = vector(n)); for(i = 1, 3, res[i] = 3^(i - 1)); for(i = 4, n, res[i] = 3 * res[i - 1] - 3 * res[i - 2] + 2 * res[i - 3]); res } \\ David A. Corneth, Jan 11 2019
    
  • PARI
    Vec(x*(1 + 3*x^2) / ((1 - 2*x)*(1 - x + x^2)) + O(x^40)) \\ Colin Barker, Jan 12 2019

Formula

From Colin Barker, Jan 11 2019: (Start)
G.f.: x*(1 + 3*x^2) / ((1 - 2*x)*(1 - x + x^2)).
a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3) for n>2. (End)
a(n) = Sum_{k=0..n-1} binomial(n-1,k)*(2^k mod 7). - Fabio Visonà, Sep 05 2023

Extensions

a(18)-a(33) from Giovanni Resta, Jun 21 2016
Previous Showing 21-30 of 33 results. Next