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-10 of 16 results. Next

A131708 A024494 prefixed by a 0.

Original entry on oeis.org

0, 1, 2, 3, 5, 10, 21, 43, 86, 171, 341, 682, 1365, 2731, 5462, 10923, 21845, 43690, 87381, 174763, 349526, 699051, 1398101, 2796202, 5592405, 11184811, 22369622, 44739243, 89478485, 178956970, 357913941, 715827883, 1431655766, 2863311531, 5726623061, 11453246122
Offset: 0

Views

Author

Paul Curtz, Sep 14 2007, Mar 01 2008

Keywords

Comments

Binomial transform of 0, 1, 0. Also A024495 = first differences.
Recurrence: a(n+1) - 2*a(n) = 1, 0, -1, -1, 0, 1, 1.
{A024493, A131708, A024495} is the difference analog of the hyperbolic functions {h_1(x), h_2(x), h_3(x)} of order 3. For the definitions of {h_i(x)} and the difference analog {H_i(n)} see [Erdelyi] and the Shevelev link respectively. - Vladimir Shevelev, Aug 01 2017

References

  • A. Erdelyi, Higher Transcendental Functions, McGraw-Hill, 1955, Vol. 3, Chapter XVIII.

Crossrefs

Programs

  • Magma
    [n le 3 select n-1 else 3*Self(n-1) -3*Self(n-2) +2*Self(n-3): n in [1..40]]; // G. C. Greubel, Jan 23 2023
    
  • Mathematica
    LinearRecurrence[{3,-3,2}, {0,1,2}, 40] (* Harvey P. Dale, Nov 27 2013 *)
  • PARI
    v=vector(99,i,i);for(i=4,#v,v[i]=3*v[i-1]-3*v[i-2]+2*v[i-3]);v \\ Charles R Greathouse IV, Jun 01 2011
    
  • SageMath
    def A131708(n): return (1/3)*(2^n -chebyshev_U(n,1/2) +2*chebyshev_U(n-1,1/2))
    [A131708(n) for n in range(41)] # G. C. Greubel, Jan 23 2023

Formula

G.f.: x*(1-x)/((1-2*x)*(1-x+x^2)). - R. J. Mathar, Nov 14 2007
Recurrences:
a(n) = k*a(n-1) + (6-3*k)*a(n-2) + (3*k-7)*a(n-3) + (6-2*k)*a(n-4).
k = 0: a(n) = 6*a(n-2) - 7*a(n-3) + 6*a(n-4).
k = 1: a(n) = a(n-1) + 3*a(n-2) - 4*a(n-3) + 4*a(n-4).
k = 2: a(n) = 2*a(n-1) - a(n-3) + 2*a(n-4), cf. A113405, A135350.
k = 3: a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3), this sequence.
k = 4: a(n) = 4*a(n-1) - 6*a(n-2) + 5*a(n-3) - 2*a(n-4), cf. A111927.
k = 5: a(n) = 5*a(n-1) - 9*a(n-2) + 8*a(n-3) - 4*a(n-4), cf. A137221.
The sum of coefficients = 5 - k. Of the family k=3 gives the best recurrence.
a(n+m) = a(n)*A024493(m) + A024493(n)*a(m) + A024495(n)*A024495(m). - Vladimir Shevelev, Aug 01 2017
From Kevin Ryde, Sep 24 2020: (Start)
a(n) = (1/3)*2^n - (1/3)*cos((1/3)*Pi*n) + (1/sqrt(3))*sin((1/3)*Pi*n). [Cournot]
a(n) + A024495(n) + A111927(n) = 2^n - 1. [Cournot, page 96 last formula, but misprint should be 2^x - 1 rather than 2^p - 1]. (End)
a(n) = C(n,1) + C(n,4) + ... + C(n, 3*floor(n/3)+1). - Jianing Song, Oct 04 2021
E.g.f.: exp(x/2)*(exp(3*x/2) - cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2))/3. - Stefano Spezia, Feb 06 2025

A132397 Second trisection of A024494.

Original entry on oeis.org

2, 10, 86, 682, 5462, 43690, 349526, 2796202, 22369622, 178956970, 1431655766, 11453246122, 91625968982, 733007751850, 5864062014806, 46912496118442, 375299968947542, 3002399751580330, 24019198012642646, 192153584101141162
Offset: 0

Views

Author

Paul Curtz, Nov 20 2007

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[2(2x-1)/((x+1)(8x-1)),{x,0,30}],x] (* or *) LinearRecurrence[{7,8},{2,10},30] (* Harvey P. Dale, Oct 14 2015 *)
  • PARI
    Vec(2*(1 - 2*x) / ((1 + x)*(1 - 8*x)) + O(x^20)) \\ Colin Barker, Jun 05 2020

Formula

