cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A224491 Smallest k such that k*2*p(n)^2-1=q is prime k*2*q^2-1=r k*2*r^2-1=s, r and s are also prime.

This page as a plain text file.
%I A224491 #20 Apr 12 2013 08:26:29
%S A224491 705,1,306,390,2539,526,1939,439,7048,286,561,985,90,2385,2089,328,
%T A224491 2266,664,4245,2451,453,391,411,406,4068,4975,8151,199,834,4423,169,
%U A224491 76,5710,861,3930,1659,1246,2838,750,153,8664,3730,1195,7815,1746,1735,594,985
%N A224491 Smallest k such that k*2*p(n)^2-1=q is prime k*2*q^2-1=r k*2*r^2-1=s, r and s are also prime.
%H A224491 Pierre CAMI, <a href="/A224491/b224491.txt">Table of n, a(n) for n = 1..5600</a>
%t A224491 a[n_] := For[k = 1, True, k++, p = Prime[n]; If[PrimeQ[q = k*2*p^2 - 1] && PrimeQ[r = k*2*q^2 - 1] && PrimeQ[k*2*r^2 - 1], Return[k]]]; Table[a[n], {n, 1, 48}] (* _Jean-François Alcover_, Apr 12 2013 *)
%o A224491 (PFGW & SCRIPTIFY)
%o A224491 SCRIPT
%o A224491 DIM k
%o A224491 DIM i,0
%o A224491 DIM q
%o A224491 DIMS t
%o A224491 OPENFILEOUT myf,a(n).txt
%o A224491 LABEL a
%o A224491 SET i,i+1
%o A224491 IF i>5600 THEN END
%o A224491 SET k,0
%o A224491 LABEL b
%o A224491 SET k,k+1
%o A224491 SETS t,%d,%d,%d\,;k;i;p(i)
%o A224491 SET q,k*2*p(i)^2-1
%o A224491 PRP q,t
%o A224491 IF ISPRP THEN GOTO c
%o A224491 GOTO b
%o A224491 LABEL c
%o A224491 SET q,k*2*q^2-1
%o A224491 PRP q,t
%o A224491 IF ISPRP THEN GOTO d
%o A224491 GOTO b
%o A224491 LABEL d
%o A224491 SET q,k*2*q^2-1
%o A224491 PRP q,t
%o A224491 IF ISPRP THEN WRITE myf,t
%o A224491 IF ISPRP THEN GOTO e
%o A224491 GOTO b
%Y A224491 Cf. A224489, A224490, A224492.
%K A224491 nonn
%O A224491 1,1
%A A224491 _Pierre CAMI_, Apr 08 2013
%E A224491 Typo in name fixed by _Zak Seidov_, Apr 11 2013