cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A175017 Primes p containing the string "13" and sum of digits sod(p) = 13.

Original entry on oeis.org

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

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Apr 04 2010

Keywords

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.

Examples

			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).
		

Crossrefs

Programs

  • 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 *)
  • 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

Extensions

Corrected and extended by Harvey P. Dale, Feb 03 2011