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.

A274638 Main diagonal of A274637.

Original entry on oeis.org

0, 0, 3, 5, 15, 27, 63, 119, 255, 495, 1023, 2015, 4095, 8127, 16383, 32639, 65535, 130815, 262143, 523775, 1048575, 2096127, 4194303, 8386559, 16777215, 33550335, 67108863, 134209535, 268435455, 536854527, 1073741823, 2147450879, 4294967295, 8589869055, 17179869183, 34359607295, 68719476735
Offset: 0

Views

Author

N. J. A. Sloane, Jul 08 2016

Keywords

Crossrefs

Cf. A274637.

Programs

  • Mathematica
    LinearRecurrence[{3, 0, -6, 4}, {0, 0, 3, 5}, 50] (* Paolo Xausa, Oct 21 2024 *)
  • PARI
    concat([0,0], Vec(x^2*(3-4*x)/((1-x)*(1-2*x)*(1-2*x^2)) + O(x^40))) \\ Colin Barker, Jul 09 2016

Formula

From Colin Barker, Jul 09 2016: (Start)
a(n) = (-1+2^n+2^((n-3)/2)*(-1+(-1)^n)).
a(n) = 2^n-1 for n even.
a(n) = 2^n-1-2^((n-1)/2) for n odd.
a(n) = 3*a(n-1)-6*a(n-3)+4*a(n-4) for n>3.
G.f.: x^2*(3-4*x) / ((1-x)*(1-2*x)*(1-2*x^2)).
(End)