O.g.f.: 2(2x-1)/((x+1)(8x-1)). a(n) = 2*A082311(n). - R. J. Mathar, Jan 13 2008
a(0)=2, a(1)=10, a(n) = 7*a(n-1)+8*a(n-2). - Harvey P. Dale, Oct 14 2015
From Oboifeng Dira, Jun 05 2020: (Start)
a(n) = A078008(3*n+2). Third trisection of A078008.
a(n) = Sum_{k=0..n} binomial(3*n+2,3*k+1).
(End)
a(n) = 2*((-1)^n + 2^(1+3*n)) / 3 for n>1. - Colin Barker, Jun 05 2020

Extensions

More terms from R. J. Mathar, Jan 13 2008

A024495 a(n) = C(n,2) + C(n,5) + ... + C(n, 3*floor(n/3)+2).

Original entry on oeis.org

0, 0, 1, 3, 6, 11, 21, 42, 85, 171, 342, 683, 1365, 2730, 5461, 10923, 21846, 43691, 87381, 174762, 349525, 699051, 1398102, 2796203, 5592405, 11184810, 22369621, 44739243, 89478486, 178956971, 357913941, 715827882, 1431655765, 2863311531, 5726623062
Offset: 0

Views

Author

Keywords

Comments

Trisections give A082365, A132804, A132805. - Paul Curtz, Nov 18 2007
If the offset is changed to 1, this is the maximal number of closed regions bounded by straight lines after n straight line cuts in a plane: a(n) = a(n-1) + n - 3, a(1)=0; a(2)=0; a(3)=1; and so on. - Srikanth K S, Jan 23 2008
M^n * [1,0,0] = [A024493(n), a(n), A024494(n)]; where M = a 3x3 matrix [1,1,0; 0,1,1; 1,0,1]. Sum of terms = 2^n. Example: M^5 * [1,0,0] = [11, 11, 10], sum = 2^5 = 32. - Gary W. Adamson, Mar 13 2009
For n>=1, a(n-1) is the number of generalized compositions of n when there are i^2/2 - 3*i/2 + 1 different types of i, (i=1,2,...). - Milan Janjic, Sep 24 2010
Let M be any endomorphism on any vector space, such that M^3 = 1 (identity). Then (1+M)^n = A024493(n) + A024494(n)*M + a(n)*M^2. - Stanislav Sykora, Jun 10 2012
{A024493, A131708, A024495} is the difference analog of the hyperbolic functions {h_1(x), h_2(x), h_3(x)} of order 3. For the definitions of {h_i(x)} and the difference analog {H_i(n)} see [Erdelyi] and the Shevelev link respectively. - Vladimir Shevelev, Aug 01 2017
This is the p-INVERT of (1,1,1,1,1,...) for p(S) = 1 - S^3; see A291000. - Clark Kimberling, Aug 24 2017

References

  • A. Erdelyi, Higher Transcendental Functions, McGraw-Hill, 1955, Vol. 3, Chapter XVIII.
  • D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 1, 2nd. ed., Problem 38, p. 70.

Crossrefs

Sequences of the form 1/((1-x)^m - x^m): A000079 (m=1,2), this sequence (m=3), A000749 (m=4), A049016 (m=5), A192080 (m=6), A049017 (m=7), A290995 (m=8), A306939 (m=9).

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 30); [0,0] cat Coefficients(R!( x^2/((1-x)^3-x^3) )); // G. C. Greubel, Apr 11 2023
    
  • Maple
    a:= proc(n) option remember; `if`(n=0, 0, 2*a(n-1)+
          [-1, 0, 1, 1, 0, -1, -1][1+(n mod 6)])
        end:
    seq(a(n), n=0..33); # Paul Weisenhorn, May 17 2020
  • Mathematica
    LinearRecurrence[{3,-3,2},{0,0,1},40] (* Harvey P. Dale, Sep 20 2016 *)
  • PARI
    a(n) = sum(k=0,n\3,binomial(n,3*k+2)) /* Michael Somos, Feb 14 2006 */
    
  • PARI
    a(n)=if(n<0, 0, ([1,0,1;1,1,0;0,1,1]^n)[3,1]) /* Michael Somos, Feb 14 2006 */
    
  • SageMath
    def A024495(n): return (2^n - chebyshev_U(n, 1/2) - chebyshev_U(n-1, 1/2))/3
    [A024495(n) for n in range(41)] # G. C. Greubel, Apr 11 2023

Formula

