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.

Previous Showing 11-18 of 18 results.

A339433 Number of compositions (ordered partitions) of n into an odd number of distinct primes.

Original entry on oeis.org

0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 6, 1, 6, 1, 6, 6, 6, 1, 12, 7, 12, 12, 12, 13, 12, 12, 18, 18, 132, 19, 132, 25, 18, 24, 252, 30, 258, 31, 264, 156, 486, 37, 498, 157, 504, 276, 738, 175, 738, 288, 750, 528, 984, 307, 1218, 666, 1110, 780, 6378, 679, 6618, 799, 1716, 1272
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 04 2020

Keywords

Examples

			a(10) = 6 because we have [5, 3, 2], [5, 2, 3], [3, 5, 2], [3, 2, 5], [2, 5, 3] and [2, 3, 5].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, irem(p, 2)*p!, (s->
         `if`(s>n, 0, b(n, i+1, p)+b(n-s, i+1, p+1)))(ithprime(i)))
        end:
    a:= n-> b(n, 1, 0):
    seq(a(n), n=0..70);  # Alois P. Heinz, Dec 04 2020
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, Mod[p, 2]*p!, Function[s, If[s > n, 0, b[n, i + 1, p] + b[n - s, i + 1, p + 1]]][Prime[i]]];
    a[n_] := b[n, 1, 0];
    Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Feb 26 2022, after Alois P. Heinz *)

A348325 Number of compositions (ordered partitions) of n into two or more distinct primes.

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 0, 2, 2, 2, 8, 0, 8, 2, 8, 8, 10, 24, 16, 8, 16, 38, 16, 60, 18, 62, 46, 66, 160, 90, 138, 98, 70, 122, 306, 126, 314, 150, 362, 278, 588, 900, 602, 302, 654, 1142, 888, 1758, 892, 1226, 950, 2160, 1230, 3378, 1444, 2372, 2100, 4644, 7416, 5238, 6966
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 12 2021

Keywords

Crossrefs

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)).

A331917 Number of compositions (ordered partitions) of n into distinct nonprime parts.

Original entry on oeis.org

1, 1, 0, 0, 1, 2, 1, 2, 1, 3, 5, 8, 3, 10, 11, 17, 13, 16, 19, 54, 49, 55, 59, 90, 89, 129, 127, 183, 307, 358, 351, 456, 553, 649, 889, 1015, 1143, 1490, 2219, 1913, 3021, 3394, 4241, 4944, 6663, 6859, 9337, 9522, 12123, 14895, 22425, 18849, 28341, 31468, 41533
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 01 2020

Keywords

Examples

			a(10) = 5 because we have [10], [9, 1], [6, 4], [4, 6] and [1, 9].
		

Crossrefs

A331925 Number of compositions (ordered partitions) of n into distinct prime powers (including 1).

Original entry on oeis.org

1, 1, 1, 3, 3, 5, 10, 11, 17, 19, 48, 49, 62, 85, 120, 258, 175, 337, 464, 631, 646, 932, 1686, 1991, 2122, 2455, 4118, 4545, 6010, 6481, 13302, 14383, 16177, 16912, 26454, 32024, 35468, 42389, 57334, 107708, 73830, 125629, 142560, 200377, 172752, 244624
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 01 2020

Keywords

Examples

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

Crossrefs

Programs

  • Maple
    N:= 50: # for a(0)..a(N)
    P:= select(isprime, [2,seq(i,i=3..N,2)]):
    PP:= sort([1,seq(seq(p^j, j = 1 .. ilog[p](N)),p=P)]):G:= 1:
    for s in PP do
      G:= G + series(G*x*y^s,y,N+1);
    od:
    G:= convert(G,polynom):
    T:= add(coeff(G,x,i)*i!,i=0..N):
    seq(coeff(T,y,i),i=0..N); # Robert Israel, Jun 28 2024

A339434 Number of compositions (ordered partitions) of n into a prime number of distinct prime parts.

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 0, 2, 2, 2, 8, 0, 8, 2, 8, 8, 10, 0, 16, 8, 16, 14, 16, 12, 18, 14, 22, 18, 136, 18, 138, 26, 22, 26, 258, 30, 266, 30, 266, 158, 492, 36, 506, 158, 510, 278, 744, 174, 748, 290, 758, 528, 990, 306, 1228, 668, 1116, 780, 6384, 678, 6630, 800, 1720, 1274
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 04 2020

Keywords

Examples

			a(10) = 8 because we have [7, 3], [3, 7], [5, 3, 2], [5, 2, 3], [3, 5, 2], [3, 2, 5], [2, 5, 3] and [2, 3, 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(n, numtheory[pi](n), 0):
    seq(a(n), n=0..70);  # Alois P. Heinz, Dec 04 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, If[PrimeQ[t], t!, 0], Function[p, If[p > n, 0,
           b[n - p, i - 1, t + 1]]][Prime[i]] + b[n, i - 1, t]]];
    a[n_] := b[n, PrimePi[n], 0];
    Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Mar 01 2022, after Alois P. Heinz *)

A331924 Number of compositions (ordered partitions) of n into distinct composite parts.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 3, 0, 3, 2, 5, 3, 5, 2, 13, 10, 13, 11, 21, 16, 29, 25, 35, 55, 71, 62, 87, 100, 115, 155, 185, 197, 247, 378, 311, 495, 553, 674, 767, 1060, 1047, 1469, 1463, 1846, 2139, 3391, 2713, 4135, 4453, 5930, 6409, 8777
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 01 2020

Keywords

Examples

			a(14) = 5 because we have [14], [10, 4], [8, 6], [6, 8] and [4, 10].
		

Crossrefs

A332033 Number of compositions (ordered partitions) of n into distinct twin primes.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 0, 1, 2, 0, 2, 1, 2, 1, 2, 6, 4, 1, 4, 7, 4, 12, 4, 12, 6, 12, 26, 18, 26, 19, 4, 19, 52, 18, 52, 24, 54, 24, 74, 144, 98, 25, 76, 145, 100, 258, 102, 150, 104, 156, 124, 396, 146, 282, 148, 396, 890, 510, 890, 403, 198, 403, 940, 636, 988, 642
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 05 2020

Keywords

Examples

			a(15) = 6 because we have [7, 5, 3], [7, 3, 5], [5, 7, 3], [5, 3, 7], [3, 7, 5] and [3, 5, 7].
		

Crossrefs

Previous Showing 11-18 of 18 results.