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.

A174296 Row sums of A174294.

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2
Offset: 0

Views

Author

Mats Granvik, Mar 15 2010

Keywords

Crossrefs

Programs

  • Magma
    [n lt 2 select (n+1) else 2 + (n mod 2): n in [0..110]]; // G. C. Greubel, Nov 25 2021
    
  • Mathematica
    Table[If[n<2, n+1, (5-(-1)^n)/2], {n,0,110}] (* G. C. Greubel, Nov 25 2021 *)
  • Sage
    [1,2]+[(5-(-1)^n)/2 for n in (2..110)] # G. C. Greubel, Nov 25 2021

Formula

a(A004280(n)) = 3 for n > 2.
From G. C. Greubel, Nov 25 2021: (Start)
a(n) = a(n-2) for n > 3, with a(0) = 1, a(1) = 2, a(2) = 2, a(3) = 3.
a(n) = (5 - (-1)^n)/2 for n > 1, with a(0) = 1, a(1) = 2.
a(n) = (n+1)*[n<2] + A010693(n)*[n>1].
G.f.: (1_+ 2*x + x^2 + x^3)/(1 - x^2).
E.g.f.: (1/2)*( -exp(-x) - 2*(1+x) + 5*exp(x) ). (End)