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.

A174922 Lesser of twin primes p1 such that p1+(p2^2-p1^2) and p2+(p2^2-p1^2) are prime numbers.

Original entry on oeis.org

5, 11, 29, 461, 599, 659, 809, 1019, 1289, 2027, 2141, 2309, 2339, 2801, 3329, 3557, 3581, 4127, 4421, 4547, 5879, 6761, 10091, 10457, 10709, 13829, 15329, 18911, 20231, 21839, 23561, 23909, 26249, 26879, 27581, 27689, 27917, 28109, 30491
Offset: 1

Views

Author

Keywords

Comments

5+(7^2-5^2)=5+24=29; 7+(7^2-5^2)=7+24=31,..

Crossrefs

Programs

  • Mathematica
    lst={};Do[p1=Prime[n];p2=p1+2;If[PrimeQ[p2]&&PrimeQ[p1+(p2^2-p1^2)]&&PrimeQ[p2+(p2^2-p1^2)],AppendTo[lst,p1]],{n,8!}];lst
    prQ[{a_,b_}]:=Module[{c=b^2-a^2},AllTrue[{a+c,b+c},PrimeQ]]; Transpose[ Select[ Select[ Partition[Prime[Range[5000]],2,1],#[[2]]-#[[1]] == 2&], prQ]][[1]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Aug 12 2015 *)