A365494 a(n) is the smallest number which can be represented as the sum of n distinct n-almost primes in exactly n ways, or -1 if no such number exists.
2, 19, 65, 190, 440, 1160, 2896, 7072, 16832, 40064, 90752, 208640, 476160, 1082880, 2398208, 5310464, 11694080, 25616384, 56475648, 122388480, 266010624, 575012864, 1245446144, 2699034624, 5779750912, 12296650752, 26377977856, 55855546368, 118656860160, 255458279424, 531669975040
Offset: 1
Keywords
Examples
For n = 2: 19 = 2*2 + 3*5 = 3*3 + 2*5.
Links
- David A. Corneth, Table of n, a(n) for n = 1..50
- Eric Weisstein's World of Mathematics, Almost Prime.
Programs
-
Maple
f:= proc(n) uses priqueue; local pq, S, t,x,y,k, i, p, v, R; initialize(pq); insert([-2^n, 2$n],pq); S[0]:= 1: for i from 1 to n do S[i]:= 0 od: do t:= extract(pq); x:= -t[1]; for i from n to 1 by -1 do S[i]:= expand(S[i] + S[i-1] * y^x); od; if type(S[n],`+`) then R:= select(t -> degree(t,y) < x and eval(t,y=1) = n, convert(S[n],list)); if R <> [] then return min(map(t -> degree(t,y),R)) fi; fi; p:= nextprime(t[-1]); for i from n+1 to 2 by -1 while t[i] = t[-1] do v:= x*(p/t[-1])^(n+2-i); insert([-v, op(t[2..i-1]), p$(n+2-i)], pq) od; od; end proc: map(f, [$1..19]); # Robert Israel, Jun 10 2025
Extensions
a(5)-a(19) from Robert Israel, Jun 10 2025
More terms from David A. Corneth, Jun 10 2025