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 40 results. Next

A116423 Binomial transform of A006053.

Original entry on oeis.org

0, 1, 3, 9, 26, 74, 209, 588, 1651, 4631, 12983, 36388, 101972, 285741, 800660, 2243445, 6286059, 17613241, 49351342, 138279586, 387451077, 1085614208, 3041824015, 8523002359, 23880923183, 66912861640, 187485674652, 525323190505, 1471922876424, 4124236259529
Offset: 1

Views

Author

Gary W. Adamson, Feb 14 2006

Keywords

Comments

a(n)/a(n-1) tends to 2.801... = 1 + 2*cos(Pi/7).
A(n) := a(n+1)*(-1)^(n+1) appears in the following formula for the nonpositive powers of rho*sigma, where rho:=2*cos(Pi/7) and sigma:=sin(3*Pi/7)/sin(Pi/7) = rho^2-1 are the ratios of the smaller and larger diagonal length to the side length in a regular 7-gon (heptagon). See the Steinbach reference where the basis <1,rho,sigma> is used in an extension of the rational field. (rho*sigma)^(-n) = C(n) + B(n)*rho + A(n)*sigma, n >= 0, with C(n)= A085810(n)*(-1)^n, and B(n)= A181880(n-2)*(-1)^n. For the nonnegative powers see A120757(n), |A122600(n-1)| and A181879(n), respectively. See also a comment under A052547.
This sequence is constructible as a spiral tiling of similar trapezoids, as follows: start with an isosceles trapezoid with side lengths 3,1,4,1. Each new trapezoid is rotated and scaled so one leg fills all unoccupied space on the short base of the previous trapezoid. a(n) is given by the length of the n-th trapezoid's legs. This process is identical to the recursion relation added by R. J. Mathar in the Formula section. See the Links section for an illustration. - Andrew B. Hudson, Jun 19 2019

Examples

			a(5) = 26 = 1*0 + 1*4 + 4*1 + 4*3 + 6*1 = 4 + 4 + 12 + 6 = 26.
		

Crossrefs

Cf. A006053.