a(n) = ( 2^n + 2*cos((n-4)*Pi/3) )/3 = (2^n - A057079(n))/3.
a(n) = 2*a(n-1) + A010892(n-2) = a(n-1) + A024494(n-1). With initial zero, binomial transform of A011655 which is effectively A010892 unsigned. - Henry Bottomley, Jun 04 2001
a(2) = 1, a(3) = 3, a(n+2) = a(n+1) - a(n) + 2^n. - Benoit Cloitre, Sep 04 2002
a(n) = Sum_{k=0..n} 2^k*2*sin(Pi*(n-k)/3 + Pi/3)/sqrt(3) (offset 0). - Paul Barry, May 18 2004
G.f.: x^2/((1-x)^3 - x^3) = x^2 / ( (1-2*x)*(1-x+x^2) ).
a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3). - Paul Curtz, Nov 18 2007
a(n) + A024493(n-1) = A131577(n). - Paul Curtz, Jan 24 2008
From Paul Curtz, May 29 2011: (Start)
a(n) + a(n+3) = 3*2^n = A007283(n).
a(n+6) - a(n) = 21*2^n = A175805(n).
a(n) + a(n+9) = 171*2^n.
a(n+12) - a(n) = 1365*2^n. (End)
a(n) = A113405(n) + A113405(n+1). - Paul Curtz, Jun 05 2011
Start with x(0)=1, y(0)=0, z(0)=0 and set x(n+1) = x(n) + z(n), y(n+1) = y(n) + x(n), z(n+1) = z(n) + y(n). Then a(n) = z(n). - Stanislav Sykora, Jun 10 2012
G.f.: -x^2/( x^3 - 1 + 3*x/Q(0) ) where Q(k) = 1 + k*(x+1) + 3*x - x*(k+1)*(k+4)/Q(k+1) ; (continued fraction). - Sergei N. Gladkovskii, Mar 15 2013
a(n) = 1/18*(-4*(-1)^floor((n - 1)/3) - 6*(-1)^floor(n/3) - 3*(-1)^floor((n + 1)/3) + (-1)^(1 + floor((n + 2)/3)) + 3*2^(n + 1)). - John M. Campbell, Dec 23 2016
a(n) = (1/63)*(-40 + 21*2^n - 42*floor(n/6) + 32*floor((n+3)/6) + 16*floor((n+ 4)/6) - 24*floor((n+5)/6) - 22*floor((n+7)/6) + 21*floor((n+8)/6) + 10*floor((n+9)/6) + 5*floor((n+10)/6) + 3*floor((n+11)/6) + floor((n+ 13)/6)). - John M. Campbell, Dec 24 2016
a(n+m) = a(n)*A024493(m) + A131708(n)*A131708(m) + A024493(n)*a(m). - Vladimir Shevelev, Aug 01 2017
From Kevin Ryde, Sep 24 2020: (Start)
a(n) = (1/3)*2^n - (1/3)*cos((1/3)*Pi*n) - (1/sqrt(3))*sin((1/3)*Pi*n). [Cournot]
a(n) + A111927(n) + A131708(n) = 2^n - 1. [Cournot, page 96 last formula, but misprint should be 2^x - 1 rather than 2^p - 1] (End)
E.g.f.: (exp(2*x) - exp(x/2)*(cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2)))/3. - Stefano Spezia, Feb 06 2025

A024718 a(n) = (1/2)*(1 + Sum_{k=0..n} binomial(2*k, k)).

Original entry on oeis.org

1, 2, 5, 15, 50, 176, 638, 2354, 8789, 33099, 125477, 478193, 1830271, 7030571, 27088871, 104647631, 405187826, 1571990936, 6109558586, 23782190486, 92705454896, 361834392116, 1413883873976, 5530599237776, 21654401079326, 84859704298202, 332818970772254
Offset: 0

Views

Author

Keywords

Comments

Total number of leaves in all rooted ordered trees with at most n edges. - Michael Somos, Feb 14 2006
Also: Number of UH-free Schroeder paths of semilength n with horizontal steps only at level less than two [see Yan]. - R. J. Mathar, May 24 2008
Hankel transform is A010892. - Paul Barry, Apr 28 2009
Binomial transform of A005773. - Philippe Deléham, Dec 13 2009
Number of vertices all of whose children are leaves in all ordered trees with n+1 edges. Example: a(3) = 15; for an explanation see David Callan's comment in A001519. - Emeric Deutsch, Feb 12 2015

Examples

			G.f. = 1 + 2*x + 5*x^2 + 15*x^3 + 50*x^4 + 176*x^5 + 638*x^6 + ...
		

Crossrefs

Partial sums of A088218.
Bisection of A086905.
Second column of triangle A102541.

Programs

  • Maple
    A024718 := n -> (binomial(2*n, n)*hypergeom([1, -n], [1/2 - n], 1/4) + 1)/2:
    seq(simplify(A024718(n)), n = 0..26); # Peter Luschny, Dec 15 2024
  • Mathematica
    Table[Sum[Binomial[2k-1,k-1],{k,0,n}],{n,0,100}] (* Emanuele Munarini, May 18 2018 *)
  • PARI
    a(n) = (1 + sum(k=0, n, binomial(2*k, k)))/2; \\ Michel Marcus, May 18 2018

Formula

