OFFSET
1,1
COMMENTS
p = prime(k) of form (I) 13//r, (II) s//13 or (III) t//13//u with sod(r) = sod(s) = sod(t) + sod(u) = 9.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
EXAMPLE
1327 = prime(217), sod(1327) = 1+3+2+7 = 13, first term of sequence;
7213 = prime(922), sod(922) = 13, 9th term of sequence (the 55th so-called Honaker prime);
smallest such containing two "13"-strings: 13513 = prime(1601);
smallest such containing the maximal number of three "13"-strings: 13013131 = prime(850054);
smallest such palindromic prime: 31513 = palprime(53) = prime(3391), 2nd: 113030311 = palprime(986) = prime(6466683).
MATHEMATICA
p13Q[n_]:=Module[{idn=IntegerDigits[n]}, Total[idn]==13&&MemberQ[Partition[idn, 2, 1], {1, 3}]]
Select[Prime[Range[6000]], p13Q] (* Harvey P. Dale, Feb 03 2011 *)
PROG
(Python)
from sympy import nextprime
A175017_list, p = [], 2
while len(A175017_list) <= 100:
s = str(p)
if '13' in s and sum(int(d) for d in s) == 13:
A175017_list.append(p)
p = nextprime(p) # Chai Wah Wu, Mar 05 2020
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Apr 04 2010
EXTENSIONS
Corrected and extended by Harvey P. Dale, Feb 03 2011
STATUS
approved