A331634 a(n) is the greatest possible least part of any prime partition of n.
2, 3, 2, 5, 3, 7, 3, 3, 5, 11, 5, 13, 7, 5, 5, 17, 7, 19, 7, 7, 11, 23, 11, 7, 13, 7, 11, 29, 13, 31, 13, 11, 17, 11, 17, 37, 19, 13, 17, 41, 19, 43, 13, 13, 23, 47, 19, 13, 19, 17, 23, 53, 23, 17, 19, 19, 29, 59, 29, 61, 31, 17, 23, 19, 29, 67, 31, 23, 29, 71
Offset: 2
Keywords
Examples
a(12) = 5, because 5 is the largest of all minimal primes in partitions of 12 into prime parts: [2,2,2,2,2,2], [2,2,2,3,3], [3,3,3,3], [2,2,3,5], [2,5,5], [2,3,7], [5,7].
Links
- Alois P. Heinz, Table of n, a(n) for n = 2..12500
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: a:= n-> degree(b(n, 2, x)): seq(a(n), n=2..100); # Alois P. Heinz, Mar 13 2020
-
Mathematica
Array[If[PrimeQ@ #, #, Max@ IntegerPartitions[#, #/FactorInteger[#][[1, 1]], Prime@ Range@ PrimePi[# - 2]][[All, -1]] ] &, 60, 2] (* Michael De Vlieger, Jan 26 2020 *) (* Second program: *) b[n_, p_, t_] := b[n, p, t] = If[n == 0, 1, If[p > n, 0, Function[q, Sum[ b[n - p*j, q, 1], {j, 1, n/p}]*t^p + b[n, q, t]][NextPrime[p]]]]; a[n_] := Exponent[b[n, 2, x], x]; a /@ Range[2, 100] (* Jean-François Alcover, Jun 04 2021, after Alois P. Heinz *)
Formula
For prime p>2, a(p) = a(2*p) = a(3*p) = p.