login
A384161
Sum of next a(n) successive prime cubes is prime.
2
4, 7, 3, 11, 13, 9, 131, 9, 15, 3, 31, 27, 3, 13, 7, 3, 31, 131, 15, 17, 13, 5, 21, 29, 3, 33, 3, 7, 11, 43, 5, 41, 43, 49, 27, 49, 37, 85, 5, 41, 3, 41, 65, 51, 13, 29, 65, 5, 89, 3, 27, 75, 3, 73, 3, 3, 5, 3, 23, 9, 7, 3, 71, 55, 35, 7, 71, 71, 19, 33, 15
OFFSET
1,1
COMMENTS
Group the primes such that the sum of cubes of members of each group is a prime, and each successive group is as short as possible.
LINKS
EXAMPLE
Primes, their cubes and the lengths of the blocks when summed becomes a prime.
Primes 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41
Cubes 8, 27, 125, 343, 1331, 2197, 4913, 6859, 12167, 24389, 29791, 50653, 68921
\--------------/ \------------------------------------------/ \---...
Sum 503 81647
a(n) = 4 7
MAPLE
i:= 0: p:= 0: t:= 0: count:= 0: R:= NULL:
while count < 100 do
p:= nextprime(p);
i:= i+1;
t:= t + p^3;
if isprime(t) then
R:= R, i; count:= count+1; i:= 0; t:= 0;
fi
od:
R; # Robert Israel, May 25 2025
MATHEMATICA
p=1; s={}; Do[c=0; sm=0; While[!PrimeQ[sm], sm=sm+Prime[p]^3; p++; c++]; AppendTo[s, c], {n, 71}]; s (* James C. McMahon, Jun 09 2025 *)
PROG
(Python)
from itertools import count, islice
from sympy import isprime, nextprime
def agen(): # generator of terms
s, i, p = 0, 1, 2
while True:
while not(isprime(s:=s+p**3)): i, p = i+1, nextprime(p)
yield i
s, i, p = 0, 1, nextprime(p)
print(list(islice(agen(), 71))) # Michael S. Branicky, May 23 2025
CROSSREFS
Cf. A030078, A073684 (sum of successive primes), A383504 (sum of successive prime squares).
Sequence in context: A130204 A021215 A063378 * A280547 A301930 A365940
KEYWORD
nonn
AUTHOR
Abhiram R Devesh, May 20 2025
STATUS
approved