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.

A094024 Alternating 1 with one less than the powers of 2.

Original entry on oeis.org

1, 1, 1, 3, 1, 7, 1, 15, 1, 31, 1, 63, 1, 127, 1, 255, 1, 511, 1, 1023, 1, 2047, 1, 4095, 1, 8191, 1, 16383, 1, 32767, 1, 65535, 1, 131071, 1, 262143, 1, 524287, 1, 1048575, 1, 2097151, 1, 4194303, 1, 8388607, 1, 16777215, 1, 33554431, 1, 67108863, 1
Offset: 0

Views

Author

Paul Barry, Apr 22 2004

Keywords

Comments

Inverse binomial transform of A052542. Partial sums are A075427.
Let F(x) = product {n >= 0} (1 - x^(3*n+1))/(1 - x^(3*n+2)). This sequence is the simple continued fraction expansion of the real number F(1/2) = 0.64227 25013 85234 96714 ... = 1/(1 + 1/(1 + 1/(1 + 1/(3 + 1/(1 + 1/(7 + 1/(1 + 1/(15 + ...)))))))). See A111317. - Peter Bala, Dec 26 2012

Crossrefs

Programs

  • Magma
    [Ceiling((-1)^n+((Sqrt(2))^n-(-Sqrt(2))^n)/Sqrt(2)): n in [0..50]]; // Vincenzo Librandi, Aug 17 2011
    
  • Mathematica
    LinearRecurrence[{-1, 2, 2}, {1, 1, 1}, 60] (* Jean-François Alcover, Jul 02 2018 *)
  • PARI
    a(n)=(1-(-1)^n)*2^floor(n/2)+(-1)^n

Formula

G.f.: (1+2*x) / ((1+x) * (1-2*x^2)).
E.g.f.: exp(-x) + 2*sinh(sqrt(2)*x) / sqrt(2).
a(n) = (-1)^n + ((sqrt(2))^n - (-sqrt(2))^n) / sqrt(2).
a(n) = (1-(-1)^n) * 2^floor(n/2) + (-1)^n. - Ralf Stephan, Aug 19 2013
a(n) = -a(n-1) + 2*a(n-2) + 2*a(n-3). - Andrew Howroyd, Feb 21 2018

Extensions

Better name from Ralf Stephan, Aug 19 2013
Even terms for n >= 60 corrected in b-file by Andrew Howroyd, Feb 21 2018