|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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)
|
|
LINKS
|
|
|
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
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
a(14)-a(73) by Chuck Gaydos
|
|
STATUS
|
approved
|
|
|
|