OFFSET
2,4
COMMENTS
For n = 2,3,4,6 a(n) = 0. For n > 6 there are no terms a(n) = 0, and therefore n has at least one prime partition whose least part prime does not divide n. This sequence lists the greatest such prime for each n. The indices of the records of this sequence are in A001043.
EXAMPLE
The only prime partition of 2 is [2], but 2|2, so a(2) = 0. Also, since [2,2,2] and [3,3] are the prime partitions of 6, with 2|6 and 3|6, a(6) = 0. The prime partitions of 5 are [2,3] and [5], but 2 does not divide 5 so a(5) = 2.
From Michael De Vlieger, Apr 01 2020: (Start)
Chart showing terms k in rows 5 <= n <= 24 of A333238, plotted at pi(k), with "." replacing terms k | n. In the table, we place a(n) in parenthesis:
n k
-------------------
5 (2) .
6 . .
7 (2) .
8 . (3)
9 (2) .
10 . (3) .
11 2 (3) .
12 . . (5)
13 2 (3) .
14 . (3) .
15 (2) . .
16 . 3 (5)
17 2 3 (5) .
18 . . 5 (7)
19 2 3 (5) .
20 . 3 . (7)
21 2 . (5) .
22 . 3 (5) .
23 2 3 (5) .
24 . . 5 7 (11)
... (End)
MATHEMATICA
Block[{m = 84, s, a}, a = ConstantArray[{}, m]; s = {Prime@ PrimePi@ m}; Do[If[# <= m, If[And[FreeQ[a[[#]], Last[s]], Mod[#, Last[s]] != 0], a = ReplacePart[a, # -> Union@ 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}]; Map[If[Length[#] == 0, 0, Last@ #] &, Rest@ a]] (* Michael De Vlieger, Apr 01 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Mar 30 2020
STATUS
approved