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

A130197 Binomial transform of A130196.

Original entry on oeis.org

1, 2, 1, 5, 3, 1, 12, 8, 4, 1, 27, 20, 12, 5, 1, 58, 47, 32, 17, 6, 1, 121, 105, 79, 49, 23, 7, 1, 248, 226, 184, 128, 72, 30, 8, 1, 503, 474, 410, 312, 200, 102, 38, 9, 1, 1014, 977, 884, 722, 512, 302, 140, 47, 10, 1, 2037, 1991, 1861, 1606, 1234, 814, 442, 187, 57, 11, 1
Offset: 1

Views

Author

Gary W. Adamson, May 16 2007

Keywords

Comments

Row sums = A002064, the Cullen numbers: (1, 3, 9, 25, 65, 161, 385, ...).
Left border = A000325, (2^n - n) starting (1, 2, 5, 12, 27, 58, ...).
Equals A129689 with first column removed. - Georg Fischer, Jul 25 2023

Examples

			First few rows of the triangle:
    1;
    2,   1;
    5,   3,  1;
   12,   8,  4,  1;
   27,  20, 12,  5,  1;
   58,  47, 32, 17,  6, 1;
  121, 105, 79, 49, 23, 7, 1;
  ...
		

Crossrefs

Formula

A007318 * A130196 as infinite lower triangular matrices.

Extensions

a(32) corrected and more terms from Georg Fischer, Jul 25 2023

A203167 (n-1)-st elementary symmetric function of the first n terms of (2,2,1,2,2,1,2,2,1,...)=(A130196 for n>0).

Original entry on oeis.org

1, 4, 8, 20, 48, 64, 144, 320, 384, 832, 1792, 2048, 4352, 9216, 10240, 21504, 45056, 49152, 102400, 212992, 229376, 475136, 983040, 1048576, 2162688, 4456448, 4718592, 9699328, 19922944, 20971520, 42991616, 88080384, 92274688, 188743680
Offset: 1

Views

Author

Clark Kimberling, Dec 30 2011

Keywords

Crossrefs

Programs

  • Mathematica
    f[k_] := 1 + Mod[k^2, 3]; t[n_] := Table[f[k], {k, 1, n}]
    a[n_] := SymmetricPolynomial[n - 1, t[n]]
    Table[a[n], {n, 1, 33}]  (* A203167 *)

Formula

From R. J. Mathar, Jul 02 2013: (Start)
Conjecture: a(n) = 8*a(n-3) - 16*a(n-6).
Conjecture: G.f.: x*(1+4*x+8*x^2+12*x^3+16*x^4) / (-1+4*x^3)^2.
(End)

A380562 Rectangular array R read by descending antidiagonals: (row 1) = (R(1,k)) = (A006337(k)), k >= 1; (row n+1) = inverse runlength sequence of row n; and R(n,1) = (1, 2, 2, 1, 2, 2, 1, 2, 2, ...) = (A130196(n)) for n >= 1. See Comments.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jan 27 2025

Keywords

Comments

For present purposes, all sequences to be considered consist entirely of 1s and 2s. If u and v are such sequences (infinite or finite), we call v an inverse runlength sequence of u if u is the runlength sequence of v. Each u has two inverse runlength sequences, one with first term 1 and the other with first term 2. Consequently, an inverse runlength array (in which each row after the first is an inverse runlength sequence of the preceding row) is determined by its first column. In this array, the first column is the periodic sequence with period 1,1,2. There are three limiting sequences: A378283, A378284, A378285. No two rows are identical.
See A380560 for a guide to related sequences.

Examples

			Corner:
    1  2  1  2  1  1  2  1  2  1  1  2  1  2  1  2  1  1  2
    2  1  1  2  1  1  2  1  2  2  1  2  2  1  2  1  1  2  1
    2  2  1  2  1  1  2  1  2  2  1  2  2  1  1  2  1  1  2
    1  1  2  2  1  2  2  1  2  1  1  2  1  1  2  2  1  2  2
    2  1  2  2  1  1  2  1  1  2  2  1  2  2  1  2  1  1  2
    2  2  1  2  2  1  1  2  1  2  2  1  2  1  1  2  2  1  2
    1  1  2  2  1  2  2  1  1  2  1  2  2  1  2  2  1  1  2
    2  1  2  2  1  1  2  1  1  2  2  1  2  1  1  2  1  1  2
    2  2  1  2  2  1  1  2  1  2  2  1  2  1  1  2  2  1  2
    1  1  2  2  1  2  2  1  1  2  1  2  2  1  2  2  1  1  2
		

