|
|
A333636
|
|
a(n) is the greatest least part of a partition of n into prime parts which does not divide n, or 0 if no such prime exists.
|
|
0
|
|
|
0, 0, 0, 2, 0, 2, 3, 2, 3, 3, 5, 3, 3, 2, 5, 5, 7, 5, 7, 5, 5, 5, 11, 7, 7, 7, 11, 7, 13, 7, 13, 7, 11, 11, 17, 11, 7, 11, 17, 11, 19, 13, 13, 13, 17, 13, 19, 13, 19, 13, 23, 17, 23, 17, 19, 17, 17, 17, 29, 19, 19, 17, 23, 19, 29, 19, 31, 19, 29, 19, 31, 19, 31, 23, 29, 23, 37, 19, 37, 23, 29, 23, 41
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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.
|
|
LINKS
|
|
|
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.
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
|
|
|
STATUS
|
approved
|
|
|
|