login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A073325 a(n) = least k > 0 such that prime(k) == n (mod k). 3

%I #26 Mar 18 2023 18:35:41

%S 1,2,3,4,75,9,79,18,17,10,19,20,91,22,23,41,83,24,16049,43,2711,94,25,

%T 26,95,198,449,452,99,50,451,48,453,1072,447,54,16043,55,2719,56,459,

%U 57,101,472,100371,62,105,102,103,104,467,110,107,65,109,63,115,118,117

%N a(n) = least k > 0 such that prime(k) == n (mod k).

%C First appearance of n-1 in A004648. Are all positive integers present in A004648 and hence in this sequence? - _Zak Seidov_, Sep 02 2012

%H Zak Seidov, <a href="/A073325/b073325.txt">Table of n, a(n) for n = 1..301</a>

%F a(n) = Min{x; Mod[A000040(x), x]=n} = Min{x; A004648[x]=n}.

%e a(4) = 75 as prime(75) = 379 == 4 (mod 75).

%e a(44) = 100371 since prime(100371) = 1304867 == 44 (mod 100371) and prime(k) <> 44 (mod k) for k < 100371.

%t 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]

%t lk[n_]:=Module[{k=1},While[Mod[Prime[k],k]!=n,k++];k]; Array[lk,60,0] (* _Harvey P. Dale_, Nov 29 2013 *)

%o (PARI) stop=110000; for(n=0,59,k=1; while(k<stop&((prime(k)%k)!=n), k++); print1(if(k<stop,k,0),","))

%o (Python)

%o from sympy import prime, nextprime

%o def A073325(n):

%o p, m = prime(n), n

%o while p%m != n-1:

%o p = nextprime(p)

%o m += 1

%o return m # _Chai Wah Wu_, Mar 18 2023

%Y Cf. A000040, A002808, A004648, A073324, A073326.

%K nonn

%O 1,2

%A _Labos Elemer_, Jul 30 2002

%E Definition revised by _N. J. A. Sloane_, Aug 12 2009

%E A216162 merged into this sequence by _T. D. Noe_, Sep 07 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 07:41 EDT 2024. Contains 371964 sequences. (Running on oeis4.)