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.

A226538 a(2t) = a(2t-1) + 1, a(2t+1) = a(2t) + a(2t-2) for t >= 1, with a(0) = a(1) = 1.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 7, 11, 12, 19, 20, 32, 33, 53, 54, 87, 88, 142, 143, 231, 232, 375, 376, 608, 609, 985, 986, 1595, 1596, 2582, 2583, 4179, 4180, 6763, 6764, 10944, 10945, 17709, 17710, 28655, 28656, 46366, 46367, 75023, 75024, 121391, 121392, 196416, 196417
Offset: 0

Views

Author

V. T. Jayabalaji, Jun 10 2013

Keywords

Programs

  • Haskell
    a226538 n = a226538_list !! n
    a226538_list = concat $ transpose [drop 2 a000071_list, tail a001911_list]
    -- Reinhard Zumkeller, Jun 18 2013
  • Maple
    f:= proc(n) option remember;
          if n <= 1 then 1
        elif n mod 2 = 0 then f(n-1)+1
        else f(n-1)+f(n-3)
          fi
        end:
    t21:=[seq(f(n),n=0..60)];
  • Mathematica
    LinearRecurrence[{0, 2, 0, 0, 0, -1}, {1, 1, 2, 3, 4, 6}, 50] (* Jean-François Alcover, Feb 13 2018 *)

Formula

a(2n) = A000071(n+3), a(2n+1) = A001911(n+1). - Philippe Deléham, Jun 18 2013
G.f.: (1+x+x^3)/((1-x)*(1+x)*(1-x^2-x^4)). - Philippe Deléham, Jun 18 2013
a(n) = a(n-1) + a(n-3)*(1-(-1)^n)/2 + (1+(-1)^n)/2. - Paolo P. Lava, Jun 27 2013

Extensions

Edited by N. J. A. Sloane, Jun 18 2013