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

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

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

A153234 a(n) = floor(2^n/9).

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 7, 14, 28, 56, 113, 227, 455, 910, 1820, 3640, 7281, 14563, 29127, 58254, 116508, 233016, 466033, 932067, 1864135, 3728270, 7456540, 14913080, 29826161, 59652323, 119304647, 238609294, 477218588, 954437176, 1908874353, 3817748707, 7635497415, 15270994830
Offset: 0

Views

Author

Paul Curtz, Dec 21 2008

Keywords

Comments

Partial sums of A113405. - Mircea Merca, Dec 28 2010
Dubickas proves that infinitely many terms of this sequence are composite. - Charles R Greathouse IV, Feb 04 2016
Parity from a(4) onward gives A088911 (Period 6: repeat [1, 1, 1, 0, 0, 0]). - Jeremy Gardiner, Nov 04 2020

Crossrefs

Cf. A113405.

Programs

Formula

a(n+1) - 2*a(n) = A088911(n+3).
a(n) + a(n+3) = 2^n - 1 = A000225(n), n > 0.
From Mircea Merca, Dec 28 2010: (Start)
a(n) = round((2*2^n-9)/18) = floor((2^n-1)/9) = ceiling((2^n-8)/9).
a(n) = a(n-6) + 7*2^(n-6), n > 5. (End)
a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + 3*a(n-4) - 2*a(n-5).
G.f.: x^4 / ( (1-2*x)*(1-x^2)*(1-x+x^2) ).
a(n) + a(n+1) = A111927(n). - R. J. Mathar, Apr 08 2013

Extensions

More terms from Vincenzo Librandi, Jun 25 2011

A307393 Square array A(n,k), n >= 0, k >= 1, read by antidiagonals, where column k is the expansion of g.f. ((1-x)^(k-4))/((1-x)^k-x^k).

Original entry on oeis.org

1, 1, 5, 1, 4, 16, 1, 4, 11, 42, 1, 4, 10, 26, 99, 1, 4, 10, 21, 57, 219, 1, 4, 10, 20, 42, 120, 466, 1, 4, 10, 20, 36, 84, 247, 968, 1, 4, 10, 20, 35, 64, 169, 502, 1981, 1, 4, 10, 20, 35, 57, 120, 340, 1013, 4017, 1, 4, 10, 20, 35, 56, 93, 240, 682, 2036, 8100
Offset: 0

Views

Author

Seiichi Manyama, Apr 07 2019

Keywords

Examples

			Square array begins:
     1,   1,   1,   1,   1,   1,   1,   1, ...
     5,   4,   4,   4,   4,   4,   4,   4, ...
    16,  11,  10,  10,  10,  10,  10,  10, ...
    42,  26,  21,  20,  20,  20,  20,  20, ...
    99,  57,  42,  36,  35,  35,  35,  35, ...
   219, 120,  84,  64,  57,  56,  56,  56, ...
   466, 247, 169, 120,  93,  85,  84,  84, ...
   968, 502, 340, 240, 165, 130, 121, 120, ...
		

Crossrefs

Columns 1-5 give A002662(n+3), A125128(n+1), A111927(n+3), A000749(n+3), A139748(n+3).

Programs

  • Mathematica
    T[n_, k_] := Sum[Binomial[n+3, k*j + 3], {j, 0, Floor[n/k]}]; Table[T[n - k, k], {n, 0, 11}, {k, n, 1, -1}] // Flatten (* Amiram Eldar, May 20 2021 *)

Formula

A(n,k) = Sum_{j=0..floor(n/k)} binomial(n+3,k*j+3).
A(n,2*k) = Sum_{i=0..n} Sum_{j=0..n-i} binomial(i+1,k*j+1) * binomial(n-i+1,k*j+1).

A101825 G.f.: x*(1+x)^2/(1-x^3).

Original entry on oeis.org

0, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2
Offset: 0

Views

Author

N. J. A. Sloane, Jun 17 2007

Keywords

Comments

Period 3. Used in A042965.
First differences are essentially A049347. The binomial transform yields 0, 1, 4, 10,... i.e. A111927 with the first two zeros removed. - R. J. Mathar, May 14 2008

Programs

  • Mathematica
    LinearRecurrence[{0,0,1},{0,1,2,1},120] (* Harvey P. Dale, Aug 01 2016 *)
  • PARI
    x='x+O('x^50); Vec(x*(1+x)^2/(1-x^3)) \\ G. C. Greubel, May 03 2017

Formula

