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.
%I A228968 #29 Sep 22 2024 17:58:29 %S A228968 3,5,41,59,101,2729,3251,9719,11549,12251,19211,28619,41201,47711, %T A228968 49391,55439,58229,61979,63029,63311,79631,81371,85331,103391,122039, %U A228968 135719,153509,157349,164249,167441,178601,188861,197711,208001,209819,216779,219311,226451 %N A228968 Prime p such that p and p+2 are twin primes and p^2+p-1 p^2+p+1 are also twin primes. %C A228968 Subsequence of A088483. %H A228968 Pierre CAMI, <a href="/A228968/b228968.txt">Table of n, a(n) for n = 1..10000</a> %e A228968 3 and 5 twin primes as 3*3+3-1=11 and 13, a(2)=3. %e A228968 5 and 7 twin primes as 5*5+5-1=29 and 31, a(3)=5. %t A228968 Select[Transpose[Select[Partition[Prime[Range[21000]],2,1],#[[2]]-#[[1]] == 2&]][[1]],AllTrue[ #^2+#+{1,-1},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Nov 10 2014 *) %o A228968 PFGW & SCRIPTIFY %o A228968 SCRIPT %o A228968 DIM n,0 %o A228968 DIM m %o A228968 DIM k,0 %o A228968 DIMS ta %o A228968 OPENFILEOUT myf,a(n).txt %o A228968 OPENFILEIN maf,twin.txt %o A228968 LABEL loop1 %o A228968 SET n,n+1 %o A228968 IF n>2999999 THEN END %o A228968 GETNEXT m,maf %o A228968 SETS ta,%d\,;n %o A228968 PRP m^2+m-1,ta %o A228968 IF ISPRP THEN GOTO a %o A228968 GOTO loop1 %o A228968 LABEL a %o A228968 PRP m^2+m+1,ta %o A228968 IF ISPRP THEN GOTO b %o A228968 GOTO loop1 %o A228968 LABEL b %o A228968 WRITE myf,m %o A228968 GOTO loop1 %o A228968 The file twin.txt has the first 3000000 of first of twin primes %o A228968 (PFGW) ABC2 $a & $a+2 & $a^2+$a-1 & $a^2+$a+1 %o A228968 a: 1 to 3000000 %o A228968 _Charles R Greathouse IV_, Sep 10 2013 %o A228968 (PARI) is(n)=isprime(n)&&isprime(n+2)&&isprime(n^2+n-1)&&isprime(n^2+n+1) \\ _Charles R Greathouse IV_, Sep 10 2013 %o A228968 (Sage) %o A228968 [x for x in primes_first_n(900) if x+2 in Primes() and x^2+x-1 in Primes() and x^2+x+1 in Primes()] #_Tom Edgar_, Sep 10 2013 %Y A228968 Cf. A088483. %K A228968 nonn %O A228968 1,1 %A A228968 _Pierre CAMI_, Sep 10 2013