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

A158745 a(3n)=A130750(n). a(3n+1)=A130752(n). a(3n+2)=A130755(n).

Original entry on oeis.org

1, 2, 3, 3, 5, 4, 8, 9, 7, 17, 16, 15, 33, 31, 32, 64, 63, 65, 127, 128, 129, 255, 257, 256, 512, 513, 511, 1025, 1024, 1023, 2049, 2047, 2048, 4096, 4095, 4097, 8191, 8192, 8193, 16383, 16385, 16384, 32768, 32769, 32767, 65537, 65536, 65535, 131073, 131071, 131072, 262144
Offset: 0

Views

Author

Paul Curtz, Mar 25 2009

Keywords

Comments

This mixes three sequences which are identical to their third differences.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0,0,3,0,0,-3,0,0,2},{1,2,3,3,5,4,8,9,7},60] (* Harvey P. Dale, Mar 12 2023 *)

Formula

a(3n)+a(3n+1)+a(3n+2)= A007283(n+1).
a(18n) = A130750(6n)= 2^(6n+1)-1.
a(n) = 3*a(n-3)-3*a(n-6)+2*a(n-9). G.f.: -(1+2*x+3*x^2-x^4-5*x^5+2*x^6+4*x^8)/((2*x^3-1)*(x^6-x^3+1)). - R. J. Mathar, Jan 23 2009

Extensions

Edited and extended by R. J. Mathar, Apr 09 2009

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

Original entry on oeis.org

2, 3, 7, 13, 27, 53, 107, 213, 427, 853, 1707, 3413, 6827, 13653, 27307, 54613, 109227, 218453, 436907, 873813, 1747627, 3495253, 6990507, 13981013, 27962027, 55924053, 111848107, 223696213, 447392427, 894784853, 1789569707, 3579139413, 7158278827, 14316557653
Offset: 0

Views

Author

Michael Somos, Jun 17 1999

Keywords

Comments

Number of positive integers requiring exactly n signed bits in the modified non-adjacent form representation. - Ralf Stephan, Aug 02 2003
The n-th entry (n>1) of the sequence is equal to the 1,1-entry of the n-th power of the unnormalized 4 X 4 Haar matrix: [1 1 1 0 / 1 1 -1 0 / 1 1 0 1 / 1 1 0 -1]. - Simone Severini, Oct 27 2004
Pisano period lengths: 1, 1, 6, 2, 2, 6, 6, 2, 18, 2, 10, 6, 12, 6, 6, 2, 8, 18, 18, 2, ... - R. J. Mathar, Aug 10 2012
For n >= 1, a(n) is the number of ways to tile a strip of length n+2 with blue squares and blue and red dominos, with the restriction that the first two tiles must be the same color. - Guanji Chen and Greg Dresden, Jul 15 2024

Examples

			G.f. = 2 + 3*x + 7*x^2 + 13*x^3 + 27*x^4 + 53*x^5 + 107*x^6 + 213*x^7 + 427*x^8 + ...
		

Crossrefs

Programs

  • Magma
    [(5*2^n+(-1)^n)/3: n in [0..35]]; // Vincenzo Librandi, Jul 05 2011
    
  • Mathematica
    LinearRecurrence[{1,2},{2,3},40] (* Harvey P. Dale, Dec 11 2017 *)
  • PARI
    {a(n) = if( n<0, 0, (5*2^n + (-1)^n) / 3)};
    
  • PARI
    {a(n) = if (n<0 ,0, if( n<2, n+2, a(n-1) + 2*a(n-2)))};
    
  • Sage
    [(5*2^n+(-1)^n)/3 for n in range(35)] # G. C. Greubel, Apr 10 2019

Formula

