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!)
A231734 Least k such that n*k^2 - 1 is a prime, or 0 if no such k exists. 5
2, 2, 1, 1, 2, 1, 6, 1, 0, 3, 2, 1, 6, 1, 2, 0, 2, 1, 6, 1, 2, 3, 4, 1, 0, 2, 2, 3, 4, 1, 12, 1, 2, 6, 2, 0, 18, 1, 14, 3, 2, 1, 18, 1, 2, 27, 4, 1, 0, 2, 10, 3, 2, 1, 6, 2, 2, 3, 20, 1, 12, 1, 2, 0, 4, 2, 6, 1, 4, 9, 2, 1, 30, 1, 6, 3, 2, 2, 6, 1, 0, 12, 2, 1, 12, 3, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(9)=0 because 9*k^2-1 is never a prime: (3k-1)*(3k+1).
PROG
(PARI) a(n) = if (issquare(n) && (n>=9), 0, my(k=1); while (!isprime(n*k^2 - 1), k++); k); \\ Michel Marcus, Aug 20 2019
CROSSREFS
Sequence in context: A358525 A209332 A020945 * A231735 A016429 A131852
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Nov 12 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 September 14 12:31 EDT 2024. Contains 375921 sequences. (Running on oeis4.)