login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A327415
Representation of integers by the product of prime partitions.
1
0, 1, 2, 3, 4, 5, 9, 7, 15, 14, 21, 11, 35, 13, 33, 26, 39, 17, 65, 19, 51, 38, 57, 23, 95, 46, 69, 92, 115, 29, 161, 31, 87, 62, 93, 124, 155, 37, 217, 74, 111, 41, 185, 43, 123, 86, 129, 47, 215, 94, 141, 188, 235, 53, 329, 106, 159, 212, 265, 59, 371, 61
OFFSET
0,3
COMMENTS
A partition is prime if all parts are primes. A partition of an odd integer is minimal if it has at most one odd part and is shorter than any other such partition. A partition of an even integer n > 2 is minimal if it has at most two parts, one of which is the greatest prime less than n - 1. The terms of the sequence are the products of these partitions. For n in {0, 1, 2} a(n) = n by convention.
LINKS
Eric Weisstein's World of Mathematics, Prime Partition
EXAMPLE
n a(n) partition
2 2 [2]
3 3 [3]
4 4 [2, 2]
5 5 [5]
6 9 [3, 3]
7 7 [7]
8 15 [5, 3]
9 14 [7, 2]
10 21 [7, 3]
11 11 [11]
12 35 [7, 5]
13 13 [13]
14 33 [11, 3]
15 26 [13, 2]
16 39 [13, 3]
17 17 [17]
18 65 [13, 5]
19 19 [19]
20 51 [17, 3]
MAPLE
a := proc(n) local r, p;
if n <= 2 then return n fi;
if n::odd then
if isprime(n) then return n fi;
r := prevprime(n);
p := [seq(2, i=1..(n + 1 - r)/2), r]
else
r := prevprime(n - 1);
p := [n - r, r]
fi;
return mul(k, k in p)
end: seq(a(n), n = 0..61);
PROG
(SageMath)
def a(n):
if n <= 2: return n
if n % 2 == 1:
if is_prime(n): return n
r = previous_prime(n)
p = [r] + [2]*((n + 1 - r)//2)
else:
r = previous_prime(n - 1)
p = [r, n - r]
return mul(p)
print([a(n) for n in range(40)])
CROSSREFS
Sequence in context: A222257 A327456 A238535 * A072501 A092975 A164340
KEYWORD
nonn
AUTHOR
Peter Luschny, Sep 08 2019
STATUS
approved