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.

A158521 Primes which yield primes when "13" is prefixed or appended.

This page as a plain text file.
%I A158521 #10 Feb 03 2019 04:02:17
%S A158521 19,61,103,127,241,331,337,367,523,577,709,829,997,1009,1129,1213,
%T A158521 1231,1321,1381,1489,1543,1627,1861,2113,2137,2287,2347,2383,2689,
%U A158521 2851,2953,2971,3187,3499,3559,3583,3673,3967,4219,4243,4327,4363,4513,4591,4789
%N A158521 Primes which yield primes when "13" is prefixed or appended.
%C A158521 Primes in A158232.
%C A158521 It is conjectured that this sequence is infinite.
%D A158521 Richard E. Crandall, Carl Pomerance, Prime Numbers, Springer, 2005.
%D A158521 Wladyslaw Narkiewicz, The development of prime number theory, Springer, 2000.
%H A158521 Harvey P. Dale, <a href="/A158521/b158521.txt">Table of n, a(n) for n = 1..1000</a>
%F A158521 Prime p is a term if the concatenations "13p" and "p13" both yield primes.
%e A158521 Prime p=3 is not a term: "p13"=313 is prime but "13p"=133 = 7*19.
%e A158521 For p=19, both 1319 and 1913 are prime; this is the first prime that meets the requirements of the definition, so a(1)=19.
%p A158521 cat2 := proc(a,b) ndigsb := max(ilog10(b)+1,1) ; a*10^ndigsb+b ; end: for i from 1 to 800 do p := ithprime(i) ; if isprime(cat2(13,p)) and isprime(cat2(p,13)) then printf("%d,",p) ; fi; od: # _R. J. Mathar_, Apr 02 2009
%t A158521 Select[Prime[Range[1000]],AllTrue[{13*10^IntegerLength[#]+#,100#+13}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Apr 17 2015 *)
%Y A158521 Cf. A158232, A157772.
%K A158521 nonn,base
%O A158521 1,1
%A A158521 Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Mar 20 2009
%E A158521 337, 1231, 1321 inserted by _R. J. Mathar_, Apr 02 2009