G.f.: (2 + x) / (1 - x - 2*x^2).
a(n) = (5*2^n + (-1)^n) / 3.
a(n) = 2^(n+1) - A001045(n).
a(n) = A084170(n)+1 = abs(A083581(n)-3) = A081254(n+1) - A081254(n) = A084214(n+2)/2.
a(n) = 2*A001045(n+1) + A001045(n) (note that 2 is the limit of A001045(n+1)/A001045(n)). - Paul Barry, Sep 14 2009
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=-3, A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=1, a(n-1)=-charpoly(A,-1). - Milan Janjic, Jan 27 2010
Equivalently, with different offset, a(n) = b(n+1) with b(0)=1 and b(n) = Sum_{i=0..n-1} (-1)^i (1 + (-1)^i b(i)). - Olivier Gérard, Jul 30 2012
a(n) = A000975(n-2)*10 + 5 + 2*(-1)^(n-2), a(0)=2, a(1)=3. - Yuchun Ji, Mar 18 2019
a(n+1) = Sum_{i=0..n} a(i) + 1 + (1-(-1)^n)/2, a(0)=2. - Yuchun Ji, Apr 10 2019
a(n) = 2^n + J(n+1) = J(n+2) + J(n+1) - J(n), where J is A001045. - Yuchun Ji, Apr 10 2019
a(n) = A001045(n+2) + A078008(n) = A062510(n+1) - A078008(n+1) = (A001045(n+2) + A062510(n+1))/2 = A014551(n) + 2*A001045(n). - Paul Curtz, Jul 14 2021
From Thomas Scheuerle, Jul 14 2021: (Start)
a(n) = A083322(n) + A024493(n).
a(n) = A127978(n) - A102713(n).
a(n) = A130755(n) - A166249(n).
a(n) = A007679(n) + A139763(n).
a(n) = A168642(n) XOR A007283(n).
a(n) = A290604(n) + A083944(n). (End)
From Paul Curtz, Jul 21 2021: (Start)
a(n) = 5*A001045(n) - A280560(n+1) = abs(A140360(n+1)) - A280560(n+1).
a(n) = 2^n + A001045(n+1) = A001045(n+3) - A000079(n).
a(n) = A001045(n+4) - A340627(n). (End)
a(n) = A001045(n+5) - A005010(n).
a(n+1) + a(n) = a(n+2) - a(n) = 5*2^n. - Michael Somos, Feb 22 2023
a(n) = A135318(2*n) + A135318(2*n+1) = A112387(2*n) + A112387(2*n+1). - Paul Curtz, Jun 26 2024
E.g.f.: (cosh(x) + 5*cosh(2*x) - sinh(x) + 5*sinh(2*x))/3. - Stefano Spezia, May 18 2025

Extensions

Formula of Milan Janjic moved here from wrong sequence by Paul D. Hanna, May 29 2010

A130752 Binomial transform of periodic sequence (2, 3, 1).

Original entry on oeis.org

2, 5, 9, 16, 31, 63, 128, 257, 513, 1024, 2047, 4095, 8192, 16385, 32769, 65536, 131071, 262143, 524288, 1048577, 2097153, 4194304, 8388607, 16777215, 33554432, 67108865, 134217729, 268435456, 536870911, 1073741823, 2147483648, 4294967297, 8589934593
Offset: 0

Views

Author

Paul Curtz, Jul 13 2007

Keywords

Comments

The second sequence of "less twisted numbers"; this sequence, A130750 and A130755 form a "suite en trio" (cf. reference, p. 130).
First differences of A130750, second differences of A130755.
Sequence equals its third differences:
2.....5.....9....16....31....63...128...257...513..1024...
...3.....4.....7....15....32....65...129...256...511...
......1.....3.....8....17....33....64...127...255...
..........2.....5.....9....16....31....63...128...

References

  • P. Curtz, Exercise Book, manuscript, 1995.

Crossrefs

Cf. A010882, A130755 (first differences), A130750 (second differences).

Programs

  • Magma
    m:=31; S:=[ [2, 3, 1][(n-1) mod 3 +1]: n in [1..m] ]; [ &+[ Binomial(i-1, k-1)*S[k]: k in [1..i] ]: i in [1..m] ]; /* Klaus Brockhaus, Aug 03 2007 */
    
  • Mathematica
    a[n_] := 2^(n+1) + 2*Sin[n*Pi/3]/Sqrt[3]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Aug 13 2012 *)
    LinearRecurrence[{3,-3,2},{2,5,9},40] (* Harvey P. Dale, Jun 21 2017 *)
  • PARI
    {m=31; v=vector(m); v[1]=2; v[2]=5; v[3]=9; for(n=4, m, v[n]=3*v[n-1]-3*v[n-2]+2*v[n-3]); v} \\ Klaus Brockhaus, Aug 03 2007
    
  • PARI
    {for(n=0, 30, print1(2^(n+1)+[0, 1, 1, 0, -1, -1][n%6+1], ","))} \\ Klaus Brockhaus, Aug 03 2007
    
  • PARI
    Vec((2-x) / ((1-2*x)*(1-x+x^2)) + O(x^40)) \\ Colin Barker, Jan 20 2017