a(n) = A079309(n) + 1.
G.f.: 1/((1 - x)*(2 - C)), where C = g.f. for the Catalan numbers A000108. - N. J. A. Sloane, Aug 30 2002
Given g.f. A(x), then x * A(x - x^2) is the g.f. of A024494. - Michael Somos, Feb 14 2006
G.f.: (1 + 1 / sqrt(1 - 4*x)) / (2 - 2*x). - Michael Somos, Feb 14 2006
D-finite with recurrence: n*a(n) - (5*n-2)*a(n-1) + 2*(2*n-1)*a(n-2) = 0. - R. J. Mathar, Dec 02 2012
Remark: The above recurrence is true (it can be easily proved by differentiating the generating function). Notice that it is the same recurrence satisfied by the partial sums of the central binomial coefficients (A006134). - Emanuele Munarini, May 18 2018
0 = a(n)*(16*a(n+1) - 22*a(n+2) + 6*a(n+3)) + a(n+1)*(-18*a(n+1) + 27*a(n+2) - 7*a(n+3)) + a(n+2)*(-3*a(n+2) + a(n+3)) for all n in Z if a(n) = 1/2 for n < 0. - Michael Somos, Apr 23 2014
a(n) = ((1 - I/sqrt(3))/2 - binomial(2*n+1, n)*hypergeom([n+3/2, 1], [n+2], 4)). - Peter Luschny, May 18 2018
a(n) = [x^n] 1/((1-x+x^2) * (1-x)^n). - Seiichi Manyama, Apr 06 2024

Extensions

Name edited by Petros Hadjicostas, Aug 04 2020

A024493 a(n) = C(n,0) + C(n,3) + ... + C(n,3[n/3]).

Original entry on oeis.org

1, 1, 1, 2, 5, 11, 22, 43, 85, 170, 341, 683, 1366, 2731, 5461, 10922, 21845, 43691, 87382, 174763, 349525, 699050, 1398101, 2796203, 5592406, 11184811, 22369621, 44739242, 89478485, 178956971, 357913942, 715827883, 1431655765, 2863311530
Offset: 0

Views

Author

Keywords

Comments

First differences of A131708. First differences give A024495. - Paul Curtz, Nov 18 2007
a(n) = upper left term of X^n, where X = the 4 X 4 matrix [1,0,1,0; 1,1,0,0; 0,1,1,1; 0,0,0,1]. - Gary W. Adamson, Mar 01 2008
M^n * [1,0,0] = [a(n), A024495(n), A024494(n)], where M = a 3 X 3 matrix [1,1,0; 0,1,1; 1,0,1]. Sum of terms = 2^n. Example: M^5 * [1,0,0] = [11, 11, 10], sum = 2^5 = 32. - Gary W. Adamson, Mar 13 2009
Let M be any endomorphism on any vector space, such that M^3 = 1 (identity). Then (1+M)^n = a(n) + A024494(n)*M + A024495(n)*M^2. - Stanislav Sykora, Jun 10 2012
Counts closed walks of length (n) at the vertices of a unidirectional triangle, containing a loop at each vertex. - David Neil McGrath, Sep 15 2014
{A024493, A131708, A024495} is the difference analog of the hyperbolic functions of order 3, {h_1(x), h_2(x), h_3(x)}. For a definition see the reference "Higher Transcendental Functions" and the Shevelev link. - Vladimir Shevelev, Jun 08 2017

References

  • D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 1, 2nd. ed., Problem 38, p. 70.
  • Higher Transcendental Functions, Bateman Manuscript Project, Vol. 3, ed. A. Erdelyi, 1983 (chapter XVIII).

Crossrefs

Row sums of A098172.
Cf. A024494, A094715, A094717, A079978 (inverse binomial transform).

Programs

  • Magma
    I:=[1,1,1]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+2*Self(n-3): n in [1..50]]; // Vincenzo Librandi, Jun 12 2017
  • Maple
    A024493_list := proc(n) local i; series((exp(2*z)+2*cos(z*sqrt(3/4))*exp(z/2)) /3,z,n+2): seq(i!*coeff(%,z,i),i=0..n) end: A024493_list(33); # Peter Luschny, Jul 10 2012
    seq((3*(-1)^(floor((n+1)/3))+(-1)^n+2^(n+1))/6, n=0..33); # Peter Luschny, Jun 14 2017
  • Mathematica
    nn = 18; a = Sum[x^(3 i)/(3 i)!, {i, 0, nn}]; b = Exp[x];Range[0, nn]! CoefficientList[Series[a b , {x, 0, nn}], x]  (* Geoffrey Critzer, Dec 27 2011 *)
    Differences[LinearRecurrence[{3,-3,2},{0,1,2},40]] (* Harvey P. Dale, Nov 27 2013 *)
  • PARI
    a(n)=sum(i=0,n,sum(j=0,n,if(n-i-3*j,0,n!/(i)!/(3*j)!)))
    
  • PARI
    a(n)=sum(k=0,n\3,binomial(n,3*k)) /* Michael Somos, Feb 14 2006 */
    
  • PARI
    a(n)=if(n<0, 0, ([1,0,1;1,1,0;0,1,1]^n)[1,1]) /* Michael Somos, Feb 14 2006 */
    

Formula

