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.

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

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

Original entry on oeis.org

3, 4, 7, 15, 32, 65, 129, 256, 511, 1023, 2048, 4097, 8193, 16384, 32767, 65535, 131072, 262145, 524289, 1048576, 2097151, 4194303, 8388608, 16777217, 33554433, 67108864, 134217727, 268435455, 536870912, 1073741825, 2147483649
Offset: 0

Views

Author

Paul Curtz, Jul 13 2007

Keywords

Comments

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

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)), A130750 (first differences), A130752 (second differences).

Programs

  • Magma
    m:=31; S:=[ [3, 1, 2][(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:=[3,4,7]; [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[(3-5*x+4*x^2)/((1-2*x)*(1-x+x^2)), {x, 0, 50}], x] (* or *) LinearRecurrence[{3,-3,2}, {3,4,7}, 30] (* G. C. Greubel, Jan 15 2018 *)
  • PARI
    {m=31; v=vector(m); v[1]=3; v[2]=4; v[3]=7; 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, 0, -1, -1, 0, 1][n%6+1], ","))} \\ Klaus Brockhaus, Aug 03 2007

Formula

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

Extensions

Edited and extended by Klaus Brockhaus, Aug 03 2007

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

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

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