Formula

G.f.: (2 - x) / ((1 - 2*x)*(1 - x + x^2)).
a(0) = 2; a(1) = 5; a(2) = 9; for n > 2, a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3).
a(n) = 2^(n+1) + A128834(n).
a(0) = 2; for n > 0, a(n) = 2*a(n-1) + A057079(n+1).
E.g.f.: 2*(sqrt(3)*exp(2*x) + sin(sqrt(3)*x/2)*exp(x/2))/sqrt(3). - Ilya Gutkovskiy, Jun 20 2016
a(n) = 2^(n+1) + (2*sin((Pi*n)/3))/sqrt(3). - Colin Barker, Jan 20 2017

Extensions

Edited and extended by Klaus Brockhaus, Aug 03 2007

A130750 Binomial transform of A010882.

Original entry on oeis.org

1, 3, 8, 17, 33, 64, 127, 255, 512, 1025, 2049, 4096, 8191, 16383, 32768, 65537, 131073, 262144, 524287, 1048575, 2097152, 4194305, 8388609, 16777216, 33554431, 67108863, 134217728, 268435457, 536870913, 1073741824, 2147483647
Offset: 0

Views

Author

Paul Curtz, Jul 13 2007

Keywords

Comments

The first sequence of "less twisted numbers"; this sequence, A130752 and A130755 form a "suite en trio" (cf. reference, p. 130).
First differences of A130755, second differences of A130752.
Sequence equals its third differences:
1 3 8 17 33 64 127 255 512 1025
2 5 9 16 31 63 128 257 513
3 4 7 15 32 65 129 256
1 3 8 17 33 64 127

References

  • P. Curtz, Exercise Book, manuscript, 1995.

Crossrefs

Cf. A010882 (periodic (1, 2, 3)), A128834 (periodic (0, 1, 1, 0, -1, -1)), A057079 (periodic (1, 2, 1, -1, -2, -1)), A130752 (first differences), A130755 (second differences).

Programs

  • Magma
    m:=31; S:=[ [1, 2, 3][(n-1) mod 3 +1]: n in [1..m] ]; [ &+[ Binomial(i-1, k-1)*S[k]: k in [1..i] ]: i in [1..m] ]; // Klaus Brockhaus, Aug 03 2007
    
  • Magma
    I:=[1,3,8]; [n le 3 select I[n] else 3*Self(n-1) - 3*Self(n-2) + 2*Self(n-3): n in [1..30]]; // G. C. Greubel, Jan 15 2018
    
  • Mathematica
    CoefficientList[Series[(1+2*x^2)/((1-2*x)*(1-x+x^2)), {x, 0, 50}], x] (* or *) LinearRecurrence[{3,-3,2}, {1,3,8}, 30] (* G. C. Greubel, Jan 15 2018 *)
  • PARI
    {m=31; v=vector(m); v[1]=1; v[2]=3; v[3]=8; for(n=4, m, v[n]=3*v[n-1]-3*v[n-2]+2*v[n-3]); v} \\ Klaus Brockhaus, Aug 03 2007
    
  • PARI
    {for(n=0, 30, print1(2^(n+1)+[ -1, -1,0, 1, 1, 0][n%6+1], ","))} \\ Klaus Brockhaus, Aug 03 2007

Formula

G.f.: (1+2*x^2)/((1-2*x)*(1-x+x^2)).
a(0) = 1; a(1) = 3; a(2) = 8; for n > 2, a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3).
a(n) = 2^(n+1) + A128834(n+4).
a(0) = 1; for n > 0, a(n) = 2*a(n-1) + A057079(n-1).

Extensions

Edited and extended by Klaus Brockhaus, Aug 03 2007

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

A130785 Sequence identical to its third differences: a(n+3) = 3a(n+2)-3a(n+1)+2a(n), with a(0)=1, a(1)=4, a(2)=9.

Original entry on oeis.org

