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.

A026622 a(n) = Sum_{k=0..n} A026615(n, k).

Original entry on oeis.org

1, 2, 5, 12, 26, 54, 110, 222, 446, 894, 1790, 3582, 7166, 14334, 28670, 57342, 114686, 229374, 458750, 917502, 1835006, 3670014, 7340030, 14680062, 29360126, 58720254, 117440510, 234881022, 469762046, 939524094, 1879048190, 3758096382, 7516192766
Offset: 0

Views

Author

Keywords

Comments

In general, a first order inhomogeneous recurrence of the form s(0) = a, s(n) = m*s(n-1) + k, n>0, will have a closed form of a*m^n +((m^n-1)/(m-1))*k. - Gary Detlefs, Jun 07 2024

Crossrefs

Programs

  • Magma
    [n le 1 select n+1 else 7*2^(n-2) -2: n in [0..40]]; // G. C. Greubel, Jun 24 2024
    
  • Mathematica
    Table[7*2^(n-2) -2 +Boole[n==1]/2 +(5/4)*Boole[n==0], {n,0,40}] (* G. C. Greubel, Jun 24 2024 *)
  • PARI
    Vec((1-x+x^2+x^3)/((1-x)*(1-2*x)) + O(x^40)) \\ Colin Barker, Feb 17 2016
    
  • SageMath
    [(7*2^n -8 +2*int(n==1) +5*int(n==0))/4 for n in range(41)] # G. C. Greubel, Jun 24 2024

Formula

a(n) = 7 * 2^(n-2) - 2, a(0) = 1, a(1) = 2 (Cf. A026624). - Ralf Stephan, Feb 05 2004
a(n) = 2*a(n-1) + 2, n>2. - Gary Detlefs, Jun 22 2010
From Colin Barker, Feb 17 2016: (Start)
a(n) = 3*a(n-1) - 2*a(n-2) for n>3.
G.f.: (1 - x + x^2 + x^3)/((1 - x)*(1 - 2*x)). (End)
E.g.f.: (1/4)*( 5 + 2*x - 8*exp(x) + 7*exp(2*x) ). - G. C. Greubel, Jun 24 2024