OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(5)=79 since 79 + (7^3 + 9^3) = 1151 is a prime.
MAPLE
filter:= proc(p) local t, r;
if not isprime(p) then return false fi;
r:= add(t^3, t=convert(p, base, 10));
isprime(p+r)
end proc:
select(filter, [seq(i, i=3..10000, 2)]); # Robert Israel, Mar 30 2021
MATHEMATICA
Select[Prime[Range[300]], PrimeQ[#+Total[IntegerDigits[#]^3]]&] (* Harvey P. Dale, Feb 13 2011 *)
PROG
(Python)
from sympy import isprime, primerange
def sumddd(n): return sum(int(d)**3 for d in str(n))
def list(nn):
for p in primerange(2, nn+1):
if isprime(p+sumddd(p)): print(p, end=", ")
list(1861) # Michael S. Branicky, Mar 30 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Carmine Suriano, Jul 19 2010
STATUS
approved