1, 4, 9, 17, 32, 63, 127, 256, 513, 1025, 2048, 4095, 8191, 16384, 32769, 65537, 131072, 262143, 524287, 1048576, 2097153, 4194305, 8388608, 16777215, 33554431, 67108864, 134217729, 268435457, 536870912, 1073741823, 2147483647, 4294967296, 8589934593
Offset: 0

Views

Author

Paul Curtz, Jul 15 2007

Keywords

Comments

From R. J. Mathar, Nov 22 2007: (Start)
Sequences which equal the sequence of their d-th differences obey linear recurrences with constant binomial coefficients of the form Sum_{i=0..d} binomial(d,d-i)*(-1)^i*a(n-i) = a(n-d).
If d is even, this simplifies to Sum_{i=0..d-1} binomial(d,d-i)*(-1)^i*a(n-i) = 0.
This binding of d (d odd) or d-1 (d even) consecutive terms by the recurrences leaves d or d-1, respectively, free parameters to choose a(0),a(1),...,a(d) or a(0),a(1),...,a(d-1), respectively, which ultimately define the individual sequence.
The generating functions are
d=2: a(0)/(1-2*x).
d=3: (1/3)*(-a(0) + a(1) - a(2))/(-1+2*x) + (1/3)*(-4*a(0)*x - x*a(2) + 4*a(1)*x - a(2) + 2*a(0) + a(1))/(x^2-x+1).
d=4: (1/2)*(-2*a(0) + 2*a(1) - a(2))/(-1+2*x) + (1/2)*(2*a(1)*x - 4*a(0)*x - a(2) + 2*a(1))/(1 - 2*x + 2*x^2).
In the present sequence we have d=3 and g.f. = (x-1)/(x^2-x+1) - 2/(-1+2*x). (End)
Also binomial transform of A130784. a(n) = 2^(n+1) + A010892(n+4).
Recurrence in shorter form: a(n) = 2*a(n) + periodically extended [2, 1, -1, -2, -1, 1].
See A130750, A130752, A130755 for other examples of d=3 sequences, A130781 for an example of d=4.

Examples

			Triangle of sequence and 1st, 2nd, 3rd differences:
  1   4   9  17  32  63 127 256 513
    3   5   8  15  31  64 129 257
      2   3   7  16  33  65 128
        1   4   9  17  32  63 ... equal to first row
		

Programs

  • Mathematica
    d = 3; nmax = 20; a[n_ /; n < d] := (n+1)^2; seq = Table[a[n], {n, 0, nmax}]; seq /. Solve[ Thread[ Take[seq, nmax - d + 1] == Differences[seq, d]]] // First (* Jean-François Alcover, Nov 07 2013 *)
    LinearRecurrence[{3, -3, 2},{1, 4, 9},21] (* Ray Chandler, Sep 23 2015 *)
    Table[2^(n + 1) - Cos[(2 n + 1) Pi/6] 2/Sqrt[3], {n, 0, 32}] (* Vladimir Reshetnikov, Oct 15 2017 *)

Formula

a(n) = 2^(n+1) - cos((2*n+1)*Pi/6) * 2/sqrt(3). - Vladimir Reshetnikov, Oct 15 2017
G.f.: (1+x)/((1-2*x)*(1-x+x^2)). - Joerg Arndt, Oct 16 2017

Extensions

Edited and extended by R. J. Mathar, Nov 22 2007

A242563 a(n) = 2*a(n-1) - a(n-3) + 2*a(n-4), a(0)=a(1)=0, a(2)=2, a(3)=3.

Original entry on oeis.org

0, 0, 2, 3, 6, 10, 21, 42, 86, 171, 342, 682, 1365, 2730, 5462, 10923, 21846, 43690, 87381, 174762, 349526, 699051, 1398102, 2796202, 5592405, 11184810, 22369622, 44739243, 89478486, 178956970, 357913941, 715827882, 1431655766, 2863311531, 5726623062, 11453246122
Offset: 0

Views

Author

Paul Curtz, May 17 2014

Keywords

Comments

