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.

A257548 a(1) = 1, a(2) = 2, a(3) = 5, a(4) = 8 and a(5) = 15, a(n) = Sum_{j=1..n-1} a(j).

Original entry on oeis.org

1, 2, 5, 8, 15, 31, 62, 124, 248, 496, 992, 1984, 3968, 7936, 15872, 31744, 63488, 126976, 253952, 507904, 1015808, 2031616, 4063232, 8126464, 16252928, 32505856, 65011712, 130023424, 260046848, 520093696, 1040187392, 2080374784, 4160749568, 8321499136
Offset: 1

Views

Author

Giovanni Teofilatto, Apr 29 2015

Keywords

Comments

31 is the only prime after 5 (the remaining terms are even).

Crossrefs

Cf. A206371.

Programs

  • Magma
    [1,2,5,8] cat [31*2^n div 64: n in [5..50]]; // Vincenzo Librandi, May 03 2015
    
  • Mathematica
    Join[{1,2,5,8,15}, Table[31*2^(n-6), {n,6,50}]] (* Vincenzo Librandi, May 03 2015 *)
    CoefficientList[ Series[(x^5 -x^4 -2x^3 +x^2 +1)/(1 -2x), {x, 0, 33}], x] (* Robert G. Wilson v, May 05 2015 *)
    Join[{1,2,5,8,15},NestList[2#&,31,30]] (* Harvey P. Dale, Oct 09 2018 *)
  • SageMath
    def A257548(n): return (4*fibonacci(n+1) -3 -(-1)^n)/2 if (n<6) else 31*2^(n-6)
    [A257548(n) for n in range(1,51)] # G. C. Greubel, Jan 05 2023

Formula

For n>=6, a(n) = 31*2^(n-6).
For n>=6, a(n) = A206371(n-6) - 1.
G.f.: x*(1+x^2-2*x^3-x^4+x^5)/(1-2*x). - Robert G. Wilson v, May 05 2015
E.g.f.: (31/64)*exp(2*x) + x/32 + x^2/32 + 3*x^3/16 + x^4/96 - x^5/240. - G. C. Greubel, Jan 05 2023