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

A024939 Number of partitions of n into distinct odd primes.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 4, 3, 5, 4, 4, 5, 5, 6, 6, 5, 7, 7, 7, 8, 8, 9, 8, 9, 11, 11, 10, 12, 12, 13, 14, 14, 16, 15, 16, 17, 19, 20, 20, 20, 22, 24, 23, 26, 27, 27, 28, 30, 33, 34, 34, 36, 37, 40, 41, 43, 46, 46, 47, 50, 55, 56, 56
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a024939 = p a065091_list where
       p _  0 = 1
       p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m
    -- Reinhard Zumkeller, Aug 05 2012

Formula

G.f.: Product_{k>1} (1+x^prime(k)).

Extensions

Corrected and extended by Vladeta Jovovic, Jul 20 2003

A333365 T(n,k) is the number of times that prime(k) is the least part in a partition of n into prime parts; triangle T(n,k), n >= 0, 1 <= k <= max(1,A000720(A331634(n))), read by rows.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 2, 0, 0, 1, 2, 1, 3, 1, 3, 1, 1, 4, 1, 0, 0, 1, 5, 1, 1, 6, 2, 0, 0, 0, 1, 7, 2, 0, 1, 9, 2, 1, 10, 3, 1, 12, 3, 1, 0, 0, 0, 1, 14, 3, 1, 1, 17, 4, 1, 0, 0, 0, 0, 1, 19, 5, 1, 1, 23, 5, 1, 1, 26, 6, 2, 0, 1, 30, 7, 2, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, Mar 16 2020

Keywords

Examples

			In the A000607(11) = 6 partitions of 11 into prime parts, (11), 335, 227, 2225, 2333, 22223 the least parts are 11 = prime(5) (once), 3 = prime(2)(once), and 2 = prime(1) (four times), whereas 5 and 7 (prime(3) and prime(4)) do not occur. Thus row 11 is [4,1,0,0,1].
Triangle T(n,k) begins:
   0    ;
   0    ;
   1    ;
   0, 1    ;
   1       ;
   1, 0, 1    ;
   1, 1       ;
   2, 0, 0, 1    ;
   2, 1          ;
   3, 1          ;
   3, 1, 1       ;
   4, 1, 0, 0, 1    ;
   5, 1, 1          ;
   6, 2, 0, 0, 0, 1    ;
   7, 2, 0, 1          ;
   9, 2, 1             ;
  10, 3, 1             ;
  12, 3, 1, 0, 0, 0, 1    ;
  14, 3, 1, 1             ;
  17, 4, 1, 0, 0, 0, 0, 1    ;
  19, 5, 1, 1                ;
  ...
		

Crossrefs

Columns k=1-2 give: A000607(n-2) for n>1, A099773(n-3) for n>2.
Row sums give A000607 for n>0.
Length of n-th row is A000720(A331634(n)) for n>1.
Indices of rows without 1's: A330433.

