A379317
Positive integers with a unique even prime index.
Original entry on oeis.org
3, 6, 7, 12, 13, 14, 15, 19, 24, 26, 28, 29, 30, 33, 35, 37, 38, 43, 48, 51, 52, 53, 56, 58, 60, 61, 65, 66, 69, 70, 71, 74, 75, 76, 77, 79, 86, 89, 93, 95, 96, 101, 102, 104, 106, 107, 112, 113, 116, 119, 120, 122, 123, 130, 131, 132, 138, 139, 140, 141, 142
Offset: 1
The terms together with their prime indices begin:
3: {2}
6: {1,2}
7: {4}
12: {1,1,2}
13: {6}
14: {1,4}
15: {2,3}
19: {8}
24: {1,1,1,2}
26: {1,6}
28: {1,1,4}
29: {10}
30: {1,2,3}
33: {2,5}
35: {3,4}
37: {12}
38: {1,8}
43: {14}
48: {1,1,1,1,2}
Other counts of prime indices:
-
prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
Select[Range[100],Length[Select[prix[#],EvenQ]]==1&]
A222656
Number T(n,k) of partitions of n using exactly k primes; triangle T(n,k), n>=0, 0<=k<=floor(n/2), read by rows.
Original entry on oeis.org
1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 3, 2, 3, 4, 3, 1, 3, 6, 4, 2, 5, 7, 6, 3, 1, 6, 9, 8, 5, 2, 8, 11, 12, 7, 3, 1, 8, 17, 14, 10, 5, 2, 12, 20, 19, 14, 8, 3, 1, 13, 26, 25, 19, 11, 5, 2, 17, 31, 35, 24, 16, 8, 3, 1, 19, 41, 42, 34, 21, 12, 5, 2, 26, 47, 56, 44, 29
Offset: 0
T(6,0) = 3: [6], [4,1,1], [1,1,1,1,1,1].
T(6,1) = 4: [5,1], [4,2], [3,1,1,1], [2,1,1,1,1].
T(6,2) = 3: [3,3], [3,2,1], [2,2,1,1].
T(6,3) = 1: [2,2,2].
Triangle T(n,k) begins:
1;
1;
1, 1;
1, 2;
2, 2, 1;
2, 3, 2;
3, 4, 3, 1;
3, 6, 4, 2;
5, 7, 6, 3, 1;
6, 9, 8, 5, 2;
8, 11, 12, 7, 3, 1;
8, 17, 14, 10, 5, 2;
...
-
b:= proc(n, i) option remember; local j; if n=0 then 1 elif i<1 then 0
else []; for j from 0 to n/i do zip((x, y)->x+y, %,
[`if`(isprime(i), 0$j, NULL), b(n-i*j, i-1)], 0) od; %[] fi
end:
T:= n-> b(n$2):
seq(T(n), n=0..16);
-
zip[f_, x_List, y_List, z_] := With[{m = Max[Length[x], Length[y]]}, Thread[f[PadRight[x, m, z], PadRight[y, m, z]]]]; b[n_, i_] := b[n, i] = Module[{j, pc}, Which[n == 0, {1}, i<1, {0}, True, pc = {}; For[j = 0, j <= n/i, j++, pc = zip[Plus, pc, Join[If[PrimeQ[i], Array[0&, j], {}], b[n-i*j, i-1]], 0]]; pc]]; T[n_] := b[n, n]; Table[T[n], {n, 0, 16}] // Flatten (* Jean-François Alcover, Jan 29 2014, after Alois P. Heinz *)
A321378
Number of integer partitions of n containing no 1's or prime powers.
Original entry on oeis.org
1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 1, 1, 0, 3, 0, 3, 2, 3, 0, 6, 1, 5, 3, 6, 1, 11, 2, 9, 6, 12, 5, 19, 4, 17, 11, 23, 9, 32, 10, 31, 22, 39, 17, 55, 21, 57, 37, 67, 33, 92, 44, 97, 65, 114, 63, 154, 78, 162, 113, 191, 117, 250, 138, 269, 194, 320
Offset: 0
The a(30) = 11 integer partitions:
(30)
(24,6)
(15,15)
(18,12)
(20,10)
(18,6,6)
(12,12,6)
(14,10,6)
(10,10,10)
(12,6,6,6)
(6,6,6,6,6)
Cf.
A000607,
A000688,
A000961,
A002095,
A023893,
A023894,
A096258,
A246655,
A320322,
A321346,
A321347,
A321665,
A322452,
A322454.
-
nn=100;
ser=Product[If[PrimePowerQ[n],1,1/(1-x^n)],{n,2,nn}];
CoefficientList[Series[ser,{x,0,nn}],x]
A321347
Number of strict integer partitions of n containing no prime powers (including 1).
Original entry on oeis.org
1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 4, 4, 2, 3, 4, 4, 5, 6, 5, 6, 7, 7, 9, 10, 10, 13, 12, 11, 15, 17, 16, 19, 20, 20, 25, 28, 26, 30, 33, 35, 41, 43, 42, 50, 55, 57, 64, 67, 67, 79, 86, 87, 97, 105, 109, 124, 131, 135, 151, 163, 169
Offset: 0
The a(36) = 13 strict integer partitions:
(36),
(21,15), (22,14), (24,12), (26,10), (30,6), (35,1),
(14,12,10), (18,12,6), (20,10,6), (20,15,1), (21,14,1),
(15,14,6,1).
Cf.
A000607,
A000961,
A001597,
A002095,
A023893,
A023894,
A096258,
A246655,
A320322,
A321346,
A321378,
A321665,
A322452,
A322454.
-
nn=100;
ser=Product[If[PrimePowerQ[n],1,1+x^n],{n,nn}];
CoefficientList[Series[ser,{x,0,nn}],x]
A321665
Number of strict integer partitions of n containing no 1's or prime powers.
Original entry on oeis.org
1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 2, 0, 2, 2, 2, 0, 3, 1, 3, 2, 4, 1, 5, 2, 5, 4, 6, 4, 9, 3, 8, 7, 10, 6, 13, 7, 13, 12, 16, 10, 20, 13, 22, 19, 24, 18, 32, 23, 34, 30, 37, 30, 49, 37, 50, 47, 58, 51, 73, 58, 77, 74, 89, 80, 108, 91, 116
Offset: 0
The a(36) = 9 strict integer partitions:
(36)
(30,6)
(21,15)
(22,14)
(24,12)
(26,10)
(18,12,6)
(20,10,6)
(14,12,10)
Cf.
A000607,
A000961,
A001597,
A002095,
A023893,
A023894,
A096258,
A246655,
A321346,
A321347,
A321378,
A322452,
A322454.
-
nn=100;
ser=Product[If[PrimePowerQ[n],1,1+x^n],{n,2,nn}];
CoefficientList[Series[ser,{x,0,nn}],x]
A002096
Mixed partitions of n.
Original entry on oeis.org
0, 0, 1, 2, 3, 6, 9, 14, 20, 29, 42, 58, 79, 108, 145, 191, 252, 329, 427, 549, 704, 894, 1136, 1427, 1793, 2237, 2789, 3450, 4268, 5248, 6447, 7880, 9619, 11691, 14199, 17166, 20739, 24966, 30020, 35976, 43076, 51420, 61320, 72927, 86642, 102682
Offset: 1
- L. M. Chawla and S. A. Shad, On a trio-set of partition functions and their tables, J. Natural Sciences and Mathematics, 9 (1969), 87-96.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
A155515
Number of partitions of n into as many primes as nonprimes.
Original entry on oeis.org
1, 0, 0, 1, 1, 0, 3, 2, 3, 5, 4, 8, 12, 10, 15, 23, 22, 33, 42, 47, 64, 79, 90, 122, 147, 169, 219, 264, 312, 387, 465, 546, 679, 799, 950, 1151, 1365, 1599, 1937, 2270, 2678, 3181, 3735, 4374, 5192, 6046, 7082, 8318, 9684, 11281, 13208, 15313, 17798, 20702, 23951
Offset: 0
a(9) = #{6+3, 5+4, 5+2+1+1, 4+2+2+1, 2+2+2+1+1+1} = 5;
a(10) = #{8+2, 5+3+1+1, 4+3+2+1, 3+2+2+1+1+1} = 4.
-
b:= proc(n, i, t) local m; m:= n- `if`(t>0, t, -2*t); if m<0 then 0 elif n=0 then 1 elif i<3 then `if`(irem(m,3)=0, 1, 0) else b(n, i, t):= b(n-i, i, t+ `if`(isprime(i), 1, -1)) +b(n, i-1, t) fi end: a:= n-> b(n, n, 0): seq(a(n), n=0..60); # Alois P. Heinz, Apr 30 2009
-
pnpQ[n_]:=Count[n,?PrimeQ]==Length[n]/2; Table[Count[ IntegerPartitions[ n], ?pnpQ],{n,60}] (* Harvey P. Dale, Feb 02 2014 *)
b[n_, i_, t_] := b[n, i, t] = Module[{m}, m = n - If[t > 0, t, -2t]; Which[m < 0, 0, n == 0, 1, i < 3, If[Mod[m, 3] == 0, 1, 0], True, b[n, i, t] = b[n-i, i, t + If[PrimeQ[i], 1, -1]] + b[n, i-1, t]]];
a[n_] := b[n, n, 0];
a /@ Range[0, 60] (* Jean-François Alcover, May 30 2021, after Alois P. Heinz *)
-
parts(n)={1/(prod(k=1, n, 1 - if(isprime(k), y, 1/y)*x^k + O(x*x^n)))}
{my(n=60); apply(p->polcoeff(p,0), Vec(parts(n)))} \\ Andrew Howroyd, Dec 29 2017
-
from sympy import isprime
from sympy.utilities.iterables import partitions
def c(p): return 2*sum(p[i] for i in p if isprime(i)) == sum(p.values())
def a(n): return sum(1 for p in partitions(n) if c(p))
print([a(n) for n in range(55)]) # Michael S. Branicky, Jun 30 2022
A353429
Number of integer compositions of n with all prime parts and all prime run-lengths.
Original entry on oeis.org
1, 0, 0, 0, 1, 0, 2, 0, 0, 1, 4, 0, 2, 2, 5, 4, 9, 1, 5, 12, 20, 11, 19, 18, 31, 43, 54, 37, 63, 95, 121, 124, 154, 178, 261, 353, 393, 417, 565, 770, 952, 1138, 1326, 1647, 2186, 2824, 3261, 3917, 4941, 6423, 7935, 9719, 11554, 14557, 18536, 23380, 27985
Offset: 0
The a(13) = 2 through a(16) = 9 compositions:
(22333) (77) (555) (3355)
(33322) (2255) (33333) (5533)
(5522) (222333) (22255)
(223322) (333222) (55222)
(2222222) (332233)
(2222233)
(2223322)
(2233222)
(3322222)
A106356 counts compositions by number of adjacent equal parts.
A114901 counts compositions with no runs of length 1, ranked by
A353427.
-
b:= proc(n, h) option remember; `if`(n=0, 1, add(`if`(i<>h and isprime(i),
add(`if`(isprime(j), b(n-i*j, i), 0), j=2..n/i), 0), i=2..n/2))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..70); # Alois P. Heinz, May 18 2022
-
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], And@@PrimeQ/@#&&And@@PrimeQ/@Length/@Split[#]&]],{n,0,15}]
A302236
Expansion of Product_{k>=1} (1 + x^prime(k))/(1 + x^k).
Original entry on oeis.org
1, -1, 1, -1, 0, 0, -1, 1, -1, 0, 0, 0, 0, 1, -1, 1, 0, 0, 1, 0, 0, 0, -1, 1, 0, -1, 1, -2, 1, 0, 0, 2, -1, 0, 0, -1, 2, -1, -1, 1, -2, 1, 0, 0, 0, -2, -1, 2, 0, 0, 1, -3, 2, -1, 1, 2, -2, -1, -1, 1, 3, 0, -2, 1, -2, 0, 3, 0, 0, -2, -2, 5, 1, 1, -1, -4, 1, -1, 2, 4, -2
Offset: 0
-
nmax = 80; CoefficientList[Series[Product[(1 + x^Prime[k])/(1 + x^k), {k, 1, nmax}], {x, 0, nmax}], x]
nmax = 80; CoefficientList[Series[Product[1/(1 + Boole[!PrimeQ[k]] x^k), {k, 1, nmax}], {x, 0, nmax}], x]
A347662
Number of partitions of n into at most 4 nonprime parts.
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 2, 2, 3, 4, 5, 4, 7, 6, 8, 8, 12, 11, 16, 13, 19, 18, 24, 21, 31, 28, 37, 34, 46, 40, 55, 49, 64, 60, 77, 69, 92, 83, 104, 96, 122, 111, 141, 129, 160, 150, 183, 166, 208, 194, 233, 220, 265, 242, 296, 277, 327, 311, 367, 340, 409, 383, 445
Offset: 0
Comments