login
A175017
Primes p containing the string "13" and sum of digits sod(p) = 13.
2
139, 1327, 1381, 2137, 2713, 3613, 4513, 5413, 6133, 7213, 9013, 11317, 11353, 12613, 13009, 13063, 13171, 13441, 13513, 13711, 15313, 18013, 21613, 24133, 26113, 31333, 31513, 32413, 34213, 36013, 41341, 41413, 44131, 45013, 51133, 53113, 54013
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.
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
Sequence in context: A276263 A140791 A358400 * A271977 A217724 A230693
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