Programs

  • Maple
    b:= proc(n, p, t) option remember; `if`(n=0, 1, `if`(p>n, 0, (q->
          add(b(n-p*j, q, 1), j=1..n/p)*t^p+b(n, q, t))(nextprime(p))))
        end:
    T:= proc(n) option remember; (p-> seq(`if`(isprime(i),
          coeff(p, x, i), [][]), i=2..max(2,degree(p))))(b(n, 2, x))
        end:
    seq(T(n), n=0..23);
  • Mathematica
    b[n_, p_, t_] := b[n, p, t] = If[n == 0, 1, If[p > n, 0, With[{q = NextPrime[p]}, Sum[b[n - p*j, q, 1], {j, 1, n/p}]*t^p + b[n, q, t]]]];
    T[n_] := If[n < 2, {0}, MapIndexed[If[PrimeQ[#2[[1]]], #1, Nothing]&, Rest @ CoefficientList[b[n, 2, x], x]]];
    T /@ Range[0, 23] // Flatten (* Jean-François Alcover, Mar 30 2021, after Alois P. Heinz *)

Formula

T(n,pi(n)) = A010051(n) for n > 1.
T(p,pi(p)) = 1 if p is prime.
T(prime(k),k) = 1 for k >= 1.
Recursion: T(n,k) = Sum_{q=k..pi(n-p)} T(n-p, q) with p := prime(k) and T(n,k) = 0 if n < p, or 1 if n = p. - David James Sycamore, Mar 28 2020

A331981 Number of compositions (ordered partitions) of n into distinct odd 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, 13, 6, 12, 28, 18, 28, 19, 6, 25, 52, 24, 54, 30, 56, 31, 98, 156, 102, 37, 104, 157, 150, 276, 150, 175, 154, 288, 200, 528, 246, 307, 226, 666, 990, 780, 1038, 679, 348, 799, 1828, 1272, 1162, 1164
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 03 2020

Keywords

Examples

			a(16) = 4 because we have [13, 3], [11, 5], [5, 11] and [3, 13].
		

Crossrefs

Programs

  • Maple
    s:= proc(n) option remember; `if`(n<1, 0, ithprime(n+1)+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+1))+b(n, i-1, t)))
        end:
    a:= n-> b(n, numtheory[pi](n), 0):
    seq(a(n), n=0..72);  # Alois P. Heinz, Feb 03 2020
  • Mathematica
    s[n_] := s[n] = If[n < 1, 0, Prime[n + 1] + s[n - 1]];
    b[n_, i_, t_] := b[n, i, t] = If[s[i] < n, 0, If[n == 0, t!, If[# > n, 0, b[n - #, i - 1, t + 1]]&[Prime[i + 1]] + b[n, i - 1, t]]];
    a[n_] := b[n, PrimePi[n], 0];
    a /@ Range[0, 72] (* Jean-François Alcover, Nov 09 2020, after Alois P. Heinz *)

A281544 Expansion of Sum_{k>=2} x^prime(k)/(1 - x^prime(k)) / Product_{k>=2} (1 - x^prime(k)).

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 1, 2, 3, 4, 4, 6, 7, 8, 11, 12, 15, 18, 20, 26, 29, 34, 40, 46, 54, 62, 71, 82, 94, 106, 122, 138, 157, 178, 201, 226, 254, 286, 321, 360, 402, 448, 501, 558, 619, 690, 764, 846, 938, 1036, 1145, 1264, 1392, 1532, 1687, 1854, 2036, 2234, 2448, 2680, 2934, 3210, 3507, 3828, 4178, 4554, 4961, 5404
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 23 2017

Keywords

Comments

Total number of parts in all partitions of n into odd primes.
Convolution of A005087 and A099773.

Examples

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

Crossrefs

Programs

  • Mathematica
    nmax = 68; Rest[CoefficientList[Series[Sum[x^Prime[k]/(1 - x^Prime[k]), {k, 2, nmax}]/Product[1 - x^Prime[k], {k, 2, nmax}], {x, 0, nmax}], x]]
  • PARI
    sumparts(n, pred)={sum(k=1, n, 1/(1-pred(k)*x^k) - 1 + O(x*x^n))/prod(k=1, n, 1-pred(k)*x^k + O(x*x^n))}
    {my(n=60); Vec(sumparts(n, v->v>2 && isprime(v)), -n)} \\ Andrew Howroyd, Dec 28 2017

Formula

G.f.: Sum_{k>=2} x^prime(k)/(1 - x^prime(k)) / Product_{k>=2} (1 - x^prime(k)).

A284828 Expansion of Sum_{i>=2} x^prime(i)/(1 - x^prime(i)) * Product_{j>=i} 1/(1 - x^prime(j)).

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 1, 1, 3, 3, 3, 5, 4, 6, 9, 7, 10, 11, 12, 17, 19, 22, 23, 26, 33, 36, 41, 48, 52, 59, 66, 78, 85, 97, 112, 117, 134, 151, 169, 187, 207, 230, 255, 284, 313, 348, 379, 418, 465, 508, 561, 620, 674, 737, 812, 892, 972, 1064, 1157, 1257, 1379, 1503, 1639, 1776, 1935, 2101, 2279, 2483
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 03 2017

Keywords

Comments

Total number of smallest parts in all partitions of n into odd prime parts (A065091).

Examples

			a(16) = 7 because we have [13, 3], [11, 5], [7, 3, 3, 3], [5, 5, 3, 3] and 1 + 1 + 3 + 2 = 7.
		

Crossrefs

Programs

  • Mathematica
    nmax = 68; Rest[CoefficientList[Series[Sum[x^Prime[i]/(1 - x^Prime[i]) Product[1/(1 - x^Prime[j]), {j, i, nmax}], {i, 2, nmax}], {x, 0, nmax}], x]]
  • PARI
    x = 'x + O('x ^ 70); concat([0, 0], Vec(sum(i=2, 70, x^prime(i)/(1 - x^prime(i)) * prod(j=i, 70, 1/(1 - x^prime(j)))))) \\ Indranil Ghosh, Apr 05 2017

Formula

G.f.: Sum_{i>=2} x^prime(i)/(1 - x^prime(i)) * Product_{j>=i} 1/(1 - x^prime(j)).

A298603 Number of partitions of n into odd prime parts (including 1).

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16, 19, 22, 26, 31, 36, 42, 49, 56, 65, 75, 86, 98, 112, 127, 144, 164, 185, 209, 235, 264, 297, 332, 372, 416, 463, 516, 574, 638, 708, 785, 869, 960, 1061, 1171, 1291, 1421, 1563, 1718, 1886, 2070, 2269, 2484, 2718, 2972, 3247, 3545, 3868, 4216, 4592
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 22 2018

Keywords

Comments

Partial sums of A099773.

Examples

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

Crossrefs

Programs

  • Mathematica
    nmax = 62; CoefficientList[Series[1/(1 - x) Product[1/(1 - x^Prime[k]), {k, 2, nmax}], {x, 0, nmax}], x]

Formula

G.f.: (1/(1 - x))*Product_{k>=2} 1/(1 - x^prime(k)).

A366851 Irregular triangle read by rows where T(n,k) is the number of integer partitions of n such that the sum of primes indexed by all parts greater than one is k.

Original entry on oeis.org

1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 2, 2, 2, 3, 2, 0, 2, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 2, 2, 2, 2, 1, 1, 0, 0, 1
Offset: 0

Views

Author

Gus Wiseman, Nov 01 2023

Keywords

Comments

To illustrate the definition, the sum of primes indexed by all parts greater than one of the partition (5,2,2,1) is prime(5) + prime(2) + prime(2) = 17.

Examples

			Triangle begins:
  1
  1
  1 0 0 1
  1 0 0 1 0 1
  1 0 0 1 0 1 1 1
  1 0 0 1 0 1 1 1 1 0 0 1
  1 0 0 1 0 1 1 1 1 1 2 1 0 1
  1 0 0 1 0 1 1 1 1 1 2 2 1 1 1 0 0 1
  1 0 0 1 0 1 1 1 1 1 2 2 2 3 2 0 2 1 0 1
  1 0 0 1 0 1 1 1 1 1 2 2 2 3 3 2 2 2 2 1 1 0 0 1
  1 0 0 1 0 1 1 1 1 1 2 2 2 3 3 3 4 4 2 3 2 0 3 1 0 0 0 0 0 1
  1 0 0 1 0 1 1 1 1 1 2 2 2 3 3 3 4 5 4 4 3 3 3 2 3 0 1 0 0 1 0 1
The T(8,13) = 3 partitions are: (6,1,1), (4,2,2), (3,3,2).
The T(10,17) = 4 partitions are: (7,1,1,1), (5,2,2,1), (4,4,2), (4,3,3).
		

Crossrefs

Row lengths are A055670.
Columns appear to converge to A099773.
A bisected even version is A116598 (counts partitions by number of 1's).
Counting all parts (not just > 1) gives A331416, shifted A331385.
A000041 counts integer partitions, strict A000009 (also into odds).
A113685 counts partitions by sum of odd parts, rank statistic A366528.
A330953 counts partitions with Heinz number divisible by sum of primes.
A331381 counts partitions with (product)|(sum of primes), equality A331383.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], Total[Select[Prime/@#,OddQ]]==k&]], {n,0,10}, {k,0,If[n<=1,0,Prime[n]]}]

A280912 Number of partitions of n into odd semiprimes (A046315).

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 2, 0, 0, 2, 1, 1, 2, 0, 0, 3, 1, 0, 3, 1, 1, 3, 1, 0, 4, 2, 2, 5, 1, 1, 5, 3, 1, 6, 3, 2, 8, 2, 1, 7, 5, 4, 9, 4, 3, 11, 6, 3, 11, 6, 6, 14, 7, 5, 15, 9, 7, 16, 9, 8, 20, 14, 9, 21, 13, 11, 26, 16, 12, 28, 19, 17, 29, 19, 17, 37, 27
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 10 2017

Keywords

Examples

			a(39) = 3 because we have [39], [21, 9, 9] and [15, 15, 9].
		

Crossrefs

Programs

Formula

G.f.: Product_{k>=1} 1/(1 - floor(bigomega(2*k+1)/2)*floor(2/bigomega(2*k+ 1))*x^(2*k+1)), where bigomega(k) is the number of prime divisors of k counted with multiplicity (A001222).

A352165 Number of partitions of n into odd prime powers (1 included).

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 5, 6, 8, 10, 12, 15, 18, 22, 26, 31, 37, 44, 52, 61, 71, 83, 97, 112, 130, 150, 173, 199, 228, 261, 298, 340, 386, 439, 497, 563, 637, 718, 809, 910, 1023, 1147, 1286, 1439, 1608, 1796, 2003, 2231, 2483, 2761, 3065, 3401, 3770, 4175, 4619
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 06 2022

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 55; CoefficientList[Series[Product[1/(1 - Boole[(PrimePowerQ[k] || k == 1) && OddQ[k]] x^k), {k, 1, nmax}], {x, 0, nmax}], x]

Formula

G.f.: Product_{k>=0} 1 / (1 - x^A061345(k)).

A284834 Expansion of Sum_{i>=2} x^prime(i)/(1 - x^prime(i)) * Product_{j=2..i} 1/(1 - x^prime(j)).

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 1, 1, 3, 3, 2, 5, 4, 4, 9, 5, 6, 12, 8, 11, 17, 12, 14, 23, 19, 21, 29, 27, 29, 41, 37, 36, 56, 49, 55, 72, 62, 74, 91, 90, 96, 116, 117, 125, 155, 149, 162, 195, 194, 215, 246, 248, 270, 311, 324, 344, 389, 406, 435, 494, 509, 546, 615, 636, 694, 763, 787, 861, 942, 994, 1063
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 03 2017

Keywords

Comments

Total number of largest parts in all partitions of n into odd prime parts (A065091).

Examples

			a(16) = 5 because we have [13, 3], [11, 5], [7, 3, 3, 3], [5, 5, 3, 3] and 1 + 1 + 1 + 2 = 5.
		

Crossrefs

Programs

  • Mathematica
    nmax = 64; Rest[CoefficientList[Series[Sum[x^Prime[i]/(1 - x^Prime[i]) Product[1/(1 - x^Prime[j]), {j, 2, i}], {i, 2, nmax}], {x, 0, nmax}], x]]
  • PARI
    x='x+O('x^70); concat([0, 0], Vec(sum(i=2, 70, x^prime(i)/(1 - x^prime(i)) * prod(j=2,i, 1/(1 - x^prime(j)))))) \\ Indranil Ghosh, Apr 04 2017

Formula

G.f.: Sum_{i>=2} x^prime(i)/(1 - x^prime(i)) * Product_{j=2..i} 1/(1 - x^prime(j)).
Showing 1-10 of 10 results.