login
A379760
Smallest prime that is the sum of 2n+1 cubes of consecutive odd primes.
2
66347, 15643, 81647, 279397, 1961623, 3701627, 5644601, 2505187, 8016551, 4695947, 9335519, 6819443, 12830327, 35259463, 35278489, 56759723, 39944393, 86442623, 186387137, 95860493, 118647143, 170943137, 118651139, 509399153, 241399309, 381448853, 877324879
OFFSET
1,1
LINKS
EXAMPLE
For n=2, the smallest sum of 2*n+1 = 5 cubed consecutive primes which is prime is a(2) = 7^3 + 11^3 + 13^3 + 17^3 + 19^3 = 15643.
MAPLE
P3:= map(t -> t^3, select(isprime, [seq(i, i=3..10^5, 2)])):
SP3:= ListTools:-PartialSums(P3):
f:= proc(n) local k;
for k from 1 do if isprime(SP3[k+2*n+1]-SP3[k]) then return SP3[k+2*n+1]-SP3[k] fi od
end proc:
map(f, [$1..50]); # Robert Israel, Feb 02 2025
MATHEMATICA
a[n_] := Block[{k = 1, s}, While[s = Sum[Prime[i]^3, {i, k, k + 2n}]; !PrimeQ[s], k++ ]; s]; Table[a[n], {n, 1, 27}]
PROG
(PARI) a(n) = my(k=2, s = sum(i=0, 2*n, prime(k+i)^3)); while (!isprime(s), s -= prime(k)^3; k++; s += prime(k+2*n)^3; ); s; \\ Michel Marcus, Jan 20 2025
CROSSREFS
Cf. A030078 (cube of primes), A082244 (analog for primes), A380319 (analog for square of primes).
Sequence in context: A251333 A157620 A174757 * A164129 A043591 A022256
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jan 02 2025
STATUS
approved