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!)
A073436 Smallest k such that k mod pi(k) = n. 4
2, 3, 5, 7, 16, 21, 22, 25, 26, 29, 32, 65, 66, 70, 77, 78, 82, 86, 87, 88, 92, 93, 94, 95, 99, 106, 116, 117, 118, 119, 218, 219, 220, 221, 222, 247, 248, 249, 250, 255, 256, 261, 262, 267, 268, 289, 290, 291, 292, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
a(n) > a(n-1) except for 68, 180, 1051, 6454, 6456, 6459, 40073, 40078, ..., . - Robert G. Wilson v, Feb 24 2023
LINKS
FORMULA
a(n) = Min{k: k mod A000720(k) = n} = Min{k: A065134(k) = n}.
EXAMPLE
Remainder 7 appears first as 25 mod pi(25) = 25 mod 9 = 7, so a(7) = 25.
MAPLE
with(numtheory); f:=proc(n) local i, j, k; for i from 2 to 10000 do if i mod pi(i) = n then RETURN(i); fi; od: RETURN(-1); end; # N. J. A. Sloane, Sep 01 2008
MATHEMATICA
a = Compile[{{n, _Integer}}, Block[{k = 2}, While[ Mod[k, PrimePi@ k] != n, k++]; k]]; Array[a, 59, 0] (* Robert G. Wilson v, Feb 24 2023 *)
PROG
(PARI) a(n)={my(q=0, k=2); forprime(p=3, oo, q++; while(k<p, if(k%q==n, return(k)); k++))} \\ Andrew Howroyd, Feb 23 2023
CROSSREFS
Sequence in context: A024377 A025069 A319913 * A094575 A145968 A343537
KEYWORD
nonn
AUTHOR
Labos Elemer, Jul 31 2002
EXTENSIONS
a(0) from Robert G. Wilson v, Feb 23 2023
STATUS
approved

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 19 16:38 EDT 2024. Contains 371794 sequences. (Running on oeis4.)