a(n) = (1/3)*(2^n+2*cos( n*Pi/3 )).
G.f.: (1-x)^2/((1-2*x)*(1-x+x^2)) = (1-2*x+x^2)/(1-3*x+3*x^2-2*x^3). - Paul Barry, Feb 11 2004
a(n) = (1/3)*(2^n+b(n)) where b(n) is the 6-periodic sequence {2, 1, -1, -2, -1, 1}. - Benoit Cloitre, May 23 2004
Binomial transform of 1/(1-x^3). G.f.: (1-x)^2/((1-x)^3-x^3) = x/(1-x-2*x^2)+1/(1+x^3); a(n) = Sum_{k=0..floor(n/3)} binomial(n, 3*k); a(n) = Sum_{k=0..n} binomial(n,k)*(cos(2*Pi*k/3+Pi/3)/3+sin(2*Pi*k/3+Pi/3)/sqrt(3)+1/3); a(n) = A001045(n)+sqrt(3)*cos(Pi*n/3+Pi/6)/3+sin(Pi*n/3+Pi*/6)/3+(-1)^n/3. - Paul Barry, Jul 25 2004
a(n) = Sum_{k=0..n} binomial(n, 3*(n-k)). - Paul Barry, Aug 30 2004
G.f.: ((1-x)*(1-x^2)*(1-x^3))/((1-x^6)*(1-2*x)). - Michael Somos, Feb 14 2006
a(n+1)-2a(n) = -A010892(n). - Michael Somos, Feb 14 2006
E.g.f.: exp(x)*A(x) where A(x) is the e.g.f. for A079978. - Geoffrey Critzer, Dec 27 2011
Start with x(0)=1, y(0)=0, z(0)=0 and set x(n+1) = x(n) + z(n), y(n+1) = y(n) + x(n), z(n+1) = z(n) + y(n). Then a(n) = x(n). - Stanislav Sykora, Jun 10 2012
E.g.f.: (exp(2*z)+2*cos(z*sqrt(3/4))*exp(z/2))/3. - Peter Luschny, Jul 10 2012
Recurrence: a(0) = 1, a(1) = 1, a(2) = 1, a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3). - Christopher Hunt Gribble, Mar 25 2014
a(m+k) = a(m)*a(k) + A131708(m)*A024495(k) + A024495(m)*A131708(k). - Vladimir Shevelev, Jun 08 2017

A038503 Sum of every 4th entry of row n in Pascal's triangle, starting at "n choose 0".

Original entry on oeis.org

1, 1, 1, 1, 2, 6, 16, 36, 72, 136, 256, 496, 992, 2016, 4096, 8256, 16512, 32896, 65536, 130816, 261632, 523776, 1048576, 2098176, 4196352, 8390656, 16777216, 33550336, 67100672, 134209536, 268435456, 536887296, 1073774592, 2147516416, 4294967296, 8589869056, 17179738112
Offset: 0

Views

Author

Keywords

Comments

Number of strings over Z_2 of length n with trace 0 and subtrace 0.
Same as number of strings over GF(2) of length n with trace 0 and subtrace 0.
M^n = [1,0,0,0] = [a(n), A000749(n), A038505(n), A038504(n)]; where M = the 4 X 4 matrix [1,1,0,0; 0,1,1,0; 0,0,1,1; 1,0,0,1]. Sum of the 4 terms = 2^n. Example: M^6 = [16, 20, 16, 12], sum of terms = 64 = 2^6. - Gary W. Adamson, Mar 13 2009
a(n) is the number of generalized compositions of n when there are i^2/2 - 5i/2 + 3 different types of i, (i=1,2,...). - Milan Janjic, Sep 24 2010
{A038503, A038504, A038505, A000749} is the difference analog of the hyperbolic functions {h_1(x), h_2(x), h_3(x), h_4(x)} of order 4. For the definitions of {h_i(x)} and the difference analog {H_i (n)} see [Erdelyi] and the Shevelev link respectively. - Vladimir Shevelev, Aug 01 2017

Examples

			a(3;0,0)=1 since the one binary string of trace 0, subtrace 0 and length 3 is { 000 }.
		

References

  • A. Erdelyi, Higher Transcendental Functions, McGraw-Hill, 1955, Vol. 3, Chapter XVIII.
  • D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 1, 2nd ed., Problem 38, p. 70, gives an explicit formula for the sum.

Crossrefs

Programs

  • Maple
    A038503_list := proc(n) local i; series(exp(z)*(cosh(z)+cos(z))/2,z,n+2):
    seq(i!*coeff(%,z,i),i=0..n) end: A038503_list(32); # Peter Luschny, Jul 10 2012
    a := n -> hypergeom([1/4 - n/4, 1/2 - n/4, 3/4 - n/4, -n/4], [1/4, 1/2, 3/4], 1):
    seq(simplify(a(n)), n = 0..36); # Peter Luschny, Mar 18 2023
  • Mathematica
    nn = 18; a = Sum[x^(4 i)/(4 i)!, {i, 0, nn}]; b = Exp[x];Range[0, nn]! CoefficientList[Series[a b, {x, 0, nn}], x]  (* Geoffrey Critzer, Dec 27 2011 *)
    Join[{1},LinearRecurrence[{4,-6,4},{1,1,1},40]] (* Harvey P. Dale, Dec 02 2014 *)
  • PARI
    a(n) = sum(k=0, n\4, binomial(n, 4*k)); \\ Michel Marcus, Mar 13 2019

