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.

Showing 1-5 of 5 results.

A005229 a(1) = a(2) = 1; for n > 2, a(n) = a(a(n-2)) + a(n - a(n-2)).

Original entry on oeis.org

1, 1, 2, 3, 3, 4, 5, 6, 6, 7, 7, 8, 9, 10, 10, 11, 12, 12, 13, 14, 15, 16, 16, 17, 17, 18, 19, 19, 20, 20, 21, 22, 23, 24, 24, 25, 26, 26, 27, 28, 29, 29, 30, 30, 30, 31, 32, 33, 34, 35, 36, 36, 37, 37, 38, 39, 39, 40, 41, 42, 43, 43, 44, 45, 45, 45, 46
Offset: 1

Views

Author

Keywords

Comments

By induction a(n) <= n, but an exact rate of growth is not known.

References

  • J. Arkin, D. C. Arney, L. S. Dewald, and W. E. Ebel, Jr., Families of recursive sequences, J. Rec. Math., 22 (No. 22, 1990), 85-94.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    import Data.Function (on)
    a005229 n = a005229_list !! (n-1)
    a005229_list = 1 : 1 : zipWith ((+) `on` a005229)
                           a005229_list (zipWith (-) [3..] a005229_list)
    -- Reinhard Zumkeller, Jan 17 2014
    
  • Maple
    A005229:= proc(n) option remember;
         if n<=2 then 1 else A005229(A005229(n-2)) +A005229(n-A005229(n-2));
         fi; end;
    seq(A005229(n), n=1..70)
  • Mathematica
    a[1] = a[2] = 1; a[n_] := a[n] = a[a[n-2]] + a[n - a[n-2]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Sep 06 2013 *)
  • PARI
    a(n)=an[n]; an=vector(100,n,1); for(n=3,100,an[n]=a(a(n-2))+a(n-a(n-2)))
    
  • Sage
    @CachedFunction
    def a(n): # A005229
        if (n<3): return 1
        else: return a(a(n-2)) + a(n-a(n-2))
    [a(n) for n in (1..100)] # G. C. Greubel, Mar 27 2022

Extensions

Typo in definition corrected by Nick Hobson, Feb 21 2007

A147871 Expansion of Product_{k > 0} (1 + A147665(k)*x^k).

Original entry on oeis.org

1, 1, 1, 3, 4, 7, 10, 15, 24, 37, 49, 73, 105, 142, 208, 294, 391, 538, 752, 988, 1359, 1812, 2410, 3232, 4270, 5598, 7454, 9721, 12639, 16625, 21445, 27649, 35793, 46235, 59141, 76215, 96975, 123262, 157671, 199625, 252591, 319792, 403262, 507682
Offset: 0

Views

Author

Roger L. Bagula, Nov 16 2008

Keywords

Examples

			From _Petros Hadjicostas_, Apr 11 2020: (Start)
Let f(m) = A147665(m). Using the strict partitions of each n (see A000009), we get
a(1) = f(1) = 1,
a(2) = f(2) = 1,
a(3) = f(3) + f(1)*f(2) = 2 + 1*1 = 3,
a(4) = f(4) + f(1)*f(3) = 2 + 1*2 = 4,
a(5) = f(5) + f(1)*f(4) + f(2)*f(3) = 3 + 1*2 + 1*2 = 7,
a(6) = f(6) + f(1)*f(5) + f(2)*f(4) + f(1)*f(2)*f(3) = 3 + 1*3 + 1*2 + 1*1*2 = 10,
a(7) = f(7) + f(1)*f(6) + f(2)*f(5) + f(3)*f(4) + f(1)*f(2)*f(4) = 3 + 1*3 + 1*3 + 2*2 + 1*1*2 = 15. (End)
		

Crossrefs

Programs

  • Mathematica
    (*A147665*) f[0] = 0; f[1] = 1; f[2] = 1; f[n_] := f[n] = f[f[n - 1]] + If[Mod[ n, 3] == 0, f[f[n/3]], If[Mod[n, 3] == 1, f[f[(n - 1)/3]], f[n - f[(n - 2)/3]]]];
    P[x_, n_] := P[x, n] = Product[1 + f[m]*x^m, {m, 0, n}];
    Take[CoefficientList[P[x, 45], x], 45] (* Program simplified by Petros Hadjicostas, Apr 13 2020 *)

Formula

a(n) = [x^n] Product_{k > 0} (1 + A147665(k)*x^k).
a(n) = Sum_{(b_1,...,b_n)} f(1)^b_1 * f(2)^b_2 * ... * f(n)^b_n, where f(m) = A147665(m), and the sum is taken over all lists (b_1,...,b_n) with b_j in {0,1} and Sum_{j=1..n} j*b_j = n. - Petros Hadjicostas, Apr 11 2020

Extensions

Various sections edited by Petros Hadjicostas, Apr 11 2020

A147869 Expansion of Product_{k>0} (1 + A004001(k)*x^k).

Original entry on oeis.org

