OFFSET
1,2
COMMENTS
Numbers ending with zero(s) when reversed have fewer digits.
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..10000
EXAMPLE
143 and 341 belong to the sequence since 143 + (1+4+3) = 151 is prime and 341 + (3+4+1) = 349 is also a prime.
MAPLE
read(transforms): isA191221 := proc(n) local r: r:=digrev(n): return (isprime(n+digsum(n)) and isprime(r+digsum(r))): end: A191221 := proc(n) option remember: local k: if(n=1)then return 1: fi: for k from procname(n-1)+1 do if(isA191221(k))then return k: fi: od: end: seq(A191221(n), n=1..57); # Nathaniel Johnston, May 27 2011
MATHEMATICA
nrQ[n_]:=Module[{idn=IntegerDigits[n], t}, t=Total[idn]; And@@PrimeQ[{n+t, FromDigits[Reverse[idn]]+t}]]; Select[Range[1200], nrQ] (* Harvey P. Dale, Feb 24 2013 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Carmine Suriano, May 27 2011
STATUS
approved