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.

A120124 Smallest prime p such that p*10^n + 1 is a prime.

This page as a plain text file.
%I A120124 #20 May 29 2014 04:22:09
%S A120124 3,7,3,7,7,61,3,7,7,3,19,37,109,79,97,13,37,19,73,103,97,283,157,61,
%T A120124 19,61,1213,3,163,691,367,163,181,157,241,3,103,733,151,283,337,193,
%U A120124 211,163,7,73,307,61,223,1549,31,127,13,547,103,151,193,811,337,19,1021,151
%N A120124 Smallest prime p such that p*10^n + 1 is a prime.
%C A120124 All terms belong to A007645. All terms also belong to A055664. Also many terms including the first 14 smallest primes from 3 to 139 {3,7,13,19,31,37,43,61,73,79,97,103,127,139} belong tpA023203. The smallest term that differs from A023203 is 151.
%H A120124 Robert Israel, <a href="/A120124/b120124.txt">Table of n, a(n) for n = 1..1000</a> (first 300 terms from _Vincenzo Librandi_)
%e A120124 a(1) = 3 because 31 = 3*10 + 1 is the smallest prime of form p*10 + 1, where p is a prime.
%e A120124 a(2) = 7 because 701 = 7*100 + 1 is the smallest prime of form p*100 + 1.
%p A120124 Primes:= select(isprime,[$1..10^5]):
%p A120124 for n from 1 to 1000 do
%p A120124    for p in Primes do
%p A120124       if isprime(p*10^n+1) then
%p A120124         A[n]:= p
%p A120124       fi
%p A120124     od
%p A120124 od:
%p A120124 seq(A[n],n=1..1000); # _Robert Israel_, May 29 2014
%t A120124 prs=Prime[Range[2000]];Table[i=1;While[!PrimeQ[First[Take[prs,{i}]] 10^n+1],i++];Prime[i],{n,200}] (* _Harvey P. Dale_, May 15 2011 *)
%Y A120124 Cf. A121172, A030430, A062800, A007645, A055664, A023203.
%K A120124 nonn
%O A120124 1,1
%A A120124 _Alexander Adamchuk_, Aug 15 2006