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.

A147665 a(n) = a(a(n - 1)) + r(n) for n >= 3, where r(3*k) = a(a(k)), r(3*k+1) = a(a(k)) and r(3*k+2) = a(n-a(k)), with a(0) = 0 and a(1) = a(2) = 1.

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 3, 3, 5, 4, 3, 6, 4, 3, 6, 5, 5, 9, 6, 5, 12, 6, 5, 15, 8, 8, 11, 8, 7, 11, 8, 7, 14, 9, 7, 14, 8, 7, 10, 5, 5, 13, 6, 6, 13, 6, 6, 9, 7, 6, 9, 8, 9, 17, 12, 7, 12, 7, 6, 15, 9, 8, 14, 9, 7, 18, 9, 7, 12, 9, 9, 16, 10, 8, 14, 11, 11, 15, 11, 12, 13, 8, 10, 14, 9, 7, 15, 11, 12, 15
Offset: 0

Views

Author

Roger L. Bagula, Nov 09 2008

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:= a[n]= If[n<3, Floor[(n+1)/2], a[a[n-1]] + If[Mod[n, 3]<2, a[a[Floor[n/3]]], a[n - a[Floor[n/3]]]]];
    Table[f[n], {n, 0, 100}]
  • Python
    def A147665(n):
        if n <= 2: return [0, 1, 1][n]
        elif n % 3 <= 1: return A147665(A147665(n-1)) + A147665(A147665(n//3))
        else: return A147665(A147665(n-1)) + A147665(n - A147665(n//3))
    print([A147665(n) for n in range(100)]) # Oct 18 2009

Formula

a(n) = a(a(n - 1)) + r(n) for n >= 3, where r(3*k) = a(a(k)), r(3*k+1) = a(a(k)) and r(3*k+2) = a(n-a(k)), with a(0) = 0 and a(1) = a(2) = 1.

Extensions

Applied OEIS standards to nomenclature - The Assoc. Editors of the OEIS, Oct 18 2009
Name 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

A147955 Expansion of Product_{k >= 0} (1 + A147954(k)*x^k).

Original entry on oeis.org

1, 1, 1, 3, 4, 7, 10, 15, 22, 34, 46, 65, 93, 123, 175, 245, 324, 425, 592, 764, 1015, 1352, 1750, 2266, 2931, 3793, 4897, 6259, 7930, 10080, 12788, 16047, 20176, 25482, 31641, 39630, 49306, 60932, 75552, 93432, 114597, 141013, 173259, 211595, 258933, 316375, 384359, 466927, 566443
Offset: 0

Views

Author

Roger L. Bagula, Nov 17 2008

Keywords

Examples

			From _Petros Hadjicostas_, Apr 21 2020: (Start)
Let f(m) = A147954(m). Using the strict partitions of 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

  • Maple
    f := proc(n) local v; option remember;
    if n = 0 then v := 0; end if;
    if n = 1 or n = 2 then v := 1; end if;
    if 3 <= n and n <= 5 then v := f(f(n - 1)) + f(n - f(n - 1)); end if;
    if 6 <= n and 5 <> n mod 6 then v := f(f(n - 1)) + f(f(floor(n/6))); end if;
    if 6 <= n and 5 = n mod 6 then v := f(f(n - 1)) + f(n - f(floor(n/6))); end if; v; end proc; # this gives sequence A147954
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1) +`if`(i>n, 0, b(n-i, i-1)*f(i))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..50); # Petros Hadjicostas, Apr 21 2020 (using Alois P. Heinz's program from A147655)
  • Mathematica
    f[0] = 0; f[1] = 1; f[2] = 1;
    f[n_] := f[n] =
       f[f[n - 1]] +
        If[n < 6, f[n - f[n - 1]],
         If[Mod[n, 6] == 0, f[f[n/6]],
          If[Mod[n, 6] == 1, f[f[(n - 1)/6]],
           If[Mod[n, 6] == 2, f[f[(n - 2)/6]],
            If[Mod[n, 6] == 3, f[f[(n - 3)/6]],
             If[Mod[n, 6] == 4, f[f[(n - 4)/6]], f[n - f[(n - 5)/6]]]]]]]];
    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 + A147954(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) = A147954(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 21 2020

Extensions

Name, data, and Mathematica program edited and corrected by Petros Hadjicostas, Apr 21 2020

A147879 Expansion of Product_{k>=1} (1 + x^k*A005185(k)).

Original entry on oeis.org

1, 1, 1, 3, 5, 8, 12, 21, 29, 49, 73, 105, 162, 236, 338, 502, 706, 984, 1441, 1998, 2800, 3934, 5472, 7407, 10210, 14053, 19066, 25986, 35134, 47010, 63739, 85008, 112610, 150861, 200133, 264838, 349587, 459970, 602763, 792220, 1034136, 1345530
Offset: 0

Views

Author

Roger L. Bagula, Nov 16 2008

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_Integer?Positive] := f[n] = f[n - f[n - 1]] + f[n - f[n - 2]]; f[0] = 0; f[1] = f[2] = 1; (* A005185 *)
    nmax = 41; CoefficientList[Series[Product[(1 + f[k] * x^k), {k, 1, nmax}], {x, 0, nmax}], x] (* Georg Fischer, Dec 10 2020 *)
  • PARI
    \\ here B(n) is A005185 as vector.
    B(n)={my(A=vector(n, k, 1)); for(k=3, n, A[k]= A[k-A[k-1]]+ A[k-A[k-2]]); A}
    seq(n)=my(v=B(n)); {Vec(prod(k=1, #v, 1 + x^k*v[k] + O(x*x^n)))} \\ Andrew Howroyd, Dec 10 2020

Extensions

Definition corrected by Georg Fischer, Dec 10 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.