login
A179551
Primes p such that p plus the sum of cubes of its digits yields a prime.
1
11, 13, 31, 73, 79, 101, 103, 109, 127, 167, 257, 277, 307, 367, 389, 419, 431, 439, 523, 587, 613, 653, 673, 677, 691, 761, 907, 947, 983, 1021, 1061, 1063, 1151, 1153, 1193, 1283, 1289, 1409, 1423, 1483, 1553, 1559, 1579, 1621, 1733, 1759, 1823, 1847, 1861
OFFSET
1,1
LINKS
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
Cf. A076162.
Sequence in context: A089755 A262254 A082238 * A054262 A053649 A104151
KEYWORD
nonn,base
AUTHOR
Carmine Suriano, Jul 19 2010
STATUS
approved