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!)
A114739 a(1) = 1. Smallest prime == 1 (mod n) if n is composite else least composite number ==1 (mod n). 0
1, 9, 4, 5, 6, 7, 8, 17, 19, 11, 12, 13, 14, 29, 31, 17, 18, 19, 20, 41, 43, 23, 24, 73, 101, 53, 109, 29, 30, 31, 32, 97, 67, 103, 71, 37, 38, 191, 79, 41, 42, 43, 44, 89, 181, 47, 48, 97, 197, 101, 103, 53, 54, 109, 331, 113, 229, 59, 60, 61 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
PROG
(PARI) a(n) = {if (n == 1, return (1)); k = 1; if (! isprime(n), while (! isprime(k*n+1), k++), while (isprime(k*n+1), k++)); k*n+1; } \\ Michel Marcus, Sep 17 2013
CROSSREFS
Sequence in context: A019880 A021518 A030070 * A240964 A154900 A246546
KEYWORD
nonn,less
AUTHOR
Amarnath Murthy, Nov 15 2005
EXTENSIONS
a(3) corrected and more terms added by Michel Marcus, Sep 17 2013
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 July 30 22:26 EDT 2024. Contains 374771 sequences. (Running on oeis4.)