login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A224493 Smallest k such that k*2*p(n)^2+1 is prime. 3
2, 1, 2, 2, 3, 2, 6, 15, 12, 6, 8, 2, 5, 6, 2, 14, 3, 23, 2, 5, 2, 3, 5, 3, 6, 11, 2, 9, 3, 5, 6, 3, 14, 8, 5, 6, 2, 2, 5, 9, 8, 11, 3, 2, 11, 3, 6, 5, 6, 5, 2, 5, 3, 8, 15, 14, 3, 5, 20, 5, 6, 14, 14, 8, 5, 2, 8, 2, 6, 18, 14, 3, 6, 9, 5, 12, 3, 9, 15, 18, 6, 6, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Pierre CAMI, Table of n, a(n) for n = 1..10000

MATHEMATICA

a[n_] := For[k = 1, True, k++, p = Prime[n]; If[PrimeQ[k*2*p^2 + 1], Return[k]]]; Table[ a[n] , {n, 1, 83}] (* Jean-Fran├žois Alcover, Apr 12 2013 *)

sk[n_]:=Module[{k=1}, While[!PrimeQ[2*k*n^2+1], k++]; k]; Table[sk[n], {n, Prime[ Range[ 90]]}] (* Harvey P. Dale, Sep 22 2019 *)

PROG

(PFGW & SCRIPTIFY)

SCRIPT

DIM k

DIM i, 0

DIM q

DIMS t

OPENFILEOUT myf, a(n).txt

LABEL a

SET i, i+1

IF i>10000 THEN END

SET k, 0

LABEL b

SET k, k+1

SETS t, %d, %d, %d\,; k; i; p(i)

SET q, k*2*p(i)^2+1

PRP q, t

IF ISPRP THEN WRITE myf, t

IF ISPRP THEN GOTO a

GOTO b

CROSSREFS

Cf. A224489, A224490, A224491, A224492, A224494, A224495, A224496.

Sequence in context: A029169 A202090 A241760 * A129193 A262446 A205147

Adjacent sequences:  A224490 A224491 A224492 * A224494 A224495 A224496

KEYWORD

nonn

AUTHOR

Pierre CAMI, Apr 08 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 4 07:32 EDT 2020. Contains 333213 sequences. (Running on oeis4.)