A186773 Odd numbers whose decimal digits sum to a prime.
3, 5, 7, 11, 21, 23, 25, 29, 41, 43, 47, 49, 61, 65, 67, 83, 85, 89, 101, 111, 113, 115, 119, 131, 133, 137, 139, 151, 155, 157, 173, 175, 179, 191, 193, 197, 199, 201, 203, 205, 209, 221, 223, 227, 229, 241, 245, 247, 263, 265, 269, 281, 283, 287, 289, 311
Offset: 1
Links
- Nathaniel Johnston, Table of n, a(n) for n = 1..10000
Programs
-
Maple
A186773 := proc(n) option remember: local d,k: if(n=1)then return 3: fi: for k from procname(n-1)+2 by 2 do d:=convert(k,base,10): if(isprime(add(d[j],j=1..nops(d))))then return k: fi: od: end: seq(A186773(n),n=1..56); # Nathaniel Johnston, May 27 2011
-
Mathematica
Select[Range[3,311,2],PrimeQ[Total[IntegerDigits[#]]]&] (* Harvey P. Dale, Oct 20 2011 *)
Extensions
Corrected by Nathaniel Johnston, May 27 2011