1, 1, 1, 3, 4, 7, 11, 17, 25, 41, 59, 86, 125, 180, 263, 382, 536, 738, 1073, 1466, 2028, 2841, 3889, 5275, 7211, 9800, 13249, 17860, 23948, 31921, 42864, 56802, 75115, 99788, 131239, 172870, 226789, 296404, 386745, 504939, 655227, 849628, 1101270
Offset: 0

Views

Author

Roger L. Bagula, Nov 16 2008

Keywords

Examples

			From _Petros Hadjicostas_, Apr 11 2020: (Start)
Let f(m) = A004001(m). Using the strict partitions of each n (see A000009), we get
a(1) = f(1) = 1,
a(2) = f(2) = 1,
a(3) = f(3) + f(1)*f(2) = 2 + 1*1 = 3,
a(4) = f(4) + f(1)*f(3) = 2 + 1*2 = 4,
a(5) = f(5) + f(1)*f(4) + f(2)*f(3) = 3 + 1*2 + 1*2 = 7,
a(6) = f(6) + f(1)*f(5) + f(2)*f(4) + f(1)*f(2)*f(3) = 4 + 1*3 + 1*2 + 1*1*2 = 11,
a(7) = f(7) + f(1)*f(6) + f(2)*f(5) + f(3)*f(4) + f(1)*f(2)*f(4) = 4 + 1*4 + 1*3 + 2*2 + 1*1*2 = 17. (End)
		

Crossrefs

Programs

  • Mathematica
    f[0] = 0; f[1] = 1; f[2] = 1; f[n_] := f[n] = f[f[n - 1]] + f[n - f[n - 1]];
    P[x_, n_] := P[x, n] = Product[1 + f[m]*x^m, {m, 0, n}];
    Take[CoefficientList[P[x, 45], x], 45]

Formula

a(n) = [x^n] Product_{k > 0} (1 + A004001(k)*x^k).
a(n) = Sum_{(b_1,...,b_n)} f(1)^b_1 * f(2)^b_2 * ... * f(n)^b_n, where f(m) = A004001(m), and the sum is taken over all lists (b_1,...,b_n) with b_j in {0,1} and Sum_{j=1..n} j*b_j = n. - Petros Hadjicostas, Apr 11 2020

Extensions

Various sections edited by Petros Hadjicostas, Apr 11 2020

A147953 Expansion of Product_{k > 0} (1 + f(k)*x^k), where f(n) = A147952(n).

Original entry on oeis.org

1, 1, 1, 3, 4, 7, 9, 14, 22, 32, 43, 61, 89, 118, 167, 235, 312, 417, 572, 748, 1006, 1326, 1744, 2283, 2982, 3878, 5048, 6518, 8355, 10786, 13727, 17436, 22173, 28250, 35561, 45008, 56651, 70818, 88992, 111280, 138431, 172284, 214019, 265166, 328127
Offset: 0

Views

Author

Roger L. Bagula, Nov 17 2008

Keywords

Crossrefs

Programs

  • Mathematica
    f[0] = 0; f[1] = 1; f[2] = 1;
    f[n_] := f[n] = f[f[n - 2]] + If[Mod[n, 3] == 0,f[f[n/3]], If[Mod[n, 3] == 1, f[f[(n - 1)/3]], f[n - f[(n - 2)/3]]]];
    P[x_, n_] := P[x, n] = Product[1 + f[m] x^m, {m, 0, n}];
    Take[CoefficientList[P[x, 45], x],45]
    (* Program edited and corrected by Petros Hadjicostas, Apr 12 2020 *)

Formula

a(n) = [x^n] Product_{k > 0} (1 + f(k)*x^k), where f(1) = f(2) = 1, and for m >= 3, f(m) = f(f(m-2)) + r(m), where r(m) = f(f(floor(m/3)) when m == 0 or 1 (mod 3) and = f(m - f(floor(m/3))) when m == 2 (mod 3).

Extensions

Various sections edited by Petros Hadjicostas, Apr 12 2020

A152006 Expansion of Product_{k > 0} (1 + f(k)*x^k), where f(1) = 1 and f(m) = prime(m-1) for m >= 2.

Original entry on oeis.org

1, 1, 2, 5, 8, 18, 34, 63, 102, 203, 336, 589, 999, 1675, 2799, 4768, 7561, 12224, 20513, 31724, 51621, 81976, 128560, 199192, 312536, 482806, 744847, 1147952, 1755931, 2649474, 4051413, 6069450, 9105323, 13747364, 20335077, 30508629, 45198631
Offset: 0

Views

Author

Roger L. Bagula, Nov 19 2008

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] = If[n < 2, n, Prime[n - 1]];
    P[x_, n_] := P[x, n] = Product[1 + f[m]*x^m, {m, 0, n}];
    Take[CoefficientList[P[x, 37], x],37]
    (* Program edited and corrected by Petros Hadjicostas, Apr 12 2020 *)

Formula

a(n) = [x^n] Product_{k > 0} (1 + f(k)*x^k), where f(1) = 1 and f(m) = prime(m-1) for m >= 2.

Extensions

Various sections edited by Petros Hadjicostas, Apr 12 2020
Showing 1-5 of 5 results.