A333238 Irregular table where row n lists the distinct smallest primes p of prime partitions of n.
2, 3, 2, 2, 5, 2, 3, 2, 7, 2, 3, 2, 3, 2, 3, 5, 2, 3, 11, 2, 3, 5, 2, 3, 13, 2, 3, 7, 2, 3, 5, 2, 3, 5, 2, 3, 5, 17, 2, 3, 5, 7, 2, 3, 5, 19, 2, 3, 5, 7, 2, 3, 5, 7, 2, 3, 5, 11, 2, 3, 5, 23, 2, 3, 5, 7, 11, 2, 3, 5, 7, 2, 3, 5, 7, 13, 2, 3, 5, 7, 2, 3, 5, 7, 11
Offset: 2
Examples
The least primes among the prime partitions of 5 are 2 and 5, cf. the 2 prime partitions of 5: (5) and (3, 2), thus row 5 lists {2, 5}. The least primes among the prime partitions of 6 are 2 and 3, cf. the two prime partitions of 6, (3, 3), and (2, 2, 2), thus row 6 lists {2, 3}. Row 7 contains {2, 7} because there are 3 prime partitions of 7: (7), (5, 2), (3, 2, 2). Note that 2 is the smallest part of the latter two partitions, thus only 2 and 7 are distinct. Table plotting prime p in row n at pi(p) place, intervening primes missing from row n are shown by "." as a place holder: n Primes in row n ---------------------- 2: 2 3: . 3 4: 2 5: 2 . 5 6: 2 3 7: 2 . . 7 8: 2 3 9: 2 3 10: 2 3 5 11: 2 3 . . 11 12: 2 3 5 13: 2 3 . . . 13 14: 2 3 . 7 15: 2 3 5 16: 2 3 5 17: 2 3 5 . . . 17 ...
Links
- Alois P. Heinz, Rows n = 2..1000, flattened (rows n=2..240 from Michael De Vlieger)
- Michael De Vlieger, Labeled plot of p at (pi(p), n), for 2 <= n <= 240, with terms n in A330507 shown in red.
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) and coeff(p, x, i)>0, i, [][]), i=2..degree(p)))(b(n, 2, x)) end: seq(T(n), n=2..40); # Alois P. Heinz, Mar 16 2020
-
Mathematica
Block[{a, m = 20, s}, a = ConstantArray[{}, m]; s = {Prime@ PrimePi@ m}; Do[If[# <= m, If[FreeQ[a[[#]], First@ s], a = ReplacePart[a, # -> Append[a[[#]], Last@ s]], Nothing]; AppendTo[s, Last@ s], If[Last@ s == 2, s = DeleteCases[s, 2]; If[Length@ s == 0, Break[], s = MapAt[Prime[PrimePi[#] - 1] &, s, -1]], s = MapAt[Prime[PrimePi[#] - 1] &, s, -1]]] &@ Total[s], {i, Infinity}]; Union /@ a // Flatten]
Comments