a(n) = A100063(n+1), n>0. - R. J. Mathar, Sep 01 2008

A173432 NW-SE diagonal sums of Riordan array A112468.

Original entry on oeis.org

1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0
Offset: 1

Views

Author

Mark Dols, Feb 18 2010

Keywords

Comments

Matches Fibonacci-sequence, such that F(n) + a(n) and F(n) - a(n) = always even.
Periodic sequence with period: [1,1,2,1,1,0]. - Philippe Deléham, Oct 11 2011

Crossrefs

Programs

  • Magma
    [2*Ceiling(n/6)-2*Floor(n/6)+Floor(n/3)-Ceiling(n/3) : n in [1..100]]; // Wesley Ivan Hurt, Sep 27 2014
  • Maple
    A173432:=n->2*ceil(n/6)-2*floor(n/6)+floor(n/3)-ceil(n/3): seq(A173432(n), n=1..100); # Wesley Ivan Hurt, Sep 27 2014
  • Mathematica
    Table[2 Ceiling[n/6] - 2 Floor[n/6] + Floor[n/3] - Ceiling[n/3], {n, 50}] (* Wesley Ivan Hurt, Sep 27 2014 *)
  • PARI
    Vec(-x*(x^2+1) / ((x-1)*(x+1)*(x^2-x+1)) + O(x^100)) \\ Colin Barker, Sep 26 2014
    

Formula

a(n) = 1 + A131531(n) with inverse binomial transform: 1, 0, 1, -3, 6, -11, 21, .., a signed variant of A024495. - R. J. Mathar, Mar 04 2010
a(2n+1) = a(2n)-a(2n-1)+2, a(2n) = a(2n-1)-a(2n-2) with a(1) = a(2)=1. - Philippe Deléham, Oct 11 2011
a(n) = a(n-1)-a(n-3)+a(n-4). - Colin Barker, Sep 26 2014
G.f.: -x*(x^2+1) / ((x-1)*(x+1)*(x^2-x+1)). - Colin Barker, Sep 26 2014
a(n) = 2*ceiling(n/6)-2*floor(n/6)+floor(n/3)-ceiling(n/3). - Wesley Ivan Hurt, Sep 27 2014
a(n) = A001045(n) - A111927(n). - Paul Curtz, Dec 16 2020

Extensions

Corrected and extended by Philippe Deléham, Oct 11 2011

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

Original entry on oeis.org

0, 0, 0, 0, 1, 5, 15, 36, 78, 162, 331, 671, 1353, 2718, 5448, 10908, 21829, 43673, 87363, 174744, 349506, 699030, 1398079, 2796179, 5592381, 11184786, 22369596, 44739216, 89478457, 178956941, 357913911, 715827852, 1431655734, 2863311498
Offset: 0

Views

Author

Creighton Dement, Aug 21 2005

Keywords

Comments

Binomial transform of sequence (0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0). Note: the binomial transform of the sequence (0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0) is A111927; the binomial transform of the sequence (0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0) is A024495 (disregarding first two terms, which are both zero).
Floretion Algebra Multiplication Program, FAMP Code: -4ibaseisumseq[ + .5'i + .5'j + .5'k + .5'ij' + .5'jk' + .5'ki' + e], sumtype: Y[8] = (int)Y[6] - (int)Y[7] + Y[8] + sum (internal program code).

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x^4/((1-2x)(x^2-x+1)(x-1)^2),{x,0,40}],x] (* or *) LinearRecurrence[{5,-10,11,-7,2},{0,0,0,0,1},40] (* Harvey P. Dale, Feb 24 2016 *)

Formula

a(n+2) - a(n+1) + a(n) = A000295(n) = 2^n - n - 1 (Eulerian numbers).
a(n) = 1/3*2^n-n+2/3*(1/2+1/2*I*sqrt(3))^n*(-1/4-1/4*I*sqrt(3))+2/3*(1/2-1/2*I*sqrt(3))^n*(-1/4+1/4*I*sqrt(3)).
a(0)=0, a(1)=0, a(2)=0, a(3)=0, a(4)=1, a(n)=5*a(n-1)-10*a(n-2)+ 11*a(n-3)- 7*a(n-4)+2*a(n-5). - Harvey P. Dale, Feb 24 2016
a(n) = Sum_{k=1..floor(n/2)} binomial(n, 3*k+1). - Taras Goy, Jan 02 2025
E.g.f.: exp(x/2)*(exp(x/2)*(exp(x) - 3*x) - cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2))/3. - Stefano Spezia, Jan 03 2025
Showing 1-7 of 7 results.