Generally, a(n) is an autosequence if its inverse binomial transform is (-1)^n*a(n). It is of the first kind if the main diagonal is 0's and the first two upper diagonals (just above the main one) are the same. It is of the second kind if the main diagonal is equal to the first upper diagonal multiplied by 2. If the first upper diagonal is an autosequence, the sequence is a super autosequence. Example: A113405. The first upper diagonal is A001045(n). Another super autosequence: 0, 0, 0 followed by A059633(n). The first upper diagonal is A000045(n).
Difference table of a(n):
0, 0, 2, 3, 6, 10, 21, 42, ...
0, 2, 1, 3, 4, 11, 21, 44, ...
2, -1, 2, 1, 7, 10, 23, 41, ...
-3, 3, -1, 6, 3, 13, 18, 45, ... .
This is an autosequence of the second kind. The main diagonal is 2*A001045(n) = A078008(n). More precisely it is a super autosequence, companion of A113405(n).
a(n+1) mod 10 = period 12: repeat 0, 2, 3, 6, 0, 1, 2, 6, 1, 2, 2, 5.
It is shifted A081374(n+1) mod 10 =
period 12: repeat 1, 2, 2, 5, 0, 2, 3, 6, 0, 1, 2, 6.
a(n) mod 9 = period 18:
repeat 0, 0, 2, 3, 6, 1, 3, 6, 5, 0, 0, 7, 6, 3, 8, 6, 3, 4 = c(n).
c(n) + c(n+9) = 0, 0, 9, 9, 9, 9, 9, 9, 9.

Examples

			G.f. = 2*x^2 + 3*x^3 + 6*x^4 + 10*x^5 + 21*x^6 + 42*x^7 + 86*x^8 + ...
		

Crossrefs

Cf. A000032, 1/(n+1), A164555/A027642 (all autosequences of 2nd kind). A007283, A175805.

Programs

  • Mathematica
    a[n_] := (m = Mod[n, 6]; 1/3*(2^n + (-1)^n + 1/120*(m-6)*(m+1)*(m^3-29*m+40))); Table[a[n], {n, 0, 35}] (* Jean-François Alcover, May 19 2014, a non-recursive formula, after Mathematica's RSolve *)
    LinearRecurrence[{2, 0, -1, 2}, {0, 0, 2, 3},50] (* G. C. Greubel, Feb 21 2017 *)
  • PARI
    concat([0,0], Vec(x^2*(x-2)/((x+1)*(2*x-1)*(x^2-x+1)) + O(x^100))) \\ Colin Barker, May 18 2014

Formula

a(n+3) = 3*2^n - a(n), a(0)=a(1)=0, a(2)=2.
a(n) = 2*A113405(n+1) - A113405(n).
a(n+1) = 2*a(n) + period 6: repeat 0, 2, -1, 0, -2, 1. a(0)=0.
a(n) = 2^n - A081374(n+1).
a(n+3) = a(n+1) + A130755(n).
G.f.: x^2*(x-2) / ((x+1)*(2*x-1)*(x^2-x+1)). - Colin Barker, May 18 2014
a(n) = A024495(n) + A131531(n).
a(n+6) = a(n) + 21*2^n, a(0)=a(1)=0, a(2)=2, a(3)=3, a(4)=6, a(5)=10.
a(n) = A001045(n) - A092220(n).
a(n+12) = a(n) + 1365*2^n. First 12 values in the Data. (A024495(n+12) = A024495(n) + 1365*2^n).
a(3n) = A132805(n) = 3*A015565(n).
a(3n+1) = A132804(n) = 6*A015565(n).
a(3n+2) = A132397(n) = 2*A082311(n).
a(n) = 1/3*((-1)^n - 2*cos((n*Pi)/3) + 2^n). - Alexander R. Povolotsky, Jun 02 2014

Extensions

More terms from Colin Barker, May 18 2014

A140430 Period 6: repeat [3, 2, 4, 1, 2, 0].

Original entry on oeis.org

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

Views

Author

Paul Curtz, Jun 25 2008

Keywords

Comments

Associate to sequence identical to half its p-th differences.
Corresponding n-th differences table:
3, 2, 4, 1, 2, 0, 3;
-1, 2, -3, 1, -2, 3, -1;
3, -5, 4, -3, 5, -4, 3;
-8, 9, -7, 8, -9, 7, -8;
17, -16, 15, -17, 16, -15, 17;
-33, 31, -32, 33, -31, 32, -33;
64, -63, 65, -64, 63, -65, 64;
Note that the main diagonal is 3 followed by A000079(n+1).
Note also the southeast diagonal 4, 1, 5, 7, 17 is 4 followed by A014551(n+1).
Note also 3*A001045(n+1), one signed and one unsigned, in two southeast diagonals.
Starting from second line, the first column is A130750 signed.
Starting from second line, the second column is A130752 signed.
Starting from second line, the third column is A130755 signed.

Crossrefs

Cf. A000079 (2^n), A001045 (Jacobsthal), A014551 (Jacobsthal-Lucas).

Programs

Formula

From Wesley Ivan Hurt, Aug 29 2014: (Start)
G.f.: (3-x+2*x^2)/((1-x)*(1+x^3)).
a(n) = a(n-1)-a(n-3)+a(n-4);
a(n) = 2 + ((-n-2) mod 3) * (-1)^n. (End)
a(n) = (6 + 3*cos(n*Pi) + 2*sqrt(3)*sin(n*Pi/3))/3. - Wesley Ivan Hurt, Jun 20 2016

Extensions

More terms from Wesley Ivan Hurt, Aug 29 2014

A281166 a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3) for n>2, a(0)=a(1)=1, a(2)=3.

