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

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

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

Original entry on oeis.org

0, 1, 2, 5, 13, 30, 63, 127, 254, 509, 1021, 2046, 4095, 8191, 16382, 32765, 65533, 131070, 262143, 524287, 1048574, 2097149, 4194301, 8388606, 16777215, 33554431, 67108862, 134217725, 268435453, 536870910, 1073741823, 2147483647, 4294967294, 8589934589
Offset: 0

Views

Author

Paul Curtz, Feb 07 2017

Keywords

Comments

After 0, partial sums of A281166.
Table of the first differences:
0, 1, 2, 5, 13, 30, 63, 127, 254, 509, 1021, 2046, ...
1, 1, 3, 8, 17, 33, 64, 127, 255, 512, 1025, 2049, ... A281166
0, 2, 5, 9, 16, 31, 63, 128, 257, 513, 1024, 2047, ...
2, 3, 4, 7, 15, 32, 65, 129, 256, 511, 1023, 2048, ...
repeat A281166.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{4, -6, 5, -2}, {0, 1, 2, 5}, 34] (* Robert P. P. McKone, Feb 07 2021 *)
  • PARI
    concat(0, Vec(x*(1 - 2*x + 3*x^2) / ((1 - x)*(1 - 2*x)*(1 - x + x^2)) + O(x^50))) \\ Colin Barker, Feb 10 2017

Formula

From Colin Barker, Feb 10 2017: (Start)
G.f.: x*(1 - 2*x + 3*x^2)/((1 - x)*(1 - 2*x)*(1 - x + x^2)).
a(n) = 4*a(n-1) - 6*a(n-2) + 5*a(n-3) - 2*a(n-4) for n>3. (End)
From Bruno Berselli, Feb 10 2017: (Start)
a(n) = 2^n + ((-1)^floor(n/3) + (-1)^floor((n+1)/3))/2 - 2. Therefore:
a(3*k) = 8^k + (-1)^k - 2,
a(3*k+1) = 2*8^k + (-1)^k - 2,
a(3*k+2) = 4*8^k - 2. (End)
a(n+6*h) = a(n) + 2^n*(64^h - 1) with h>=0. For h=1, a(n+6) = a(n) + 63*2^n.
a(n) - (a(n) mod 9) = A153237(n) = 9*A153234(n).

Extensions

More terms from Colin Barker, Feb 10 2017
Showing 1-2 of 2 results.