Formula

From Paul Barry, Mar 18 2004: (Start)
G.f.: (1-x)^3/((1-x)^4-x^4);
a(n) = Sum_{k=0..floor(n/4)} binomial(n, 4k); a(n) = 2^(n-1) + 2^((n-2)/2)(cos(Pi*n/4) - sin(Pi*n/4)). (End)
Binomial transform of 1/(1-x^4). a(n) = 4a(n-1) - 6a(n-2) + 4a(n-3); a(n) = Sum_{k=0..n} binomial(n, k)(sin(Pi*(k+1)/2)/2 + (1+(-1)^k)/4); a(n) = Sum_{k=0..floor(n/4)} binomial(n, 4k). - Paul Barry, Jul 25 2004
a(n) = Sum_{k=0..n} binomial(n, 4(n-k)). - Paul Barry, Aug 30 2004
a(n) = Sum_{k=0..floor(n/2)} binomial(n, 2k)(1+(-1)^k)/2. - Paul Barry, Nov 29 2004
a(n; t, s) = a(n-1; t, s) + a(n-1; t+1, s+t+1) where t is the trace and s is the subtrace.
E.g.f.: exp(z)*(cosh(z) + cos(z))/2. - Peter Luschny, Jul 10 2012
From Vladimir Shevelev, Aug 01 2017: (Start)
For n >= 1, {H_i(n)} are linearly dependent sequences: a(n) = H_1(n) = H_2(n) - H_3(n) + H_4(n);
a(n+m) = a(n)*a(m) + H_4(n)*H_2(m) + H_3(n)*H_3(m) + H_2(n)*H_4(m), where H_2 = A038504, H_3 = A038505, H_4 = A000749.
For proofs, see Shevelev's link, Theorems 2, 3. (End)
a(n) = hypergeom([1/4 - n/4, 1/2 - n/4, 3/4 - n/4, -n/4], [1/4, 1/2, 3/4], 1). - Peter Luschny, Mar 18 2023

A139398 a(n) = Sum_{k >= 0} binomial(n,5*k).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 7, 22, 57, 127, 254, 474, 859, 1574, 3004, 6008, 12393, 25773, 53143, 107883, 215766, 427351, 843756, 1669801, 3321891, 6643782, 13333932, 26789257, 53774932, 107746282, 215492564, 430470899, 859595529, 1717012749, 3431847189, 6863694378
Offset: 0

Views

Author

N. J. A. Sloane, Jun 13 2008

Keywords

Comments

From Gary W. Adamson, Mar 13 2009: (Start)
M^n * [1,0,0,0,0] = [a(n), A139761(n), A139748(n), A139714(n), A133476(n)]
where M = the 5 X 5 matrix [1,1,0,0,0; 0,1,1,0,0; 0,0,1,1,0; 0,0,0,1,1; 1,0,0,0,1]
Sum of terms = 2^n. Example: M^6 * [1,0,0,0,0] = [7, 15, 20, 15, 7]; sum = 2^6 = 64. (End)
{A139398, A133476, A139714, A139748, A139761} is the difference analog of the hyperbolic functions of order 5, {h_1(x), h_2(x), h_3(x), h_4(x), h_5 (x)}. For a definition see the reference "Higher Transcendental Functions" and the Shevelev link. - Vladimir Shevelev, Jun 14 2017

References

  • A. Erdelyi, Higher Transcendental Functions, McGraw-Hill, 1955, Vol. 3, Ch. 18.

Crossrefs

Programs

  • Magma
    [n le 5 select 1 else 5*Self(n-1)-10*Self(n-2)+10*Self(n-3)-5*Self(n-4)+2*Self(n-5): n in [1..40]]; // Vincenzo Librandi, Jun 27 2017
  • Maple
    f:=(n,r,a) -> add(binomial(n,r*k+a),k=0..n); fs:=(r,a)->[seq(f(n,r,a),n=0..40)];
    A139398_list := proc(n) local i; (exp(z)^2+2*exp(3/4*z+1/4*z*sqrt(5))* cos(1/4*z*sqrt(2)*sqrt(5+sqrt(5)))+2*exp(3/4*z-1/4*z*sqrt(5))* cos(1/4*z*sqrt(2)*sqrt(5-sqrt(5))))/5; series(%,z,n+2): seq(simplify(i!*coeff(%,z,i)), i=0..n) end: A139398_list(35); # Peter Luschny, Jul 10 2012
  • Mathematica
    LinearRecurrence[{5,-10,10,-5,2},{1,1,1,1,1},40] (* Harvey P. Dale, Jun 11 2015 *)
    Expand@Table[(2^n + Sqrt[5] (Cos[Pi n/5] - (-1)^n Cos[2 Pi n/5]) Fibonacci[n] + (Cos[Pi n/5] + (-1)^n Cos[2 Pi n/5]) LucasL[n])/5, {n, 0, 20}] (* Vladimir Reshetnikov, Oct 04 2016 *)

