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-3 of 3 results.

A341459 Number of compositions of n^2 into n prime parts.

Original entry on oeis.org

1, 0, 1, 4, 22, 241, 2696, 35218, 529888, 8998419, 169486964, 3496417024, 78344008779, 1891733424205, 48923563968087, 1347813311456319, 39371345548420060, 1214570579814316742, 39430967625404799740, 1343040950675651131103, 47862610677098010505554
Offset: 0

Views

Author

Alois P. Heinz, Feb 12 2021

Keywords

Examples

			a(3) = 4: 333, 225, 252, 522.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember;
          `if`(n=0, `if`(t=0, 1, 0), `if`(t<1, 0, add(
          `if`(isprime(j), b(n-j, t-1), 0), j=1..n)))
        end:
    a:= n-> b(n^2, n):
    seq(a(n), n=0..22);
  • Mathematica
    b[n_, t_] := b[n, t] =
         If[n == 0, If[t == 0, 1, 0], If[t < 1, 0, Sum[
         If[PrimeQ[j], b[n-j, t-1], 0], {j, 1, n}]]];
    a[n_] := b[n^2, n];
    Table[a[n], {n, 0, 22}] (* Jean-François Alcover, May 02 2022, after Alois P. Heinz *)

Formula

a(n) = A121303(n^2,n).

A301971 a(n) = [x^n] Product_{k>=1} 1/(1 - x^prime(k))^n.

Original entry on oeis.org

1, 0, 2, 3, 10, 30, 77, 252, 682, 2136, 6182, 18766, 56173, 169351, 512990, 1551828, 4720170, 14348289, 43751984, 133502873, 408029510, 1248460587, 3823949824, 11724787763, 35980251181, 110510334780, 339674840715, 1044812449722, 3215861978150, 9904301974294, 30521063942312, 94103983534015
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 29 2018

Keywords

Comments

Number of partitions of n into prime parts of n kinds.

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[Product[1/(1 - x^Prime[k])^n, {k, 1, n}], {x, 0, n}], {n, 0, 31}]

A331901 Number of compositions (ordered partitions) of the n-th prime into distinct prime parts.

Original entry on oeis.org

1, 1, 3, 3, 1, 3, 25, 9, 61, 91, 99, 151, 901, 303, 1759, 3379, 5239, 4713, 8227, 12901, 12537, 23059, 65239, 159421, 232369, 489817, 351237, 726295, 564363, 1101883, 2517865, 6916027, 11825821, 4942227, 27166753, 21280053, 39547957, 52630273, 113638975
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 31 2020

Keywords

Examples

			a(4) = 3 because we have [7], [5, 2] and [2, 5].
		

Crossrefs

Programs

  • Maple
    s:= proc(n) option remember; `if`(n<1, 0, ithprime(n)+s(n-1)) end:
    b:= proc(n, i, t) option remember; `if`(s(i)`if`(p>n, 0, b(n-p, i-1, t+1)))(ithprime(i))+b(n, i-1, t)))
        end:
    a:= n-> b(ithprime(n), n, 0):
    seq(a(n), n=1..42);  # Alois P. Heinz, Jan 31 2020
  • Mathematica
    s[n_] := s[n] = If[n < 1, 0, Prime[n] + s[n - 1]];
    b[n_, i_, t_] := b[n, i, t] = If[s[i] < n, 0, If[n == 0, t!, Function[p, If[p > n, 0, b[n - p, i - 1, t + 1]]][Prime[i]] + b[n, i - 1, t]]];
    a[n_] := b[Prime[n], n, 0];
    Array[a, 42] (* Jean-François Alcover, Nov 26 2020, after Alois P. Heinz *)

Formula

a(n) = A219107(A000040(n)).
Showing 1-3 of 3 results.