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

A378417
a(n) is the least k such that A127064(k) = n.
0
0, 1, 2, 3, 4, 17, 24, 62, 68, 162, 169, 176, 183, 188, 369, 694, 897, 988, 1027, 4183, 5510, 6063, 6341, 6444, 6465, 25787, 32844, 37722, 38811, 39450, 151679, 200946, 226703, 240056, 248947, 430398, 612633, 633473, 635344, 637227, 637237, 637256, 637306, 1095790, 1353912, 1554970, 7045573
OFFSET
1,3
COMMENTS
a(n) is the least k such that n - 1 iterations of A004648 (k -> prime(k) (mod k)) are needed to reach 0.
FORMULA
A127064(a(n)) = n.
EXAMPLE
a(6) = 17 because 5 iterations of A004648 starting at 17 result in 0, and every k < 17 requires fewer iterations:
prime(17) (mod 17) = 59 (mod 17) = 8
prime(8) (mod 8) = 19 (mod 8) = 3
prime(3) (mod 3) = 5 (mod 3) = 2
prime(2) (mod 2) = 3 (mod 2) = 1
prime(1) (mod 1) = 2 (mod 1) = 0.
MAPLE
P:= select(isprime, [2, seq(i, i=3..10^8, 2)]): nP:= nops(P):
V:= Array(0..nP): count:= 0: R[1]:= 0:
for n from 1 to nP do
V[n]:= V[P[n] mod n]+1;
if V[n] > count then count:= count+1; R[count]:= n fi;
od:
seq(R[i], i=1..count);
CROSSREFS
Sequence in context: A111191 A333825 A115891 * A359230 A293035 A037394
KEYWORD
nonn
AUTHOR
Robert Israel, Nov 25 2024
STATUS
approved