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.

A216270 Numbers n such that n+(n+1), n^2+(n+1)^2, n+(n+1)^2, n^2+(n+1) are all prime.

Original entry on oeis.org

1, 2, 5, 14, 69, 99, 495, 1364, 1365, 2010, 2735, 3099, 3914, 4359, 4389, 5984, 6669, 8435, 9164, 10794, 12075, 15224, 15315, 16014, 16470, 17900, 20214, 20769, 21204, 23450, 24240, 26430, 26690, 27300, 29099, 35189, 38415, 38745, 42944, 47054, 48789, 50295
Offset: 1

Views

Author

César Aguilera, Mar 15 2013

Keywords

Examples

			n=14:                               29│     │421
n+(n+1)=14+(14+1)=29                   14---196
n^2+(n+1)^2=196+225=421                │  X  │
n+(n+1)^2=14+225=239                   15---225        *15+225+1=241
n^2+(n+1)=196+15=211               211/        \239
.
n=5:                                  11│   │61
n+(n+1)=5+(5+1)=11                      5---25
n^2+(n+1)^2=25+36=61                    │ X │
n+(n+1)^2=5+36=41                       6---36          *6+36+1=43
n^2+(n+1)=25+6=31                    31/      \41
.
n=495:                             991│     │491041
n+(n+1)=495+496=991                   495---245025
n^2+(n+1)^2=491041                    │  X  │
n+(n+1)^2=246511                      496---246016
n^2+(n+1)=245521               245521/       \246511
.
They form the group:
o 1 2 3 (i)
1 0 3 2
2 3 1 0
3 2 0 1
.
For example, for n=99:
99   9801       0 1 2 3 (i)
100  10000
9801  99        1 0 3 2
10000 100
10000 100
99    9801      2 3 1 0
100  10000      3 2 0 1
9801 99
The sum of each column and the sum of each diagonal is a prime number.
		

References

  • Joong Fang, Abstract Algebra, Schaum, 1963, Page 76.

Programs

  • Mathematica
    Select[Range[51000],AllTrue[{#+(#+1),#^2+(#+1)^2,#+(#+1)^2, #^2+#+1}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 21 2017 *)
  • PARI
    is(n) = { isprime(n+(n+1)) & isprime(n^2+(n+1)^2) & isprime(n+(n+1)^2) & isprime(n^2+(n+1)); }
    for(n=1,10^6, if (is(n), print1(n,", ")));
    /* Joerg Arndt, Mar 26 2013 */