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.

A328881 a(n+3) = 2^n - a(n), a(0)=a(2)=1, a(1)=0 for n >= 0.

Original entry on oeis.org

1, 0, 1, 0, 2, 3, 8, 14, 29, 56, 114, 227, 456, 910, 1821, 3640, 7282, 14563, 29128, 58254, 116509, 233016, 466034, 932067, 1864136, 3728270, 7456541, 14913080, 29826162, 59652323, 119304648, 238609294, 477218589, 954437176, 1908874354, 3817748707
Offset: 0

Views

Author

Paul Curtz, Oct 29 2019

Keywords

Comments

The array of a(n) and its repeated differences:
1, 0, 1, 0, 2, 3, 8, 14, ...
-1, 1, -1, 2, 1, 5, 6, 15, ...
2, -2, 3, -1, 4, 1, 9, 12, ...
-4, 5, -4, 5, -3, 8, 3, 19, ...
9, -9, 9, -8, 11, -5, 16, 5, ...
-18, 18, -17, 19, -16, 21, -11, 32, ...
36, -35, 36, -35, 37, -32, 43, -21, ...
-71, 71, -71, 72, -69, 75, -64, 85, ...
...
The recurrence is the same for every row.
From Jean-François Alcover, Nov 28 2019: (Start)
It appears that, when odd, a(n) is never a multiple of 5.
Main and 3rd upper diagonals of the difference array are A001045 (Jacobsthal numbers); first upper diagonal is negated A001045; second upper diagonal is A000079 (powers of 2); 4th upper diagonal is A062092.
(End)

Crossrefs

Programs

  • Mathematica
    a[0] = a[2] = 1; a[1] = 0; a[n_] := a[n] = 2^(n - 3) - a[n - 3]; Array[a, 36, 0] (* Amiram Eldar, Nov 06 2019 *)
  • PARI
    Vec((1 - 2*x + x^2 - x^3) / ((1 + x)*(1 - 2*x)*(1 - x + x^2)) + O(x^40)) \\ Colin Barker, Oct 29 2019

Formula

a(n+1) - 2*a(n) = period 6: repeat [-2, 1, -2, 2, -1, 2].
a(n+12) - a(n) = 455*2^n.
From Colin Barker, Oct 29 2019: (Start)
G.f.: (1 - 2*x + x^2 - x^3) / ((1 + x)*(1 - 2*x)*(1 - x + x^2)).
a(n) = 2*a(n-1) - a(n-3) + 2*a(n-4) for n>3.
(End)
a(n+2) - a(n) = A024495(n).
a(n+6) - a(n) = 7*2^n.
a(n+9) + a(n) = 57*2^n.
a(n) = A113405(n) + A092220(n+5).
9*a(n) = 2^n + 5*(-1)^n + 3*A010892(n). - R. J. Mathar, Nov 28 2019