OFFSET
1,2
COMMENTS
First appearance of n-1 in A004648. Are all positive integers present in A004648 and hence in this sequence? - Zak Seidov, Sep 02 2012
LINKS
Zak Seidov, Table of n, a(n) for n = 1..301
EXAMPLE
a(4) = 75 as prime(75) = 379 == 4 (mod 75).
a(44) = 100371 since prime(100371) = 1304867 == 44 (mod 100371) and prime(k) <> 44 (mod k) for k < 100371.
MATHEMATICA
nn = 60; f[x_] := Mod[Prime[x], x]; t = Table[0, {nn}]; k = 0; While[Times @@ t == 0, k++; n = f[k]; If[n <= nn && t[[n]] == 0, t[[n]] = k]]; Join[{1}, t]
lk[n_]:=Module[{k=1}, While[Mod[Prime[k], k]!=n, k++]; k]; Array[lk, 60, 0] (* Harvey P. Dale, Nov 29 2013 *)
PROG
(PARI) stop=110000; for(n=0, 59, k=1; while(k<stop&((prime(k)%k)!=n), k++); print1(if(k<stop, k, 0), ", "))
(Python)
from sympy import prime, nextprime
def A073325(n):
p, m = prime(n), n
while p%m != n-1:
p = nextprime(p)
m += 1
return m # Chai Wah Wu, Mar 18 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jul 30 2002
EXTENSIONS
Definition revised by N. J. A. Sloane, Aug 12 2009
STATUS
approved