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!)
A224490 Smallest k such that k*2*p(n)^2-1=q is prime and k*2*q^2-1 is also prime. 9
1, 1, 25, 9, 21, 3, 1, 16, 25, 136, 10, 33, 90, 250, 10, 55, 1, 9, 36, 75, 1, 4, 33, 406, 103, 15, 121, 4, 244, 78, 28, 19, 49, 105, 45, 34, 10, 46, 33, 4, 111, 15, 9, 36, 118, 66, 10, 13, 31, 76, 66, 36, 55, 15, 4, 48, 6, 66, 13, 34, 54, 64, 153, 1, 60, 48 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
EXAMPLE
1*2*2^2-1=7 prime q 1*2*7^2-1=97 also prime so a(1)=1.
MATHEMATICA
a[n_] := For[k = 1, True, k++, p = Prime[n]; If[PrimeQ[q = k*2*p^2 - 1] && PrimeQ[k*2*q^2 - 1], Return[k]]]; Table[a[n], {n, 1, 66}] (* Jean-François Alcover, Apr 12 2013 *)
PROG
SCRIPT
DIM k
DIM i, 0
DIM q
DIMS t
OPENFILEOUT myf, a(n).txt
LABEL a
SET i, i+1
IF i>20000 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 GOTO c
GOTO b
LABEL c
SET q, k*2*q^2-1
PRP q, t
IF ISPRP THEN WRITE myf, t
IF ISPRP THEN GOTO a
GOTO b
CROSSREFS
Sequence in context: A065910 A096521 A215539 * A226224 A181763 A171638
KEYWORD
nonn
AUTHOR
Pierre CAMI, Apr 08 2013
EXTENSIONS
Typo in name fixed by Zak Seidov, Apr 11 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 April 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)