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!)
A247479 Smallest odd k > 1 such that k*2^n+1 is a prime number. 4
3, 3, 5, 7, 3, 3, 5, 3, 15, 13, 9, 3, 5, 7, 5, 21, 9, 3, 11, 7, 11, 25, 45, 45, 5, 7, 15, 13, 23, 3, 35, 43, 9, 75, 59, 3, 15, 15, 5, 27, 3, 9, 9, 15, 35, 19, 27, 15, 23, 7, 17, 7, 51, 49, 5, 27, 29, 99, 27, 31, 53, 105, 9, 25, 9, 3, 9, 31, 23 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Differs from A057778 only where n is related to a Fermat prime (A019434). - R. J. Mathar, Dec 02 2014
Records: 3, 5, 7, 15, 21, 25, 45, 75, 99, 105, 127, 249, 321, 363, 411, 421, 535, 823, 1383, 1875, 2375, 2443, 2865, 4063, 4141, 4239, 4623, 5175, 5469, 14319, 15979, 17817, 25925, 30487, 39741, 48055, 49709, 50721, 55367, ... . - Robert G. Wilson v, Feb 02 2015
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..10111 (first 5150 terms from Pierre CAMI)
MAPLE
A247479:= proc(n) local k;
for k from 3 by 2 do if isprime(k*2^n+1) then return k fi od
end proc:
seq(A247479(n), n=1..100); # Robert Israel, Dec 01 2014
MATHEMATICA
f[n_] := Block[{k = 3, p = 2^n}, While[ !PrimeQ[k*p + 1], k += 2]; k]; Array[f, 70] (* Robert G. Wilson v, Jan 29 2015 *)
PROG
(PFGW & SCRIPT)
SCRIPT
DIM k
DIM n, 0
DIMS t
OPENFILEOUT myf, a(n).txt
LABEL loop1
SET n, n+1
SET k, 1
LABEL loop2
SET k, k+2
SETS t, %d, %d\,; n; k
PRP k*2^n+1, t
IF ISPRP THEN WRITE myf, t
IF ISPRP THEN GOTO loop1
GOTO loop2
(PARI) a(n) = {k = 3; while (! isprime(k*2^n+1), k += 2); k; } \\ Michel Marcus, Dec 01 2014
CROSSREFS
Sequence in context: A089874 A092035 A164914 * A134855 A335045 A110246
KEYWORD
nonn
AUTHOR
Pierre CAMI, Dec 01 2014
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 6 17:04 EDT 2024. Contains 375715 sequences. (Running on oeis4.)