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.
%I A272043 #16 Sep 29 2024 17:01:25 %S A272043 2,3,31,13,523,31,3833,491,5483,523,18149,661,44657,3833,18869,7333, %T A272043 165479,5483,153953,20411,129127,18149,538651,7079,932257,44657, %U A272043 417037,52639,2223773,18869,3124217,175229,1993763,165479,2794811,50461,8678963,153953 %N A272043 a(n) is the shyest prime in base n. %C A272043 Terminology: consider pairs of final digits of consecutive primes (a,b). Then of all pairs (3,1) is found last in the prime sequence, corresponding to (523, 541). This is termed the shyest pair, with 523 the shyest prime. %C A272043 Consider final digit pairs (a,b) of consecutive primes. %C A272043 There are three unique pairs: (2, 3) (3, 5) (5, 7) %C A272043 For the remaining 16 pairs, record the first observed primes corresponding to the pair: %C A272043 Initial prime -- Second prime (mod 10) --- %C A272043 (mod 10) 1 3 7 9 %C A272043 1 181,191 11, 13 31, 37 401,409 %C A272043 3 523,541 283,293 13, 17 23, 29 %C A272043 7 7, 11 47, 53 337,347 17, 19 %C A272043 9 29, 31 19, 23 89, 97 139,149 %C A272043 523,541 is the largest pair, thus the last to occur in the sequence of primes. The first member of this pair is the shyest prime, base 10. (Note that if we consider two digit pairs (ab, cd) then 40191937, 40192037 is the shyest pair for base 10.) %C A272043 For base 3 the table is: %C A272043 Initial prime Second prime (mod 3) %C A272043 (mod 3) 0 1 2 %C A272043 0 - - 3,5 %C A272043 1 - 31,37 7,11 %C A272043 2 2,3 5,7 23,29 %C A272043 and 31 is the shyest prime base 3. %H A272043 Giovanni Resta, <a href="/A272043/b272043.txt">Table of n, a(n) for n = 1..200</a> %H A272043 Erica Klarreich, <a href="https://www.quantamagazine.org/20160313-mathematicians-discover-prime-conspiracy/">Mathematicians Discover Prime Conspiracy</a>, Quanta Magazine, March 13, 2016 %H A272043 Robert J. Lemke Oliver and Kannan Soundararajan, <a href="http://arxiv.org/abs/1603.03720">Unexpected biases in the distribution of consecutive primes</a>, arXiv:1603.03720 [math.NT], 2016. %H A272043 Andy Martin, <a href="/A272043/a272043.txt">Ruby code output of first 35 terms and additional data</a> %H A272043 Terence Tao, <a href="https://terrytao.wordpress.com/2016/03/14/biases-between-consecutive-primes/">Biases between consecutive primes</a>, blog entry March 14, 2016. %t A272043 a[n_] := Block[{g,p,m,q,k, e= First /@ Select[ Tally[ Mod[ Prime@ Range[n* 100], n]], #[[2]] > 50 &], A}, A = Association@ Table[{i,j} -> 0, {i,e}, {j,e}]; g = Length[e]^2; m=p=2; While[g > 0, q = NextPrime@p; k = Mod[{p, q}, n]; If[ Lookup[A, Key@k, 1] == 0, A[k] = 1; g--]; m=p; p=q]; m]; Array[a, 25] (* _Giovanni Resta_, Apr 19 2016 *) %o A272043 (Ruby) %o A272043 require 'Prime' %o A272043 # Ruby Code %o A272043 # Generates Hash with first occurrences of all possible pairs (a,b) %o A272043 # of final digits for consecutive primes in specified base. %o A272043 def gen_hash(h, base) %o A272043 last_prime = 2 %o A272043 iteration = last_found = 0 %o A272043 Prime.each() do |prime| %o A272043 # This check could be improved & may be invalid for bases above 35. %o A272043 return if (iteration+=1) > 10000 && iteration > 2 * last_found %o A272043 next if prime == 2 %o A272043 l = last_prime.to_s(base)[-1] %o A272043 p = prime.to_s(base)[-1] %o A272043 if h[[l,p]].nil? %o A272043 h[[l,p]] = [last_prime,prime] %o A272043 last_found = iteration %o A272043 end %o A272043 last_prime = prime %o A272043 end %o A272043 end %o A272043 puts "First Prime Second Prime Base Difference Different Final Digits In" %o A272043 puts " Pairs Base Notation" %o A272043 puts " 2 3 1 1 1 1 1" %o A272043 # For bases above 35 additional programming needed. %o A272043 2.upto(35){|base| %o A272043 gen_hash(h = Hash.new, base) %o A272043 p0 = h.values.sort.last[0] %o A272043 p1 = h.values.sort.last[1] %o A272043 printf("%11d %12d %4d %10d %10d %s %s\n", %o A272043 p0, p1, base, p1 - p0, h.length, p0.to_s(base)[-1], p1.to_s(base)[-1]) %o A272043 } %Y A272043 Cf. A269364, A270310. %K A272043 nonn,base %O A272043 1,1 %A A272043 _Andy Martin_, Apr 18 2016 %E A272043 a(22)-a(38) from _Giovanni Resta_, Apr 19 2016