login
Irregular table where row n lists the distinct smallest primes p of prime partitions of n.
9

%I #37 Feb 23 2023 01:25:41

%S 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,

%T 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,

%U 7,11,2,3,5,7,2,3,5,7,13,2,3,5,7,2,3,5,7,11

%N Irregular table where row n lists the distinct smallest primes p of prime partitions of n.

%C A prime partition of n is an integer partition wherein all parts are prime. For instance, (3 + 2) is a prime partition of the sum 5; for n = 5, (5) is also a prime partition. For 6, we have two prime partitions (3 + 3) and (2 + 2 + 2).

%C We note that there are no prime partitions for n = 1, therefore the offset of this sequence is 2.

%C The number of prime partitions of n is shown by A000607(n).

%C For prime p, row p includes p itself as the largest term, since p is the sum of (p).

%C The product of all terms in row n gives A333129(n). - _Alois P. Heinz_, Mar 16 2020

%C From _David James Sycamore_, Mar 28 2020: (Start)

%C In the irregular table below, T(n,k) is either prime(k) or is empty. The former means there is at least one prime partition of n with least part prime(k), the latter means that no such partition exists. T(n,k) empty is not recorded in the data.

%C Recursion for n >= 4: T(n,k) = prime(k) iff T((n-prime(k)), k) = prime(k), or there is a q > k such that T((n-prime(k)), q)) = prime(q); else T(n,k) is empty. Example: T(17,3) = 5 because T(12,3) = prime(3) = 5. T(10,2) = 3 since although T(7,2) is empty, T(7,4) = prime(4) = 7. (End)

%H Alois P. Heinz, <a href="/A333238/b333238.txt">Rows n = 2..1000, flattened</a> (rows n=2..240 from Michael De Vlieger)

%H Michael De Vlieger, <a href="/A333238/a333238.png">Labeled plot of p at (pi(p), n)</a>, for 2 <= n <= 240, with terms n in A330507 shown in red.

%e 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}.

%e 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}.

%e 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.

%e Table plotting prime p in row n at pi(p) place, intervening primes missing from row n are shown by "." as a place holder:

%e n Primes in row n

%e ----------------------

%e 2: 2

%e 3: . 3

%e 4: 2

%e 5: 2 . 5

%e 6: 2 3

%e 7: 2 . . 7

%e 8: 2 3

%e 9: 2 3

%e 10: 2 3 5

%e 11: 2 3 . . 11

%e 12: 2 3 5

%e 13: 2 3 . . . 13

%e 14: 2 3 . 7

%e 15: 2 3 5

%e 16: 2 3 5

%e 17: 2 3 5 . . . 17

%e ...

%p b:= proc(n, p, t) option remember; `if`(n=0, 1, `if`(p>n, 0, (q->

%p add(b(n-p*j, q, 1), j=1..n/p)*t^p+b(n, q, t))(nextprime(p))))

%p end:

%p T:= proc(n) option remember; (p-> seq(`if`(isprime(i) and

%p coeff(p, x, i)>0, i, [][]), i=2..degree(p)))(b(n, 2, x))

%p end:

%p seq(T(n), n=2..40); # _Alois P. Heinz_, Mar 16 2020

%t 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]

%Y Cf. A330507, A333129, A333259, A333365.

%K nonn,tabf

%O 2,1

%A _Michael De Vlieger_, _David James Sycamore_, Mar 12 2020