A070029 Primes with only prime digits and whose initial, all intermediate and final iterated sums of digits are primes.
2, 3, 5, 7, 23, 223, 227, 353, 2333, 2777, 3323, 7727, 27527, 33377, 33773, 35537, 35573, 35753, 37337, 52727, 53777, 55337, 55373, 55733, 57557, 57737, 57773, 73553, 73757, 75227, 75353, 75377, 75533, 75557, 75773, 77573, 222557, 222773
Offset: 1
Examples
53777 is a term because 53777 is a prime with only prime digits and 5+3+7+7+7=29, 2+9=11 and 1+1=2 are all prime.
Programs
-
Mathematica
iifpQ[n_]:=AllTrue[NestWhileList[Total[IntegerDigits[#]]&,n,#>9&],PrimeQ]; Select[Prime[Range[20000]],AllTrue[IntegerDigits[#],PrimeQ]&&iifpQ[#]&] (* Harvey P. Dale, Jul 18 2021 *)
Comments