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.

A123672 a(1) = 1; for n > 1, a(n) = (2^n-1)*a(n-1) + (-1)^n.

Original entry on oeis.org

1, 4, 27, 406, 12585, 792856, 100692711, 25676641306, 13120763707365, 13422541272634396, 27475941985082608611, 112513982428913282262046, 921602030075228695008418785, 15098606058722471710322924954656, 494736024726159230532151281989213151
Offset: 1

Views

Author

Benoit Cloitre, Nov 16 2006

Keywords

Comments

This sequence allows us to prove that the constant C defined in A048651 is irrational. Indeed, for any n > 1 we get |(C+1)*A005329(n) - a(n)| < 1/2^n.

Crossrefs

Programs

  • Magma
    [n eq 1 select 1 else (2^n-1)*Self(n-1)+(-1)^n: n in [1..15]]; // Vincenzo Librandi, Oct 18 2017
  • Mathematica
    RecurrenceTable[{a[n] == (2^n - 1) * a[n - 1] + (-1)^n, a[1] == 1}, a, {n, 1, 15}] (* Vaclav Kotesovec, Oct 10 2016 *)
  • PARI
    a(n)=if(n<2,1,(2^n-1)*a(n-1)+(-1)^n)
    

Formula

a(n) ~ c * 2^(n*(n+1)/2), where c = 0.372186658950350942813441530084543367... . - Vaclav Kotesovec, Oct 10 2016