%I #56 Apr 23 2018 08:51:56
%S 2,23,235,2357,12357,3,37,37,3,3,3,37,137,3,37,3,3,3,37,137,3,3,3,3,3,
%T 3,3,3,3,3,3,3,37,37,37,37,7,37,7,37,37,37,37,3,37,37,37,3,37,37,3,3,
%U 3,3,37,3,3,3,37,137,3,3,3,3,3,3,3,37,7,7,37,37,7
%N a(n) is the ending digit of a prime number occurring most up to the n-th prime. If a tie exists, then the digits are concatenated in ascending order.
%C 1 occurs first at a(2766290)
%C 2 occurs first at a(1)
%C 3 occurs first at a(6)
%C 7 occurs first at a(37)
%C 9 occurs first at a(7153)
%C 13 occurs first at a(45532)
%C 17 occurs first at a(12655)
%C 23 occurs first at a(2)
%C 37 occurs first at a(7)
%C 39 occurs first at a(429687)
%C 79 occurs first at a(7042)
%C 137 occurs first at a(13)
%C 235 occurs first at a(3)
%C 379 occurs first at a(93562)
%C 2357 occurs first at a(4)
%C 12357 occurs first at a(5)
%H Caldwell and Honaker, <a href="https://primes.utm.edu/curios/page.php?curio_id=32107">Prime Curios!: 137</a>
%e a(13)=137 because primes that end with digits 1, 3, and 7 occur most frequently (exactly three times each) up to the 13th prime.
%t With[{s = Array[Mod[Prime@ #, 10] &, 73]}, Array[FromDigits@ Last[SplitBy[#, Last]][[All, 1]] &@ SortBy[Tally@ Take[s, #], Last] &, Length@ s]] (* _Michael De Vlieger_, Apr 21 2018 *)
%o (PARI) lista(nn) = {my(p=1, v = vector(9)); for (n=1, nn, p = nextprime(p+1); d = p % 10; v[d] ++; vmax = vecmax(v); s = ""; for (i=1, #v, if (v[i] == vmax, s = concat(s, i));); print1(eval(s), ", "););} \\ _Michel Marcus_, Apr 11 2018
%Y Cf. A000040.
%K nonn,base
%O 1,1
%A _G. L. Honaker, Jr._, Mar 27 2018
%E a(14)-a(73) by Chuck Gaydos
|