Crossrefs

Cf. A000002, A130196 (column 1), A006337, A380560.

Programs

  • Mathematica
    invRE[seq_, k_] := Flatten[Map[ConstantArray[#[[2]], #[[1]]] &,
        Partition[Riffle[seq, {k, 2 - Mod[k + 1, 2]}, {2, -1, 2}], 2]]];
    row1 = Flatten[Table[Nest[Flatten[# /. {1 -> {1, 2}, 2 -> {1, 1, 2}}] &, {1}, n], {n, 3}]]; (* A006337 *)
    rows = {row1};
    col = PadRight[{}, 30, {1, 2, 2}];
    Do[AppendTo[rows, Take[invRE[Last[rows], col[[n]]], Length[row1]]], {n, 2, Length[col]}]
    rows // ColumnForm  (* array *)
    v[n_, k_] := rows[[n]][[k]];
    Table[v[n - k + 1, k], {n, 12}, {k, n, 1, -1}] // Flatten (*sequence*)
    (* Peter J. C. Moses, Nov 20 2024 *)

A380563 Rectangular array R read by descending antidiagonals: (row 1) = (R(1,k)) = (1 + A010060(k)), k >= 1; (row n+1) = inverse runlength sequence of row n; and R(n,1) = (1, 1, 1, 1, 1,...) = (A130196(n)) for n >= 1. See Comments.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jan 27 2025

Keywords

Comments

For present purposes, all sequences to be considered consist entirely of 1s and 2s. If u and v are such sequences (infinite or finite), we call v an inverse runlength sequence of u if u is the runlength sequence of v. Each u has two inverse runlength sequences, one with first term 1 and the other with first term 2. Consequently, an inverse runlength array (in which each row after the first is an inverse runlength sequence of the preceding row) is determined by its first column. In this array, the first column is the periodic sequence with period 1. The limiting sequence is A000002 (Kolakoski sequence). No two rows are identical.
Row 1: 1 + A010060; i.e., R(n,1) = 1 + n-th term op the Thue-Morse sequence.
See A380560 for a guide to related sequences.

Examples

			Corner:
1  2  2  1  2  1  1  2  2  1  1  2  1  2  2  1  2  1  1  2  1  2
1  2  2  1  1  2  1  1  2  1  2  2  1  1  2  1  2  2  1  2  2  1
1  2  2  1  1  2  1  2  2  1  2  1  1  2  1  1  2  2  1  2  1  1
1  2  2  1  1  2  1  2  2  1  2  2  1  1  2  1  1  2  1  2  2  1
1  2  2  1  1  2  1  2  2  1  2  2  1  1  2  1  1  2  2  1  2  1
1  2  2  1  1  2  1  2  2  1  2  2  1  1  2  1  1  2  2  1  2  1
		

Crossrefs

Cf. A000002, A000012 (column 1), A010060.

Programs

  • Mathematica
    invRE[seq_, k_] := Flatten[Map[ConstantArray[#[[2]], #[[1]]] &,
        Partition[Riffle[seq, {k, 2 - Mod[k + 1, 2]}, {2, -1, 2}], 2]]];
    row1 = 1 + ThueMorse[Range[0, 200]] (* 1 + A010060 *);
    rows = {row1};
    col = PadRight[{}, 30, {1}];
    Do[AppendTo[rows, Take[invRE[Last[rows], col[[n]]], Length[row1]]], {n, 2, Length[col]}]
    rows // ColumnForm  (* array *)
    v[n_, k_] := rows[[n]][[k]];
    Table[v[n - k + 1, k], {n, 12}, {k, n, 1, -1}] // Flatten  (*sequence*)
    (*Peter J.C.Moses,Nov 20 2024*)

A131534 Period 3: repeat [1, 2, 1].

Original entry on oeis.org

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, 1
Offset: 0

Views

Author

Paul Curtz, Aug 26 2007

Keywords

Comments

Partial sums of A106510. Inverse binomial transform of A024495 (without leading zeros). - Philippe Deléham, Nov 26 2008
a(n) = A130196(n) - A022003(n) = A080425(n) - A130196(n)+2 = A153727(n)/A130196(n). - Reinhard Zumkeller, Nov 12 2009
Continued fraction expansion of A177346, (1+sqrt(10))/3. - Klaus Brockhaus, May 07 2010
From Daniel Forgues, May 04 2016: (Start)
a(n) = GCD of terms of the sequence S_n = {F_i+F_{i+1}+F_{i+2}+...+F_{i+2n}, i >= 0}, where F_i denotes a Fibonacci number. See A210209.
a(n) = GCD of terms of the sequence S_n = {L_i+L_{i+1}+L_{i+2}+...+L_{i+2n}, i >= 0}, where L_i denotes a Lucas number. See A229339. (End)

Crossrefs

Programs

Formula

G.f.: (x+1)^2/((1-x)*(x^2+x+1)). - R. J. Mathar, Nov 14 2007
a(n) = 4/3 + (2/3)*cos(2*Pi*(n+2)/3). - Jaume Oliver Lafont, May 09 2008
a(n) = A101825(n+1). - R. J. Mathar, Jun 13 2008
a(n) = gcd(F(n)^2+F(n+1)^2, F(n)+F(n+1)). - Gary Detlefs, Dec 29 2010
a(n) = 2 - ((n+2)^2 mod 3). - Gary Detlefs, Oct 13 2011
a(n) = ceiling(n*4/3) - ceiling((n-1)*4/3). - Tom Edgar, Jul 22 2014
a(n) = 2 - abs(3*floor(n/3)+1-n). - Mikael Aaltonen, Jan 02 2015
a(n) = 1+[3|(2n+1)], using Iverson bracket. - Daniel Forgues, May 04 2016
a(n) = a(n-3) for n>2. - Wesley Ivan Hurt, Jul 05 2016
E.g.f.: (4*exp(x) - exp(-x/2)*(cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2)))/3. - Stefano Spezia, Aug 04 2025

A047220 Numbers that are congruent to {0, 1, 3} mod 5.

Original entry on oeis.org

0, 1, 3, 5, 6, 8, 10, 11, 13, 15, 16, 18, 20, 21, 23, 25, 26, 28, 30, 31, 33, 35, 36, 38, 40, 41, 43, 45, 46, 48, 50, 51, 53, 55, 56, 58, 60, 61, 63, 65, 66, 68, 70, 71, 73, 75, 76, 78, 80, 81, 83, 85, 86, 88, 90, 91, 93, 95, 96, 98, 100, 101, 103, 105, 106
Offset: 1

Views

Author

Keywords

Comments

First differences are (1,2,2), repeat, with period 3 (A130196). - N. J. A. Sloane, Dec 03 2015
Also numbers k such that k*(k+2)*(k+4) is divisible by 5. - Bruno Berselli, Dec 28 2017
Maximum sum of degeneracies over all decompositions of the complete graph of order n into four factors. The extremal decompositions are characterized in the Bickle link below. - Allan Bickle, Dec 21 2021

Crossrefs

Cf. A001622, A011655, A130196 (first differences).

Programs

Formula

a(n) = floor(5*(n-1)/3). - Gary Detlefs, Feb 20 2010
a(n) = 2*n - floor(n/3) - (n^2 mod 3), with offset 0. - Gary Detlefs, Mar 19 2010
G.f.: x^2*(1 + 2*x + 2*x^2)/(1 - x)^2/(1 + x + x^2). - Colin Barker, Feb 17 2012
a(n) = n + floor(2*(n-1)/3) - 1. - Arkadiusz Wesolowski, Sep 18 2012
From Wesley Ivan Hurt, Jun 14 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(n) = 5*n/3 - 2 + 2*sin(2*n*Pi/3)/(3*sqrt(3)).
a(3*k) = 5*k-2, a(3*k-1) = 5*k-4, a(3*k-2) = 5*k-5. (End)
E.g.f.: 2 + (5*x - 6)*exp(x)/3 + 2*sin(sqrt(3)*x/2)*(cosh(x/2) - sinh(x/2))/(3*sqrt(3)). - Ilya Gutkovskiy, Jun 14 2016
Sum_{n>=2} (-1)^n/a(n) = sqrt(1-2/sqrt(5))*Pi/5 + 2*log(phi)/sqrt(5) + log(2)/5, where phi is the golden ratio (A001622). - Amiram Eldar, Apr 16 2023

A153727 Period 3: repeat [1, 4, 2] ; Trajectory of 3x+1 sequence starting at 1.

Original entry on oeis.org

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

Views

Author

Philippe Deléham, Dec 30 2008

Keywords

Comments

From Klaus Brockhaus, May 23 2010: (Start)
Continued fraction expansion of (7+sqrt(229))/18.
Decimal expansion of 142/999. (End)
a(A008585(n)) = 1; a(A016777(n)) = 4; a(A016789(n)) = 2. - Reinhard Zumkeller, Oct 08 2011

References

  • C. A. Pickover, The Math Book, 2009; Collatz Conjecture, pp 374-375.

Crossrefs

Row 1 of A347270.
Cf. A178236 (decimal expansion of (7+sqrt(229))/18). Appears in A179133 (n>=1).

Programs

Formula

a(3n)=1, a(3n+1)=4, a(3n+2)=2.
G.f.: (1+4*x+2*x^2)/(1-x^3).
a(n) = 4^n mod 7. - Zerinvary Lajos, Nov 25 2009
a(n) = A130196(n) * A131534(n). - Reinhard Zumkeller, Nov 12 2009
a(n) = 2^(-n mod 3) = 2^A080425(n). - Wesley Ivan Hurt, Jun 20 2014
a(n) = sqrt(4^(5*n) mod 21). - Gary Detlefs, Jul 07 2014
From Wesley Ivan Hurt, Jun 30 2016: (Start)
a(n) = a(n-3) for n>2.
a(n) = (7 - 4*cos(2*n*Pi/3) + 2*sqrt(3)*sin(2*n*Pi/3))/3. (End)

A080425 Period 3: repeat [0, 2, 1].

Original entry on oeis.org

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

Views

Author

Paul Barry, Feb 20 2003

Keywords

Comments

Previous name was: Jacobsthal selector sequence.
The Jacobsthal sequence A001045 can be defined by A001045(n) = Sum_{k=0..floor(n,3)} C(n, a(n-1)+3*k).
The floor of the area under the polygon connecting the lattice points: (n, a(n)) from 0..n is A001477(n), the nonnegative integers. - Wesley Ivan Hurt, Jun 16 2014

Crossrefs

Programs

Formula

a(n) = ceiling(((n mod 3) + 1)/2) + (-1)^((n mod 3) + 1).
G.f.: x*(x+2)/(1-x^3). - Paul Barry, May 25 2003
a(n) = (3 - (n mod 3)) mod 3. - Reinhard Zumkeller, Jul 30 2005
a(n) = 2 * A001045(L(n/3)), where L(j/p) is the Legendre symbol of j and p.
a(n) = (-n) mod 3; also a(n) = 3*ceiling(n/3)-n. - Hieronymus Fischer, May 29 2007
a(n) = A130196(n) + A131534(n) - 2. - Reinhard Zumkeller, Nov 12 2009
a(n) = (2n) mod 3. - Wesley Ivan Hurt, Jun 23 2013
From Wesley Ivan Hurt, Jul 02 2016: (Start)
a(n) = a(n-3) for n>2.
a(n) = 2*sin(n*Pi/3)*(3*sin(n*Pi/3) + sqrt(3)*cos(n*Pi/3))/3. (End)

Extensions

More terms from Reinhard Zumkeller, Jul 30 2005
New name from Joerg Arndt, Apr 21 2014

A022003 Decimal expansion of 1/999.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Expansion in any base b of 1/(b^3-1). E.g., 1/7 in base 2, 1/26 in base 3, 1/63 in base 4, etc. - Franklin T. Adams-Watters, Nov 07 2006
a(n) = A130196(n) - A131534(n). - Reinhard Zumkeller, Nov 12 2009

Examples

			0.001001001001001001001...
		

Crossrefs

Essentially the same as A079978.
Cf. A068601.
Partial sums are given by A002264(n+1).

Programs

  • Mathematica
    Join[{0,0},RealDigits[1/999,10,120][[1]]] (* or *) PadRight[{},120,{0,0,1}] (* Harvey P. Dale, May 24 2012 *)
  • PARI
    a(n)=n%3==2 \\ Jaume Oliver Lafont, Mar 24 2009

Formula

From Mario Catalani (mario.catalani(AT)unito.it), Jan 07 2003: (Start)
G.f.: x^2/(1-x^3).
a(n) = -(1/2)*((-1)^floor((2n-1)/3) + (-1)^floor((2n+1)/3)). (End)
From Hieronymus Fischer, May 29 2007: (Start)
a(n) = ((n+2) mod 3) mod 2.
a(n) = (1/2)*(1 - (-1)^(n + floor((n+2)/3))). (End)
a(n) = (1 + (-1)^Fibonacci(n+1))/2. - Hieronymus Fischer, Jun 14 2007
a(n) = (n^5 - n^2) mod 3. - Gary Detlefs, Mar 20 2010
a(n) = ((-1)^(a(n-1) + a(n-2)) + 1)/2 starting from n=3. - Adriano Caroli, Nov 21 2010
a(n) = 1 - Fibonacci(n+1) mod 2. - Gary Detlefs, Dec 26 2010
a(n) = floor((n+1)/3) - floor(n/3). - Tani Akinari, Oct 22 2012

A179606 Eight white kings and one red king on a 3 X 3 chessboard. G.f.: (1 + x)/(1 - 3*x - 5*x^2).

Original entry on oeis.org

1, 4, 17, 71, 298, 1249, 5237, 21956, 92053, 385939, 1618082, 6783941, 28442233, 119246404, 499950377, 2096083151, 8788001338, 36844419769, 154473265997, 647641896836, 2715292020493, 11384085545659, 47728716739442
Offset: 0

Views

Author

Johannes W. Meijer, Jul 28 2010

Keywords

Comments

a(n) represents the number of n-move routes of a fairy chess piece starting in the central square (m = 5) 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 side squares to A152187.
This sequence belongs to a family of sequences with g.f. (1 + (k-4)*x)/(1 - 3*x - k*x^2). Red king sequences that are members of this family are A007483 (k= 2), A015521 (k=4), A179606 (k=5; this sequence), A154964 (k=6), A179603 (k=7) and A179599 (k=8). We observe that there is no red king sequence for k=3. Other members of this family are A006190 (k=1), A133494 (k=0) and A168616 (k=-2).
Inverse binomial transform of A052918.
The sequence b(n+1) = 6*a(n), n >= 0 with b(0)=1, is a berserker sequence, see A180147. The b(n) sequence corresponds to 16 A[5] vectors with decimal values between 111 and 492. These vectors lead for the corner squares to sequence c(n+1)=4*A179606(n), n >= 0 with c(0)=1, and for the side squares to A180140. - Johannes W. Meijer, Aug 14 2010
Equals the INVERT transform of A063782: (1, 3, 10, 32, 104, ...). Example: a(3) = 71 = (1, 1, 4, 7) dot (32, 10, 3, 1) = (32 + 10 + 12 + 17). - Gary W. Adamson, Aug 14 2010

Crossrefs

Cf. A179597 (central square).

Programs

  • Maple
    with(LinearAlgebra): nmax:=22; m:=5; A[1]:= [0,1,0,1,1,0,0,0,0]: A[2]:= [1,0,1,1,1,1,0,0,0]: A[3]:= [0,1,0,0,1,1,0,0,0]: A[4]:= [1,1,0,0,1,0,1,1,0]: A[5]:= [0,0,0,1,1,1,0,0,1]: A[6]:= [0,1,1,0,1,0,0,1,1]: A[7]:= [0,0,0,1,1,0,0,1,0]: A[8]:= [0,0,0,1,1,1,1,0,1]: A[9]:= [0,0,0,0,1,1,0,1,0]: A:=Matrix([A[1],A[2],A[3],A[4],A[5],A[6],A[7],A[8],A[9]]): for n from 0 to nmax do B(n):=A^n: a(n):= add(B(n)[m,k],k=1..9): od: seq(a(n), n=0..nmax);
  • Mathematica
    CoefficientList[Series[(1+x)/(1-3*x-5*x^2), {x, 0, 22}],x] (* or *) LinearRecurrence[{3,5,0},{1,4},23] (* Indranil Ghosh, Mar 05 2017 *)
  • PARI
    print(Vec((1 + x)/(1- 3*x - 5*x^2) + O(x^23))); \\ Indranil Ghosh, Mar 05 2017

Formula

G.f.: (1+x)/(1 - 3*x - 5*x^2).
a(n) = A015523(n) + A015523(n+1).
a(n) = 3*a(n-1) + 5*a(n-2) with a(0) = 1 and a(1) = 4.
a(n) = ((29 + 7*sqrt(29))*A^(-n-1) + (29-7*sqrt(29))*B^(-n-1))/290 with A = (-3+sqrt(29))/10 and B = (-3-sqrt(29))/10
Limit_{k->oo} a(n+k)/a(k) = (-1)^(n+1)*A000351(n)*A130196(n)/(A015523(n)*sqrt(29) - A072263(n)) for n >= 1.
Showing 1-10 of 25 results. Next