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.

A108104 Sequence A000930 with terms repeated.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 6, 6, 9, 9, 13, 13, 19, 19, 28, 28, 41, 41, 60, 60, 88, 88, 129, 129, 189, 189, 277, 277, 406, 406, 595, 595, 872, 872, 1278, 1278, 1873, 1873, 2745, 2745, 4023, 4023, 5896, 5896, 8641, 8641, 12664, 12664, 18560, 18560
Offset: 0

Views

Author

Roger L. Bagula, Jun 03 2005

Keywords

Comments

The usual policy in the OEIS is not to include such "doubled" sequences. This is an exception. - N. J. A. Sloane
Based on the morphism 1->{5}, 2->{6}, 3->{4}, 4->{2}, 5->{3}, 6->{1, 6}.

Crossrefs

Cf. A000930.

Programs

  • Magma
    I:=[1,1,1,1,1,1]; [n le 6 select I[n] else Self(n-2)+Self(n-6): n in [1..60]]; // Vincenzo Librandi, Jan 19 2016
  • Mathematica
    s[1] = {5}; s[2] = {6}; s[3] = {4}; s[4] = {2}; s[5] = {3}; s[6] = {1, 2}; t[a_] := Flatten[s /@ a]; p[0] = {1}; p[1] = t[p[0]]; p[n_] := t[p[n - 1]] a0 = Table[Length[p[i]], {i, 0, 50}]
    m = 6; For[n = 0, n < m, n++, a[n] = 1]; For[n = m, n < 51, n++, a[n] = a[n - m] + a[n - 2]]; Table[a[n], {n, 0, 50}] (* Sergio Falcon, Nov 12 2015 *)
    CoefficientList[Series[(1 + x) / (1 - x^2 - x^6), {x, 0, 50}], x] (* or *) LinearRecurrence[{0, 1, 0, 0, 0, 1}, {1, 1, 1, 1, 1, 1}, 60] (* Vincenzo Librandi, Jan 19 2016 *)
  • PARI
    x='x+O('x^55); Vec((1+x)/(1-x^2-x^6)) \\ Altug Alkan, Nov 10 2015
    

Formula

a(n) = a(n-2) + a(n-6), starting 1,1,1,1,1,1.
G.f.: (1+x)/(1-x^2-x^6).

Extensions

Edited by N. J. A. Sloane, Dec 01 2006