Programs

  • Magma
    I:=[0,1,3]; [n le 3 select I[n] else 4*Self(n-1)-3*Self(n-2)-Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jul 11 2019
  • Mathematica
    LinearRecurrence[{4, -3, -1}, {0, 1, 3}, 40] (* Vincenzo Librandi, Jul 11 2019 *)
  • PARI
    concat(0, Vec(x^2*(1-x)/(1-4*x+3*x^2+x^3) + O(x^50))) \\ Michel Marcus, Sep 13 2014
    

Formula

Binomial transform of A006053 starting with A006053(1): (0, 1, 1, 3, 4, 9, 14, ...).
From R. J. Mathar, Apr 02 2008: (Start)
O.g.f.: x^2(1-x)/(1 - 4x + 3x^2 + x^3).
a(n) = 4*a(n-1) - 3*a(n-2) - a(n-3). (End)

Extensions

More terms from R. J. Mathar, Apr 02 2008
More terms from Michel Marcus, Sep 13 2014

A099859 A Chebyshev transform of A006053 related to the knot 7_1.

Original entry on oeis.org

0, 1, 1, 1, 1, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, -1, -1, -1, -1
Offset: 0

Views

Author

Paul Barry, Oct 28 2004

Keywords

Comments

The g.f. is the transform of the g.f. of A006053 under the Chebyshev mapping G(x)-> (1/(1+x^2))G(x/(1+x^2)). The denominator of the g.f. is a parameterization of the Alexander polynomial of 7_1. It is also the 14th cyclotomic polynomial.

Crossrefs

Cf. A099860.

Formula

G.f.: x(1+x^2)/(1-x+x^2-x^3+x^4-x^5+x^6); a(n)=sum{k=0..floor(n/2), binomial(n-k, k)(-1)^k*A006053(n-2k)}.

A208153 Convolution triangle based on A006053.

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 4, 7, 3, 1, 9, 14, 12, 4, 1, 14, 35, 31, 18, 5, 1, 28, 70, 87, 56, 25, 6, 1, 47, 154, 207, 175, 90, 33, 7, 1, 89, 306, 504, 476, 310, 134, 42, 8, 1, 155, 633, 1137, 1274, 941, 504, 189, 52, 9, 1
Offset: 0

Views

Author

Philippe Deléham, Feb 24 2012

Keywords

Comments

Riordan array (1/(1-x-2*x^2+x^3), x/(1-x-2*x^2+x^3)).
Subtriangle of triangle given by (0, 1, 2, -5/2, 1/10, 2/5, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.
Diagonal sums are A125691(n).
Row sums are A001654(n+1).
Mirror image of triangle in A188107.

Examples

			Triangle begins:
  1
  1, 1
  3, 2, 1
  4, 7, 3, 1
  9, 14, 12, 4, 1
  14, 35, 31, 18, 5, 1
Triangle (0, 1, 2, -5/2, 1/10, 2/5, 0, 0,...) DELTA (1, 0, 0, 0,...) begins:
  1
  0, 1
  0, 1, 1
  0, 3, 2, 1
  0, 4, 7, 3, 1
  0, 9, 14, 12, 4, 1
  0, 14, 35, 31, 18, 5, 1
		

Crossrefs

Programs

  • Mathematica
    nmax=9; Flatten[CoefficientList[Series[CoefficientList[Series[1/(1 - x - 2*x^2 + x^3 - y*x), {x, 0, nmax}], x], {y, 0, nmax}], y]] (* Indranil Ghosh, Mar 10 2017 *)

Formula

T(n,k) = T(n-1,k-1) + T(n-1,k) + 2*T(n-2,k) - T(n-3,k).
G.f.: 1/(1-x-2*x^2+x^3-y*x).
Sum_{k>=0} T(n-2*k,k) = A001045(n+1).
Sum_{k=0..n} T(n,k)*x^k = (-1)^n*A008346(n), A006053(n+2), A001654(n+1) for x = -1, 0, 1 respectively.

A122499 Semiprimes in A006053.

Original entry on oeis.org

4, 9, 14, 155, 2993, 9707, 184183, 331981, 1942071, 1263047761, 140390505643, 455845099957, 296452328830865, 32951342156444219, 2381929669709247097441, 9063289616192276216577361, 34485996673867704851362967681, 426068342298911680872493712146539, 117190394374593808526426397401539675762247
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Sep 15 2006

Keywords

Crossrefs

Intersection of A001358 and A006053.
Cf. A006054.

Programs

  • Mathematica
    SemiprimeQ[n_Integer] := Plus @@ (Last /@ FactorInteger[n]) == 2;
    a = Table[ SeriesCoefficient[ Series[x/(x^3 - 2*x^2 - x + 1), {x, 0, 50}], n], {n, 0, 50}];
    f[n_] = If[SemiprimeQ[a[[n]]] == True, a[[n]], {}];
    Flatten[Table[f[n], {n, 1, Length[a]}]]

Extensions

Edited by N. J. A. Sloane, Sep 17 2006
More terms from Amiram Eldar, Jun 06 2025

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

Original entry on oeis.org

0, 0, 1, 2, 5, 11, 25, 56, 126, 283, 636, 1429, 3211, 7215, 16212, 36428, 81853, 183922, 413269, 928607, 2086561, 4688460, 10534874, 23671647, 53189708, 119516189, 268550439, 603427359, 1355888968, 3046654856, 6845771321, 15382308530, 34563733525
Offset: 0

Views

Author

Keywords

Comments

Let u(k), v(k), w(k) be defined by u(1)=1, v(1)=0, w(1)=0 and u(k+1)=u(k)+v(k)+w(k), v(k+1)=u(k)+v(k), w(k+1)=u(k); then {u(n)} = 1,1,3,6,14,31,... (A006356 with an extra initial 1), {v(n)} = 0,1,2,5,11,25,... (this sequence with its initial 0 deleted) and {w(n)} = {u(n)} prefixed by an extra 0 = A077998 with an extra initial 0. - Benoit Cloitre, Apr 05 2002. Also u(k)^2+v(k)^2+w(k)^2 = u(2k). - Gary W. Adamson, Dec 23 2003
Form the graph with matrix A=[1, 1, 1; 1, 0, 0; 1, 0, 1]. Then A006054 counts walks of length n between the vertex of degree 1 and the vertex of degree 3. - Paul Barry, Oct 02 2004
Form the digraph with matrix [1,1,0; 1,0,1; 1,1,1]. A006054(n) counts walks of length n between the vertices with loops. - Paul Barry, Oct 15 2004
Nonzero terms = INVERT transform of (1, 1, 2, 2, 3, 3, ...). Example: 56 = (1, 1, 2, 5, 11, 25) dot (3, 3, 2, 2, 1, 1) = (3 + 3 + 4 + 10 + 11 + 25). - Gary W. Adamson, Apr 20 2009
-a(n+1) appears in the formula for the nonpositive powers of rho:= 2*cos(Pi/7), the ratio of the smaller diagonal in the heptagon to the side length s=2*sin(Pi/7), when expressed in the basis <1,rho,sigma>, with sigma:=rho^2-1, the ratio of the larger heptagon diagonal to the side length, as follows. rho^(-n) = C(n)*1 + C(n-1)*rho - a(n+1)*sigma, n >= 0, with C(n)=A077998(n), C(-1):=0. See the Steinbach reference, and a comment under A052547.
If, with the above notations, the power basis of the field Q(rho) is taken one has for nonpositive powers of rho, rho^(-n) = a(n+2)*1 + A077998(n-1)*rho - a(n+1)*rho^2. For nonnegative powers see A006053. See also the Steinbach reference. - Wolfdieter Lang, May 06 2011
a(n) appears also in the nonnegative powers of sigma,(defined in the above comment, where also the basis is given). See a comment in A106803.
The sequence b(n):=(-1)^(n+1)*a(n) forms the negative part (i.e., with nonpositive indices) of the sequence (-1)^n*A006053(n+1). In this way we obtain what we shall call the Ramanujan-type sequence number 2a for the argument 2*Pi/7 (see the comment to Witula's formula in A006053). We have b(n) = -2*b(n-1) + b(n-2) + b(n-3) and b(n) * 49^(1/3) = (c(1)/c(4))^(1/3) * (c(1))^(-n) + (c(2)/c(1))^(1/3) * (c(2))^(-n) + (c(4)/c(2))^(1/3) * (c(4))^(-n) = (c(2)/c(1))^(1/3) * (c(1))^(-n+1) + (c(4)/c(2))^(1/3) * (c(2))^(-n+1) + (c(1)/c(4))^(1/3) * (c(4))^(-n+1), where c(j) := 2*cos(2*Pi*j/7) (for the proof, see the comments to A215112). - Roman Witula, Aug 06 2012
(1, 1, 2, 5, 11, 25, 56, ...) * (1, 0, 1, 0, 1, ...) = the variant of A006356: (1, 1, 3, 6, 14, 31, ...). - Gary W. Adamson, May 15 2013
The limit of a(n+1)/a(n) for n -> infinity is, for all generic sequences with this recurrence of signature (2,1,-1), sigma = rho^2-1, approximately 2.246979603, the length ratio (largest diagonal)/side in the regular heptagon (7-gon). For rho = 2*cos(Pi/7) and sigma see a comment above, and the P. Steinbach reference. Proof: a(n+1)/a(n) = 2 + 1/(a(n)/a(n-1)) - 1/((a(n)/a(n-1))*(a(n-1)/a(n-2))), leading in the limit to sigma^3 -2*sigma^2 - sigma + 1, which is solved by sigma = rho^2-1, due to C(7, rho) = 0 , with the minimal polynomial C(7, x) = x^3 - x^2 - 2*x + 1 of rho (see A187360). - Wolfdieter Lang, Nov 07 2013
Numbers of straight-chain aliphatic amino acids involving single, double or triple bonds (allowing adjacent double bonds) when cis/trans isomerism is neglected. - Stefan Schuster, Apr 19 2018
Let A(r,n) be the total number of ordered arrangements of an n+r tiling of r red squares and white tiles of total length n, where the individual tile lengths can range from 1 to n. A(r,0) corresponds to a tiling of r red squares only, and so A(r,0) = 1. Also, A(r,n)=0 for n<0. Let A_1(r,n) = Sum_{j=0..n} A(r,j). Then the expansion of 1/(1 - 2*x - x^2 + x^3) is A_1(0,n) + A_1(1,n-2) + A_1(n-4) + ... = a(n) without the initial two 0's. In general, the expansion of 1/(1 - 2*x -x^k + x^(k+1)) is equal to Sum_{j>=0} A_1(j, n-j*k). - Gregory L. Simay, May 25 2018
For n>1, a(n) is the number of ways to tile a strip of length n-1 with one color of squares and dominos, two colors of trominos and quadrominos, 3 colors of 5-minos and 6-minos, and so on. - Greg Dresden and Zhiyu Zhang, Jun 26 2025

Examples

			G.f. = x^2 + 2*x^3 + 5*x^4 + 11*x^5 + 25*x^6 + 56*x^7 + 126*x^8 + 283*x^9 + ... - _Michael Somos_, Jun 25 2018
		

References

  • Jay Kappraff, Beyond Measure, A Guided Tour Through Nature, Myth and Number, World Scientific, 2002.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a006054 n = a006053_list !! n
    a006054_list = 0 : 0 : 1 : zipWith (+) (map (2 *) $ drop 2 a006054_list)
       (zipWith (-) (tail a006054_list) a006054_list)
    -- Reinhard Zumkeller, Oct 14 2011
  • Maple
    A006054:=z**2/(1-2*z-z**2+z**3); # Simon Plouffe in his 1992 dissertation
  • Mathematica
    LinearRecurrence[{2, 1, -1}, {0, 0, 1}, 60] (* Vladimir Joseph Stephan Orlovsky, Feb 10 2012 *)
  • Maxima
    a(n):=if n<2 then 0 else if n=2 then 1 else b(n-2);
    b(n):=sum(sum(binomial(j,n-3*k+2*j)*(-1)^(j-k)*binomial(k,j)*2^(-n+3*k-j),j,0,k),k,1,n); /* Vladimir Kruchinin, May 05 2011 */
    
  • PARI
    x='x+O('x^66);
    concat([0, 0], Vec(x^2/(1-2*x-x^2+x^3))) \\ Joerg Arndt, May 05 2011
    

Formula

G.f.: x^2/(1-2*x-x^2+x^3).
Sum_{k=0..n+2} a(k) = A077850(n). - Philippe Deléham, Sep 07 2006
Let M = the 3 X 3 matrix [1,1,0; 1,2,1; 0,1,2], then M^n*[1,0,0] = [A080937(n-1), A094790(n), A006054(n-1)]. E.g., M^3*[1,0,0] = [5,9,5] = [A080937(2), A094790(3), A006054(2)]. - Gary W. Adamson, Feb 15 2006
a(n) = round(k*A006356(n-1)), for n>1, where k = 0.3568958678... = 1/(1+2*cos(Pi/7)). - Gary W. Adamson, Jun 06 2008
a(n+1) = A187070(2n+1) = A187068(2n+3). - L. Edson Jeffery, Mar 10 2011
a(n+3) = Sum_{k=1..n} Sum_{j=0..k} binomial(j,n-3*k+2*j)*(-1)^(j-k)*binomial(k,j)*2^(-n+3*k-j); a(0)=0, a(1)=0, a(2)=1. - Vladimir Kruchinin, May 05 2011
7*a(n) = (c(2)-c(4))*(1+c(1))^n + (c(4)-c(1))*(1+c(2))^n + (c(1)-c(2))*(1+c(4))^n, where c(j):=2*cos(2*Pi*j/7) - for the proof see Witula et al. papers. - Roman Witula, Aug 07 2012
a(n) = -A006053(1-n) for all n in Z. - Michael Somos, Jun 25 2018

A028495 Expansion of g.f. (1-x^2)/(1-x-2*x^2+x^3).

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 19, 33, 61, 108, 197, 352, 638, 1145, 2069, 3721, 6714, 12087, 21794, 39254, 70755, 127469, 229725, 413908, 745889, 1343980, 2421850, 4363921, 7863641, 14169633, 25532994, 46008619, 82904974, 149389218, 269190547, 485064009, 874055885
Offset: 0

Views

Author

Keywords

Comments

Form the graph with matrix A = [0,1,1; 1,0,0; 1,0,1] (P_3 with a loop at an extremity). Then A028495 counts closed walks of length n at the degree 3 vertex. - Paul Barry, Oct 02 2004
Equals INVERT transform of (1, 1, 0, 1, 0, 1, 0, 1, ...). - Gary W. Adamson, Apr 28 2009
From Johannes W. Meijer, May 29 2010: (Start)
a(n) is the number of ways White can force checkmate in exactly (n+1) moves, n>=0, ignoring the fifty-move and the triple repetition rules, in the following chess position: White Ka1, Ra8, Bc1, Nb8, pawns a6, a7, b2, c6, d2, f6 and h6; Black Kc8, pawns b3, c7, d3, f7 and h7. (After Noam D. Elkies, see link; diagram 5).
Counts all paths of length n, n>=0, starting at the initial node on the path graph P_6, see the second Maple program. (End)
a(n) is the number of length n-1 binary words such that each maximal block of 1's has odd length. a(4) = 6 because we have: 000, 001, 010, 100, 101, 111. - Geoffrey Critzer, Nov 17 2012
a(n) is the number of compositions of n where increments can only appear at every second position, starting with the second and third part, see example. Also, a(n) is the number of compositions of n where there is no fall between every second pair of parts, starting with the first and second part; see example. - Joerg Arndt, May 21 2013
a(n) is the top left entry of the n-th power of the 3 X 3 matrix [1, 1, 0; 1, 0, 1; 0, 1, 0] or of the 3 X 3 matrix [1, 0, 1; 0, 0, 1; 1, 1, 0]. - R. J. Mathar, Feb 03 2014
Range of row n of the circular Pascal array of order 7. - Shaun V. Ault, Jun 05 2014
a(n) is the number of compositions of n into parts from {1,2,4,6,8,10,...}. Example: a(4)= 6 because we have 4, 22, 211, 121, 112, and 1111. - Emeric Deutsch, Aug 17 2016
In general, a(n,m) = (2^n/(m+1))*Sum_{r=1..m} (1-(-1)^r)*cos(Pi*r/(m+1))^n*(1+cos(Pi*r/(m+1))) gives the number of paths of length n starting at the initial node on the path graph P_m. Here we have m=6. - Herbert Kociemba, Sep 15 2020
a(n-1) is the number of triangular dcc-polyominoes having area n (see Baril et al. at page 11). - Stefano Spezia, Oct 14 2023
a(n) is the number of permutations p of [n] with p(j)Alois P. Heinz, Mar 29 2024

Examples

			G.f. = 1 + x + 2*x^2 + 3*x^3 + 6*x^4 + 10*x^5 + 19*x^6 + 33*x^7 + 61*x^8 + ...
From _Joerg Arndt_, May 21 2013: (Start)
There are a(6)=19 compositions of 6 where increments can only appear at every second position:
  01:  [ 1 1 1 1 1 1 ]
  02:  [ 1 1 1 1 2 ]
  03:  [ 1 1 2 1 1 ]
  04:  [ 1 1 2 2 ]
  05:  [ 1 1 3 1 ]
  06:  [ 1 1 4 ]
  07:  [ 2 1 1 1 1 ]
  08:  [ 2 1 2 1 ]
  09:  [ 2 1 3 ]
  10:  [ 2 2 1 1 ]
  11:  [ 2 2 2 ]
  12:  [ 3 1 1 1 ]
  13:  [ 3 1 2 ]
  14:  [ 3 2 1 ]
  15:  [ 3 3 ]
  16:  [ 4 1 1 ]
  17:  [ 4 2 ]
  18:  [ 5 1 ]
  19:  [ 6 ]
There are a(6)=19 compositions of 6 where there is no fall between every second pair of parts, starting with the first and second part:
  01:  [ 1 1 1 1 1 1 ]
  02:  [ 1 1 1 1 2 ]
  03:  [ 1 1 1 2 1 ]
  04:  [ 1 1 1 3 ]
  05:  [ 1 1 2 2 ]
  06:  [ 1 1 4 ]
  07:  [ 1 2 1 1 1 ]
  08:  [ 1 2 1 2 ]
  09:  [ 1 2 3 ]
  10:  [ 1 3 1 1 ]
  11:  [ 1 3 2 ]
  12:  [ 1 4 1 ]
  13:  [ 1 5 ]
  14:  [ 2 2 1 1 ]
  15:  [ 2 2 2 ]
  16:  [ 2 3 1 ]
  17:  [ 2 4 ]
  18:  [ 3 3 ]
  19:  [ 6 ]
(End)
19 = (1, 0, 1, 0, 1, 1) dot (1, 1, 2, 3, 6, 10) = (1 + 0 + 2 + 0 + 6 + 10). Cf. comment of Apr 28 2009. - _Gary W. Adamson_, Aug 10 2016
		

Crossrefs

Programs

  • Maple
    spec := [S,{S=Sequence(Union(Prod(Sequence(Prod(Z,Z)),Z,Z),Z))},unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);
    with(GraphTheory): P:=6: G:= PathGraph(P): A:=AdjacencyMatrix(G): nmax:=34; for n from 0 to nmax do B(n):=A^n; a(n):=add(B(n)[1,k], k=1..P) od: seq(a(n), n=0..nmax); # Johannes W. Meijer, May 29 2010
    a := (-1)^(3/7) - (-1)^(4/7):
    b := (-1)^(5/7) - (-1)^(2/7):
    c := (-1)^(1/7) - (-1)^(6/7):
    f := n -> (a^n * (2 + a) + b^n * (2 + b) + c^n * (2 + c))/7:
    seq(simplify(f(n)), n=0..36); # Peter Luschny, Sep 16 2020
  • Mathematica
    LinearRecurrence[{1, 2, -1}, {1, 1, 2}, 60] (* Vladimir Joseph Stephan Orlovsky, Feb 11 2012 *)
    CoefficientList[Series[(1-x^2)/(1-x-2x^2+x^3),{x,0,40}],x] (* Harvey P. Dale, Dec 23 2018 *)
    a[n_,m_]:= 2^(n+1)/(m+1) Module[{x=(Pi r)/(m+1)},Sum[Cos[x]^n (1+Cos[x]),{r,1,m,2}]]
    Table[a[n,6],{n,0,40}]//Round (* Herbert Kociemba, Sep 15 2020 *) (* Herbert Kociemba, Sep 14 2020 *)
  • PARI
    {a(n) = if( n<0, n = -1-n; polcoeff( (1 - x^2) / (1 - 2*x - x^2 + x^3) + x * O(x^n), n), polcoeff( (1 - x^2) / (1 - x - 2*x^2 + x^3) + x * O(x^n), n))} /* Michael Somos, Apr 05 2012 */
    
  • PARI
    a(n)=([0,1,0;0,0,1;-1,2,1]^n*[1;1;2])[1,1] \\ Charles R Greathouse IV, Aug 25 2016

Formula

Recurrence: {a(0)=1, a(1)=1, a(2)=2, a(n)-2*a(n+1)-a(n+2)+a(n+3)=0}.
a(n) = Sum_(1/7*(1+2*_alpha)*_alpha^(-1-n), _alpha=RootOf(_Z^3-2*_Z^2-_Z+1)).
a(n) = A094718(6, n). - N. J. A. Sloane, Jun 12 2004
a(n) = a(n-1) + Sum_{k=1..floor(n/2)} a(n-2*k). - Floor van Lamoen, Oct 29 2005
a(n) = 5*a(n-2) - 6*a(n-4) + a(n-6). - Floor van Lamoen, Nov 02 2005
a(n) = A006053(n+2) - A006053(n). - R. J. Mathar, Nov 16 2007
a(2*n) = A052975(n), a(2*n+1) = A060557(n). - Johannes W. Meijer, May 29 2010
G.f.: 1 / (1 - x / (1 - x / (1 + x / (1 + x / (1 - x))))). - Michael Somos, Apr 05 2012
a(-1 - n) = A052534(n). - Michael Somos, Apr 05 2012
a(n) = (2^n/7)*Sum_{r=1..6} (1-(-1)^r)*cos(Pi*r/7)^n*(1+cos(Pi*r/7)). - Herbert Kociemba, Sep 15 2020

Extensions

More terms from James Sellers, Jun 05 2000

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

Original entry on oeis.org

1, 0, 2, 1, 5, 5, 14, 19, 42, 66, 131, 221, 417, 728, 1341, 2380, 4334, 7753, 14041, 25213, 45542, 81927, 147798, 266110, 479779, 864201, 1557649, 2806272, 5057369, 9112264, 16420730, 29587889, 53317085, 96072133, 173118414, 311945595, 562110290, 1012883066
Offset: 0

Views

Author

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

Keywords

Comments

Form the graph with matrix A=[0,1,1;1,0,0;1,0,1] (P_3 with a loop at an extremity). Then A052547 counts closed walks of length n at the degree 2 vertex. - Paul Barry, Oct 02 2004
The characteristic polynomial x^3 - x^2 - 2*x + 1 generates a 3 step recursion: a(0)=1,a(1)=0,a(2)=2, for n>2 a(n)=a(n-1)+2*a(n-2)-a(n-3) so we can also prepend the term 1,0 to a(n) and get the same sequence, i.e. start with a(0)=1,a(1)=0,a(2)=1. - Lambert Klasen (lambert.klasen(AT)gmx.net), Jan 30 2005
The length of the diagonals (including the side) of a regular 7-gon (heptagon) inscribed in a circle of radius r=1 are d_1=2*sin(Pi/7) (the side length), d_2=2*cos(Pi/7)*d_1, and d_3=2*sin(3*Pi/7). The two ratios are rho := R_2 = d_2/d_1 = 2*cos(Pi/7) approximately 1.801937736, and sigma:= R_3 = d_3/d_1 = S(2,rho) = rho^2-1, approximately 2.246979604. See A049310 for Chebyshev S-polynomials. See the Steinbach reference where the basis <1,rho,sigma> has been considered for an extension of the rational field Q, which is there called Q(rho). This rho is the largest zero of S(6,x). For nonnegative powers of rho one has rho^n = C(n)*1 + B(n)*rho + A(n)*sigma, with B(n)=a(n-1), a(-1):=0, a(-2):=1, A(n)=B(n+1)-B(n-1)= A006053(n), and C(n)=B(n-1)=a(n-2), n>=0. For negative powers see A106803 and -A006054. For nonnegative and negative powers of sigma see A006054, A106803 and a(n), -A006053, respectively.
a(n) appears also in the formula for the nonpositive powers of sigma (see the comment above for the definition and the Steinbach basis) as sigma^(-n) = a(n)*1 - A006053(n+1)*rho - a(n-1)*sigma, n>=0. Put a(-1):=0. 1/sigma=sigma-rho, the smallest positive zero of S(6,x) (see A049310 for Chebyshev S-polynomials). - Wolfdieter Lang, Dec 01 2010

Crossrefs

Cf. A096976; second differences of A028495 and first differences of A006053 (up to an offset).

Programs

  • GAP
    a:=[1,0,2];; for n in [4..40] do a[n]:=a[n-1]+2*a[n-2]-a[n-3]; od; a; # G. C. Greubel, May 08 2019
  • Magma
    I:=[1,0,2]; [n le 3 select I[n] else Self(n-1) + 2*Self(n-2) - Self(n-3): n in [1..40]]; // G. C. Greubel, May 08 2019
    
  • Maple
    spec := [S,{S=Sequence(Prod(Z,Union(Z,Prod(Z, Sequence(Z)))))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..40);
  • Mathematica
    LinearRecurrence[{1, 2, -1}, {1, 0, 2}, 40] (* Vladimir Joseph Stephan Orlovsky, Feb 13 2012 *)
  • PARI
    {a(n) = if(n==0,1,if(n==1,0,if(n==2,2,a(n-1)+2*a(n-2)-a(n-3))))};
    for(i=0,40,print1(a(i),",")) \\ Lambert Klasen, Jan 30 2005
    
  • Sage
    ((1-x)/(1-x-2*x^2+x^3)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, May 08 2019
    

Formula

a(n) = a(n-1) + 2*a(n-2) - a(n-3), with a(0)=1, a(1)=0, a(2)=2.
a(n) = Sum(-1/7*_alpha*(-3+_alpha)*_alpha^(-1-n), _alpha=RootOf(_Z^3-2*_Z^2-_Z+1)).
a(n) = 5*a(n-2) - 6*a(n-4) + a(n-6). - Floor van Lamoen, Nov 02 2005

Extensions

More terms from James Sellers, Jun 05 2000

A094648 An accelerator sequence for Catalan's constant.

Original entry on oeis.org

3, -1, 5, -4, 13, -16, 38, -57, 117, -193, 370, -639, 1186, -2094, 3827, -6829, 12389, -22220, 40169, -72220, 130338, -234609, 423065, -761945, 1373466, -2474291, 4459278, -8034394, 14478659, -26088169, 47011093, -84708772, 152642789, -275049240
Offset: 0

Views

Author

Paul Barry, May 18 2004

Keywords

Comments

The pair A094648 and the alternating sequence A033304 when joined form a two-sided sequence defined by the recurrence formula x(n+3) + x(n+2) - 2x(n+1) - x(n) = 0, n in Z, x(-1)=-2, x(0)=3, x(1)=-1 - for details see Witula's comments to A033304. - Roman Witula, Jul 25 2012
From Roman Witula, Aug 09 2012: (Start)
There exist two interesting subsequences b(n) and c(n) of the given above sequence x(n) defined by the following relations: b(n)=a(2^n) and c(n)=x(-2^n). These subsequences satisfy the following system of recurrence equations:
b(n+1)=b(n)^2-2*c(n), and c(n+1)=c(n)^2-2*b(n),
which easily follow from the general identity: x(n)^2=x(2*n)-2*x(-n), n in Z. We note that b(0)=-1, b(1)=5, b(2)=13, b(3)=117, c(0)=-2, c(1)=6, c(2)=26, c(3)=650. From the above system we deduce that all b(n) are odd, whereas all c(n) are even. Moreover we obtain c(n+1)-b(n+1)=(c(n)-b(n))*(b(n)+c(n)+2), which yields b(n+1)-c(n+1)=product{k=1,..,n}(b(k)+c(k)+2)=13*product{k=2,..,n}(b(k)+c(k)+2)=13^2*41*product{k=3,..,n}(b(k)+c(k)+2). It follows that b(n)-c(n) is divisible by 13^2*41 for every n=3,4,..., and after using the above system again each b(n) and c(n), for n=2,3,..., is divisible by 13. (End)
If we set W(n):=3*A077998(n)-A006054(n+1)-A006054(n), n=0,1,..., then a(n)=(W(n)^2-W(2*n))/2 and W(n) = (-c(1))^(-n) + (-c(2))^(-n) + (-c(4))^(-n) = (-c(1)*c(2))^n + (-c(1)*c(4))^n + (-c(2)*c(4))^n = (-1-c(1))^n + (-1-c(2))^n + (-1-c(4))^n, where c(j):=2*cos(2*Pi*j/7) - for the proof see Witula-Slota-Warzynski's paper. Moreover it follows from the comment at the top and from comments to A033304 that W(n+1)=A033304(n)=(-1)^(n+1)*x(-n-1). - Roman Witula, Aug 11 2012
The following trigonometric type identitities hold true: (1) -a(n-1)-a(n) = c(1)*c(2)^n + c(2)*c(4)^n + c(4)*c(1)^n and (2) a(n)-a(n+2) = c(4)*c(2)^(n+1) + c(1)*c(4)^(n+1) + c(2)*c(1)^(n+1), where a(-1)=-2 and c(j) is defined as above (see also the respective comment to A033304). For the proof see Remark 6 in Witula's paper. - Roman Witula, Aug 14 2012
It can be proved that A033304(n-1)*(-1)^n = (a(n)^2 - a(2*n))/2, n=1,2,... - Roman Witula, Sep 30 2012
With respect to the form of the trigonometric formulas describing a(n), we call this sequence the Berndt-type sequence number 19 for the argument 2*Pi/7. The A-numbers of other Berndt-type sequences numbers are given in below. - Roman Witula, Sep 30 2012

Examples

			We have a(17) = a(19) + 50000, a(4) + a(5) = -3, 2*a(7) + a(8) = 3, and 2*a(9) + a(10) = a(5). - _Roman Witula_, Sep 14 2012
		

Crossrefs

Programs

  • Magma
    I:=[3,-1,5]; [n le 3 select I[n]  else -Self(n-1)+2*Self(n-2)+Self(n-3): n in [1..40]]; // Vincenzo Librandi, Jul 25 2015
    
  • Mathematica
    CoefficientList[ Series[(3 + 2x - 2x^2)/(1 + x - 2x^2 - x^3), {x, 0, 33}], x] (* Robert G. Wilson v, May 24 2004 *)
    a[n_] := Round[(2Sin[3Pi/14])^n + (-2Sin[Pi/14])^n + (-2Cos[Pi/7])^n]; Table[ a[n], {n, 0, 33}] (* Robert G. Wilson v, May 24 2004 *)
    LinearRecurrence[{-1,2,1}, {3,-1,5}, 50] (* Roman Witula, Aug 09 2012 *)
  • PARI
    x='x+O('x^30); Vec((3+2*x-2*x^2)/(1+x-2*x^2-x^3)) \\ G. C. Greubel, May 09 2018

Formula

G.f.: (3+2*x-2*x^2)/(1+x-2*x^2-x^3);
a(n) = (2*sin(3*Pi/14))^n+(-2*sin(Pi/14))^n+(-2*cos(Pi/7))^n.
a(p) == -1 mod(p), p prime. - Philippe Deléham, Oct 03 2009
a(n) = (2*cos(2*Pi/7))^n + (2*cos(4*Pi/7))^n + (2*cos(8*Pi/7))^n, which is equivalent to the formula given above (for analogous sums with sines see A215493 and A215494). Moreover we have a(n+3) + a(n+2) - 2a(n+1) - a(n) = 0 - for the proof see Witula-Slota's paper. - Roman Witula, Jul 24 2012
a(n) = 3*(-1)^n*A006053(n+2) +2*A078038(n-1). - R. J. Mathar, Nov 03 2020

A214683 a(n+3) = -a(n+2) + 2a(n+1) + a(n) with a(0)=-1, a(1)=0, a(2)=-3.

Original entry on oeis.org

-1, 0, -3, 2, -8, 9, -23, 33, -70, 113, -220, 376, -703, 1235, -2265, 4032, -7327, 13126, -23748, 42673, -77043, 138641, -250054, 450293, -811760, 1462292, -2635519, 4748343, -8557089, 15418256, -27784091, 50063514, -90213440, 162556377, -292919743
Offset: 0

Views

Author

Roman Witula, Jul 25 2012

Keywords

Comments

Ramanujan-type sequence number 1 for the argument 2Pi/7.
The discussed sequence is associated with the sequence A006053 (with respect to the similar trigonometric formulas describing both sequences). Indeed, we have 7^(1/3)*a(n) = (c(1)/c(2))^(1/3)*(2c(1))^n + (c(2)/c(4))^(1/3)*(2c(2))^n + (c(4)/c(1))^(1/3)*(2c(4))^n = (c(1)/c(2))^(1/3)*(2c(2))^(n+1) + (c(2)/c(4))^(1/3)*(2c(4))^(n+1) + (c(4)/c(1))^(1/3)*(2c(1))^(n+1), where c(j) := Cos(2Pi*j/7), which is "almost" the copy of the respective formula for A006053. From a(0), A006053(0) and a(1), A006053(1), (and again) A006053(0) we deduce the following attractive decompositions
x^3 - 7^(1/3)*x - 1 = (x - (c(1)/c(4))^(1/3))*(x - (c(2)/c(1))^(1/3))*(x - (c(4)/c(2))^(1/3)), and
x^3 - 49^(1/3)*x - 1 = (x - (c(1)/c(2))^(1/3)*2c(1))*(x - (c(2)/c(4))^(1/3)*2c(2))*(x - (c(4)/c(1))^(1/3)*2c(4)).
From Newton-Girard formulas applied to these polynomials we generate two new sequences of real numbers S(n) := (c(1)/c(4))^(n/3) + (c(2)/c(1))^(n/3) + (c(4)/c(2))^(n/3), and T(n) := ((c(1)/c(2))^(1/3)*2c(1))^n + ((c(2)/c(4))^(1/3)*2c(2))^n + ((c(4)/c(1))^(1/3)*2c(4))^n. In first Witula's paper it is proved that S(n) = as(n) + bs(n)*7^(1/3) + cs(n)*49^(1/3), where as(n+3) = as(n) + 7cs(n+1), bs(n+3) = bs(n) + as(n+1), cs(n+3) = cs(n) + bs(n+1), as(0)=3, as(1)=as(2)=bs(0)=bs(1)=0, bs(2)=2, cs(0)=cs(1)=cs(2)=0, and T(n) = at(n) + bt(n)*7^(1/3) + ct(n)*49^(1/3), where at(n+3) = at(n) + 7bt(n+1), bt(n+3) = bt(n) + 7ct(n+1), ct(n+3) = ct(n) + at(n+1), at(0)=3, at(1)=at(2)=bt(0)=bt(1)=bt(2)=ct(0)=ct(1)=0, ct(2)=2. All six sequences as(n),bs(n),...,ct(n) are created from integers and will be discussed in separate sequences .

Examples

			From values of a(k), for k=0,1,..,5 we deduce that (c(1)/c(2))^(1/3)*A + (c(2)/c(4))^(1/3)*B + (c(4)/c(1))^(1/3)*C = 0  in the following cases: A=2c(1), B=2c(2), C=2c(4) or A=-1+(2c(1))^2+(2c(1))^3, B=-1+(2c(2))^2+(2c(2))^3, C=-1+(2c(3))^2+(2c(3))^3 or  A=1+(2c(1))^4+(2c(1))^5, B=1+(2c(2))^4+(2c(2))^5, C=1+(2c(3))^4+(2c(3))^5.
		

References

  • R. Witula, E. Hetmaniok, D. Slota, Sums of the powers of any order roots taken from the roots of a given polynomial, Proceedings of the Fifteenth International Conference on Fibonacci Numbers and Their Applications, Eger, Hungary, 2012.

Crossrefs

Cf. A006053.

Programs

  • Magma
    a:=[-1,0,-3]; [ n le 3 select a[n] else -Self(n-1) + 2*Self(n-2) + Self(n-3): n in [1..35]]; // Marius A. Burtea, Oct 03 2019
    
  • Mathematica
    LinearRecurrence[{-1, 2, 1}, {-1, 0, -3}, 40]
  • SageMath
    @CachedFunction
    def a(n): # a = A214683
        if (n<3): return (-1,0,-3)[n]
        else: return -a(n-1) + 2*a(n-2) + a(n-3)
    [a(n) for n in range(40)] # G. C. Greubel, Nov 25 2022

Formula

a(n+3) + a(n+2) - 2a(n+1) - a(n) = 0, a(0)=-1, a(1)=0, a(2)=-3.
G.f.: -(1+x+x^2)/(1+x-2*x^2-x^3).

A214699 a(n) = 3*a(n-2) - a(n-3) with a(0)=0, a(1)=3, a(2)=0.

Original entry on oeis.org

0, 3, 0, 9, -3, 27, -18, 84, -81, 270, -327, 891, -1251, 3000, -4644, 10251, -16932, 35397, -61047, 123123, -218538, 430416, -778737, 1509786, -2766627, 5308095, -9809667, 18690912, -34737096, 65882403, -122902200, 232384305, -434589003, 820055115, -1536151314
Offset: 0

Views

Author

Roman Witula, Jul 26 2012

Keywords

Comments

All a(n) are divisible by 3.
The Ramanujan-type sequence number 1 for the argument 2*Pi/9 defined by the following identity:
3^(1/3)*a(n) = (c(1)/c(2))^(1/3)*c(1)^n + (c(2)/c(4))^(1/3)*c(2)^n + (c(4)/c(1))^(1/3)*c(4)^n = -( (c(1)/c(2))^(1/3)*c(2)^(n+1) + (c(2)/c(4))^(1/3)*c(4)^(n+1) + (c(4)/c(1))^(1/3)*c(1)^(n+1) ), where c(j) := 2*cos(2*Pi*j/9).
The definitions of other Ramanujan-type sequences, for the argument of 2*Pi/9 in one's, are given in the Crossrefs section.

Examples

			We have a(2) = a(1) + a(4) = a(4) + a(7) + a(8) = -a(3) + a(5) + a(6) = 0, which implies
(c(1)/c(2))^(1/3)*c(1)^2 + (c(2)/c(4))^(1/3)*c(2)^2 + (c(4)/c(1))^(1/3)*c(4)^2 = (c(1)/c(2))^(1/3)*(c(1) + c(1)^4) + (c(2)/c(4))^(1/3)*(c(2) + c(2)^4) + (c(4)/c(1))^(1/3)*(c(4) + c(4)^4) = (c(1)/c(2))^(1/3)*(c(1)^4 + c(1)^7 + c(1)^8) + (c(2)/c(4))^(1/3)*(c(2)^4 + c(2)^7 + c(2)^8) + (c(4)/c(1))^(1/3)*(c(4)^4 + c(4)^7 + c(4)^8) = 0.
Moreover we have 3000*3^(1/3) = (c(1)/c(2))^(1/3)*c(1)^13 + (c(2)/c(4))^(1/3)*c(2)^13 + (c(4)/c(1))^(1/3)*c(4)^13. - _Roman Witula_, Oct 06 2012
		

References

  • R. Witula, E. Hetmaniok, D. Slota, Sums of the powers of any order roots taken from the roots of a given polynomial, Proceedings of the Fifteenth International Conference on Fibonacci Numbers and Their Applications, Eger, Hungary, 2012

Crossrefs

Programs

  • Magma
    [n le 3 select 3*(1+(-1)^n)/2 else 3*Self(n-2) - Self(n-3): n in [1..40]]; // G. C. Greubel, Jan 08 2024
    
  • Mathematica
    LinearRecurrence[{0,3,-1}, {0,3,0}, 30]
    CoefficientList[Series[3*x/(1 - 3*x^2 + x^3),{x,0,34}],x] (* James C. McMahon, Jan 09 2024 *)
  • SageMath
    def a(n): # a=A214699
        if (n<3): return 3*(n%2)
        else: return 3*a(n-2) - a(n-3)
    [a(n) for n in range(41)] # G. C. Greubel, Jan 08 2024

Formula

G.f.: 3*x/(1 - 3*x^2 + x^3).
From Roman Witula, Oct 06 2012: (Start)
a(n+1) = 3*(-1)^n*A052931(n), which from recurrence relations for a(n) and A052931 can easily be proved inductively.
a(n) = -A214779(n+1) - A214779(n). (End)
Showing 1-10 of 40 results. Next