Original entry on oeis.org

1, 1, 3, 8, 17, 33, 64, 127, 255, 512, 1025, 2049, 4096, 8191, 16383, 32768, 65537, 131073, 262144, 524287, 1048575, 2097152, 4194305, 8388609, 16777216, 33554431, 67108863, 134217728, 268435457, 536870913, 1073741824, 2147483647, 4294967295, 8589934592
Offset: 0

Views

Author

Paul Curtz, Jan 16 2017

Keywords

Comments

a(n) is the first sequence on three (with its first and second differences):
1, 1, 3, 8, 17, 33, 64, 127, ...;
0, 2, 5, 9, 16, 31, 63, 128, ..., that is 0 followed by A130752;
2, 3, 4, 7, 15, 32, 65, 129, ..., that is 2 followed by A130755;
1, 1, 3, 8, 17, 33, 64, 127, ..., this sequence.
The main diagonal is 2^n.
The sum of the first three lines is 3*2^n.
Alternated sum and subtraction of a(n) and its inverse binomial transform (period 3: repeat [1, 0, 2]) gives the autosequence of the first kind b(n):
0, 1, 1, 9, 17, 35, 63, 127, ...
1, 0, 8, 8, 18, 28, 64, 126, ...
-1, 8, 0, 10, 10, 36, 62, 134, ...
9, -8, 10, 0, 26, 26, 72, 118, ... .
The main diagonal is 0's. The first two upper diagonals are A259713.
The sum of the first three lines gives 9*A001045.
a(n) mod 9 gives a periodic sequence of length 6: repeat [1, 1, 3, 8, 8, 6].
a(n) = A130750(n-1) for n > 2. - Georg Fischer, Oct 23 2018

Crossrefs

Programs

  • Magma
    I:=[1,1,3]; [n le 3 select I[n] else 3*Self(n-1) - 3*Self(n-2) + 2*Self(n-3): n in [1..30]]; // G. C. Greubel, Jan 15 2018
  • Mathematica
    LinearRecurrence[{3, -3, 2}, {1, 1, 3}, 30] (* Jean-François Alcover, Jan 16 2017 *)
  • PARI
    Vec((1 - 2*x + 3*x^2) / ((1 - 2*x)*(1 - x + x^2)) + O(x^40)) \\ Colin Barker, Jan 16 2017
    

Formula

Binomial transform of the sequence of length 3: repeat [1, 0, 2].
a(n+3) = -a(n) + 9*2^n.
a(n) = 2^n - periodic 6: repeat [0, 1, 1, 0, -1, -1, 0].
a(n+6) = a(n) + 63*2^n.
a(n+1) = 2*a(n) - period 6: repeat [1, -1, -2, -1, 1, 2].
a(n) = 2^n - 2*sin(Pi*n/3)/sqrt(3). - Jean-François Alcover and Colin Barker, Jan 16 2017
G.f.: (1 - 2*x + 3*x^2)/((1 - 2*x)*(1 - x + x^2)). - Colin Barker, Jan 16 2017
Showing 1-9 of 9 results.