A048528 Primes expressible in two ways as the sum of an integer and its digit sum.
101, 103, 107, 109, 113, 307, 311, 313, 317, 509, 521, 709, 719, 911, 919, 1009, 1013, 1213, 1217, 1409, 1607, 1609, 1613, 1619, 1621, 1811, 1823, 2017, 2027, 2111, 2113, 2309, 2311, 2521, 2711, 2713, 2719, 2917, 2927, 3011, 3209, 3217, 3221, 3407, 3413, 3613, 3617, 3623
Offset: 1
Examples
313 = 296 + (2+9+6) and 313 = 305 + (3+0+5).
Links
- Delbert L. Johnson, Table of n, a(n) for n = 1..20000
Programs
-
Mathematica
Transpose[Select[Tally[Select[#+Total[IntegerDigits[#]]&/@ Range[ 5000], PrimeQ]],#[[2]]==2&]][[1]] (* Harvey P. Dale, May 09 2013 *)
-
Python
from collections import Counter from sympy import isprime def a_list(upto): return [i for i, j in Counter([i+sum(map(int, str(i))) for i in range(upto)]).items() if j>1 and isprime(i)] print(a_list(4000)) # Nicholas Stefan Georgescu, Mar 02 2023
Extensions
Corrected and extended by Harvey P. Dale, May 09 2013