Formula

G.f.: -(x-1)^4/((2*x-1)*(x^4-2*x^3+4*x^2-3*x+1)). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 12 2009
E.g.f.: (exp(z)^2+2*exp(3/4*z+1/4*z*sqrt(5))*cos(1/4*z*sqrt(2)*sqrt(5+sqrt(5)))+ 2*exp(3/4*z-1/4*z*sqrt(5))*cos(1/4*z*sqrt(2)*sqrt(5-sqrt(5))))/5. - Peter Luschny, Jul 10 2012
a(n) = (2^n + sqrt(5)*(cos(Pi*n/5) - (-1)^n*cos(2*Pi*n/5))*A000045(n) + (cos(Pi*n/5) + (-1)^n*cos(2*Pi*n/5))*A000032(n))/5. - Vladimir Reshetnikov, Oct 04 2016
From Vladimir Shevelev, Jun 17 2017: (Start)
a(n) = round((2/5)*(2^(n-1) + phi^n*cos(Pi*n/5))), where phi is the golden ratio and round(x) is the integer nearest to x.
The formula follows from the identity a(n)=1/5*Sum_{j=1..5}((omega_5)^j + 1)^n, where omega_5=exp(2*Pi*i)/5 (cf. Theorem 1 of [Shevelev] link for i=1, n=5, m:=n). Further note that for a=cos(x)+i*sin(x), a+1 = 2*cos ^2 (x/2) + i*sin(x), and for the argument y of a+1 we have tan(y)=tan(x/2) and r^2 = 4*cos^4(x/2) + sin^2(x) = 4*cos^2(x/2). So (a+1)^n = (2*cos(x /2))^n*(cos(n*x/2) + i*sin(n*x/2)). Using this, for x=2*Pi/5, we have (omega_5+1)^n = phi^n(cos(Pi*n/5) + i*sin(Pi*n/5)). Since (omega_5)^4+1=(1+omega_5)/omega_5, we easily find that ((omega_5)^4+1)^n is conjugate to (omega_5+1)^n. So (omega_5+1)^n+((omega_5)^4+1)^n = phi^n*cos(Pi*n/5). Further, we similarly obtain that (omega_5)^2+1 is conjugate to (omega_5) ^3+1=(1+(omega_5)^2)/(omega_5)^2 and ((omega_5)^2+1)^n +((omega_5)^3+1)^n = 2*(sqrt(2-phi))^n*cos(2*Pi*n/5). The absolute value of the latter <= 2*(2-phi)^(n/2) and quickly tends to 0. Finally, ((omega_5)^5+1)^n=2^n, and the formula follows. (End)
a(n+m) = a(n)*a(m) + H_2(n)*H_5(m) + H_3(n)*H_4(m) + H_4(n)*H_3(m) + H_5(n)*H_2(m), where H_2=A133476, H_3=A139714, H_4=A139748, H_5=A139761. - Vladimir Shevelev, Jun 17 2017

A082311 A Jacobsthal sequence trisection.

Original entry on oeis.org

1, 5, 43, 341, 2731, 21845, 174763, 1398101, 11184811, 89478485, 715827883, 5726623061, 45812984491, 366503875925, 2932031007403, 23456248059221, 187649984473771, 1501199875790165, 12009599006321323, 96076792050570581, 768614336404564651, 6148914691236517205
Offset: 0

Views

Author

Paul Barry, Apr 09 2003

Keywords

Crossrefs

Programs

  • Magma
    [2*8^n/3+(-1)^n/3 : n in [0..30]]; // Vincenzo Librandi, Aug 13 2011
    
  • Mathematica
    f[n_] := (2*8^n + (-1)^n)/3; Array[f, 25, 0] (* Robert G. Wilson v, Aug 13 2011 *)
  • PARI
    x='x+O('x^30); Vec((1-2*x)/((1+x)*(1-8*x))) \\ G. C. Greubel, Sep 16 2018

Formula

a(n) = (2*8^n + (-1)^n)/3 = A001045(3*n+1).
From R. J. Mathar, Feb 23 2009: (Start)
a(n) = 7*a(n-1) + 8*a(n-2).
G.f.: (1-2*x)/((1+x)*(1-8*x)). (End)
a(n) = A024494(3*n+1). a(n) = 8*a(n-1) + 3*(-1)^n. Sum of digits = A070366. - Paul Curtz, Nov 20 2007
a(n)= A007613(n) + A132805(n) = A081374(1+3*n). - Paul Curtz, Jun 06 2011
E.g.f.: (cosh(x) + 2*cosh(8*x) - sinh(x) + 2*sinh(8*x))/3. - Stefano Spezia, Jul 15 2024

A130781 Sequence is identical to its third differences: a(n+3) = 3*a(n+2) - 3*a(n+1) + 2*a(n), with a(0)=a(1)=1, a(2)=2.

