|
|
A290126
|
|
Least k such that the sum of the n greatest divisors of k is a prime number.
|
|
2
|
|
|
2, 2, 4, 28, 16, 140, 24, 90, 120, 108, 60, 144, 300, 288, 120, 672, 252, 432, 240, 630, 960, 756, 480, 1200, 1080, 1728, 1680, 1008, 720, 2016, 840, 3150, 2160, 2700, 1980, 4800, 2520, 3780, 3240, 8736, 3960, 3600, 6720, 6930, 10800, 6300, 4200, 16848, 9240, 5040
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
The corresponding primes are 2, 3, 7, 53, 31, 307, 59, 223, 331, 277, 167, 397, 853, 809, 359, 1973, 727, 1237, ...
The squares of the sequence are 4, 16, 144, 3600, ...
|
|
LINKS
|
|
|
EXAMPLE
|
a(4)=28 because the sum of the last 4 divisors of 28: 28+14+7+4 = 53 is a prime number.
|
|
MAPLE
|
M:= 20000: # to get all terms before the first term > M
R:= 'R':
for k from 2 to M do
F:= ListTools:-PartialSums(sort(convert(
numtheory:-divisors(k), list), `>`));
for n in select(t -> isprime(F[t]), [$1..nops(F)]) do
if not assigned(R[n]) then R[n]:= k fi
od
od:
inds:= map(op, {indices(R)}):
N:= min({$1..max(inds)+1} minus inds):
|
|
MATHEMATICA
|
Table[k=1; While[Nand[Length@#>=n, PrimeQ[Total@Take[PadLeft[#, n], n]]]&@Divisors@k, k++]; k, {n, 1, 20}](* Program from Michael De Vlieger adapted for this sequence. See A289776 *)
|
|
PROG
|
(PARI) a(n) = {my(i = 2, d); while(1, d = divisors(i); if(#d >= n, if(isprime(sum(j=#d-n+1, #d, d[j])), return(i), i++), i++)); i} \\ David A. Corneth, Jul 20 2017
(Python)
from sympy import divisors, isprime
i = 1
while len(divisors(i)) < n or not isprime(sum(divisors(i)[-n:])):
i += 1
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|