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”).

A374173
a(n) is the smallest prime whose base-n representation contains a run of at least n identical digits.
0
3, 13, 683, 3907, 55987, 960803, 19173967, 435848051, 11111111113, 1540683021299, 19453310068921, 328114698808283, 45302797058044219, 469172025408063623, 19676527011956855059, 878942778254232811943, 120353718818554114936591, 109912203092239643840221
OFFSET
2,1
COMMENTS
a(2) to a(18) are all increasing, but a(19) is smaller than a(18).
a(n) = A023037(n) for n in A088790. - Robert Israel, Dec 31 2024
LINKS
EXAMPLE
a(2) = 3 = 11_2.
a(3) = 13 = 111_3.
a(11) = 1540683021299 = 544444444444_11.
a(18) = 120353718818554114936591 = 3111111111111111111_18.
a(19) = 109912203092239643840221 = 1111111111111111111_19.
MAPLE
f:= proc(n) local t, Q, i, j;
t:= (n^n-1)/(n-1);
if isprime(t) then return t fi;
for i from 1 to n-1 do
Q:= select(isprime, [seq(i*t*n+j, j=1..n-1),
seq(i*n^n+j*t, j=1..n-1)]);
if Q <> [] then return min(Q) fi;
od;
FAIL
end proc:
map(f, [$2..20]); # Robert Israel, Dec 31 2024
MATHEMATICA
d[n_]:=d[n]=Table[Table[m, n], {m, 0, n-1}];
dpre[n_]:=Flatten[Table[{m}~Join~#&/@d[n], {m, 0, n-1}], 1];
dpost[n_]:=Flatten[Table[Map[#~Join~{m}&, d[n]], {m, 0, n-1}], 1];
dprepost[n_]:=Flatten[Table[Map[{j}~Join~#~Join~{m}&, d[n]], {m, 0, n-1}, {j, 0, n-1}], 2];
c[n_]:=c[n]=DeleteDuplicates[Sort[Select[FromDigits[#, n]&/@Join[d[n], dpre[n], dpost[n], dprepost[n]], #>n&]]];
a[n_]:=a[n]=Do[If[PrimeQ[q], Return[q]; Break[]; ], {q, c[n]}];
Table[a[n], {n, 2, 19}]
CROSSREFS
Sequence in context: A222762 A290376 A089711 * A173759 A001039 A357855
KEYWORD
base,nonn,changed
AUTHOR
Robert P. P. McKone, Jun 30 2024
STATUS
approved