login
A335285
a(n) is the greatest possible greatest part of any partition of n into prime parts.
2
2, 3, 2, 5, 3, 7, 5, 7, 7, 11, 7, 13, 11, 13, 13, 17, 13, 19, 17, 19, 19, 23, 19, 23, 23, 23, 23, 29, 23, 31, 29, 31, 31, 31, 31, 37, 31, 37, 37, 41, 37, 43, 41, 43, 43, 47, 43, 47, 47, 47, 47, 53, 47, 53, 53, 53, 53, 59, 53, 61, 59, 61, 61, 61, 61, 67, 61, 67
OFFSET
2,1
COMMENTS
For n odd, a(n) is the greatest prime <= n; for n even > 2, a(n) is the greatest prime < n-1.
For composite n = p + 1, p does not appear since 2 is the smallest prime. - Michael De Vlieger, May 31 2020
LINKS
Michael De Vlieger, Plot of greatest primes of prime partitions of n for 2 <= n <= 41; this sequence is the greatest prime shown in each row of the diagram.
EXAMPLE
a(9) = 7, the greatest prime < 9 (prime partitions of 9 are: [2,7], [2,2,5], [2,2,2,3] and [3,3,3], in which 7 is greatest of greatest parts).
a(12) = 7 (greatest prime < 11).
MATHEMATICA
Array[Max@ Select[IntegerPartitions[#], AllTrue[#, PrimeQ] &][[All, 1]] &, 68, 2] (* Michael De Vlieger, May 30 2020 *)
Array[Prime[PrimePi@ # - Boole[And[PrimeQ[# - 1], # != 3]]] &, 68, 2] (* Michael De Vlieger, May 31 2020 *)
CROSSREFS
Sequence in context: A364391 A060474 A065988 * A336268 A075105 A265675
KEYWORD
nonn
STATUS
approved