login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A301339
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.
0
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, 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, 3, 3, 37, 3, 3, 3, 37, 137, 3, 3, 3, 3, 3, 3, 3, 37, 7, 7, 37, 37, 7
OFFSET
1,1
COMMENTS
1 occurs first at a(2766290)
2 occurs first at a(1)
3 occurs first at a(6)
7 occurs first at a(37)
9 occurs first at a(7153)
13 occurs first at a(45532)
17 occurs first at a(12655)
23 occurs first at a(2)
37 occurs first at a(7)
39 occurs first at a(429687)
79 occurs first at a(7042)
137 occurs first at a(13)
235 occurs first at a(3)
379 occurs first at a(93562)
2357 occurs first at a(4)
12357 occurs first at a(5)
EXAMPLE
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.
MATHEMATICA
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 *)
PROG
(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
CROSSREFS
Cf. A000040.
Sequence in context: A262571 A283560 A159902 * A294268 A118385 A098739
KEYWORD
nonn,base
AUTHOR
G. L. Honaker, Jr., Mar 27 2018
EXTENSIONS
a(14)-a(73) by Chuck Gaydos
STATUS
approved