Original entry on oeis.org

1, 1, 2, 5, 11, 22, 43, 85, 170, 341, 683, 1366, 2731, 5461, 10922, 21845, 43691, 87382, 174763, 349525, 699050, 1398101, 2796203, 5592406, 11184811, 22369621, 44739242, 89478485, 178956971, 357913942, 715827883, 1431655765, 2863311530
Offset: 0

Views

Author

Paul Curtz, Jul 14 2007, Jul 18 2007

Keywords

Comments

The inverse binomial transform is 1,0,1,... repeated with period 3, essentially A011655. - R. J. Mathar, Aug 28 2023

Crossrefs

Essentially a duplicate of A024493.

Programs

  • Mathematica
    a[n_] := a[n] = 3 a[n - 1] - 3 a[n - 2] + 2 a[n - 3]; a[0] = a[1] = 1; a[2] = 2; Table[a@n, {n, 0, 33}] (* Or *)
    CoefficientList[ Series[(1 - 2 x + 2 x^2)/(1 - 3 x + 3 x^2 - 2 x^3), {x, 0, 33}], x] (* Robert G. Wilson v, Sep 08 2007 *)
    LinearRecurrence[{3,-3,2},{1,1,2},40] (* Harvey P. Dale, Sep 17 2013 *)

Formula

3*a(n) = 2^(n+1) + A087204(n+1).
Also first differences of A024494.
G.f.: (1-2x+2x^2)/(1-3x+3x^2-2x^3).
Binomial transform of [1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, ...]; i.e., ones in positions 2, 5, 8, 11, ... and the rest zeros. [Corrected by Gary W. Adamson, Jan 07 2008]

Extensions

Edited by N. J. A. Sloane, Jul 28 2007

A091917 Coefficient array of polynomials (z-1)^n-1.

Original entry on oeis.org

1, -2, 1, 0, -2, 1, -2, 3, -3, 1, 0, -4, 6, -4, 1, -2, 5, -10, 10, -5, 1, 0, -6, 15, -20, 15, -6, 1, -2, 7, -21, 35, -35, 21, -7, 1, 0, -8, 28, -56, 70, -56, 28, -8, 1, -2, 9, -36, 84, -126, 126, -84, 36, -9, 1, 0, -10, 45, -120, 210, -252, 210, -120, 45, -10, 1, -2, 11, -55, 165, -330, 462, -462, 330, -165, 55, -11, 1
Offset: 0

Views

Author

Paul Barry, Feb 13 2004

Keywords

Comments

The first element has been changed to 1 to produce an invertible matrix. Alternatively, this is the coefficient array for the polynomials P(z,n) = Product_{j=0..n-1} (z-(1+w(n)^j)) where w(n) = e^(2*Pi*i/n), i=sqrt(-1).
The row entries determine interesting recurrences. For instance, a(n) = 4a(n-1) + 6a(n-2) + 4a(n-3), a(0)=a(1)=a(2)=1, gives A038503. Sequences of the form a(n) = Sum_{k=0..n} (binomial(n,k) if k mod m = r, otherwise 0), for r=0..m-1, result. Equivalently, a(n) = Sum_{j=0..n-1} 2^n*(cos(Pi*j/m))^n*cos((n-2r)Pi*j/m)/m, r=0..m-1. These include A024493, A024494, A024495, A038503, A038504, A038505. The inverse matrix is A091918.
Triangle T(n,k), 0 <= k <= n, read by rows given by [ -2, 2, 1/2, -1/2, 0, 0, 0, 0, 0, ...] DELTA [1, 0, -1/2, 1/2, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938. - Philippe Deléham, Oct 11 2007

Examples

			Rows begin:
  { 1},
  {-2,  1},
  { 0, -2,  1},
  {-2,  3, -3,  1},
  { 0, -4,  6, -4,  1},
  ...
		

Programs

  • Maple
    T:= n-> `if`(n=0, 1, (p-> seq(coeff(p,z,i), i=0..n))((z-1)^n-1)):
    seq(T(n), n=0..12);  # Alois P. Heinz, May 23 2015
  • Mathematica
    Table[If[n == 0, 1, CoefficientList[(z-1)^n-1, z]], {n, 0, 12}] // Flatten (* Jean-François Alcover, Apr 08 2016 *)
  • PARI
    row(n) = if (n==0, 1, Vecrev((z-1)^n-1)); \\ Michel Marcus, May 23 2015

Formula

T(n,k) = T(n-1,k-1) + T(n-2,k) - T(n-2,k-1), T(0,0) = T(1,1) = T(2,2) = 1, T(1,0) = T(2,1) = -2, T(2,0) = 0, T(n,k) = 0 for k > n or for k < 0. - Philippe Deléham, May 23 2015
G.f.: (1-2*x-x^2+x^2*y)/((x-1)*(-x+x*y-1)). - R. J. Mathar, Aug 11 2015
Showing 1-10 of 16 results. Next