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.

Showing 1-4 of 4 results.

A027862 Primes of the form j^2 + (j+1)^2.

Original entry on oeis.org

5, 13, 41, 61, 113, 181, 313, 421, 613, 761, 1013, 1201, 1301, 1741, 1861, 2113, 2381, 2521, 3121, 3613, 4513, 5101, 7321, 8581, 9661, 9941, 10513, 12641, 13613, 14281, 14621, 15313, 16381, 19013, 19801, 20201, 21013, 21841, 23981, 24421, 26681
Offset: 1

Views

Author

Keywords

Comments

Also, primes of the form 4*k+1 which are the hypotenuse of one and only one right triangle with integral legs. - Cino Hilliard, Mar 16 2003
Centered square primes (i.e., prime terms of centered squares A001844). - Lekraj Beedassy, Jan 21 2005
Primes of the form 2*k*(k-1)+1. - Juri-Stepan Gerasimov, Apr 27 2010
Equivalently, primes of the form (m^2+1)/2 (take m=2*j+1). These primes a(n) have nontrivial solutions of x^2 == 1 (Modd a(n)) given by x=x(n)=A002731(n). For Modd n see a comment on A203571. See also A206549 for such solutions for primes of the form 4*k+1, given in A002144.
E.g., a(3)=41, A002731(3)=9, 9^2=81, floor(81/41)=1 (odd),
-81 = -2*41 + 1 == 1 (mod 2*41), hence 9^2 == 1 (Modd 41). - Wolfdieter Lang, Feb 24 2012
Also primes of the form 4*k+1 that are the smallest side length of one and only one integer Soddyian triangle (see A230812). - Frank M Jackson, Mar 13 2014
Also, primes of the form (m^2+1)/2. - Zak Seidov, May 01 2014
Note that ((2n+1)^2 + 1)/2 = n^2 + (n+1)^2. - Thomas Ordowski, May 25 2015
Primes p such that 2p-1 is a square. - Thomas Ordowski, Aug 27 2016
Primes in the main diagonal of A000027 when represented as an array read by antidiagonals. - Clark Kimberling, Mar 12 2023
The diophantine equation x^2 + ... + (x + r)^2 = p may be rewritten to A*x^2 + B*x + C = p, where A = (r + 1), B = r*(r + 1), C = r*(r + 1)*(2*r + 1)/6. If gcd(A, B, C) > 1 no solution for a prime p exists. The gcd(A, B, C) = 1 holds only for r = 1, 2, 5 (gcd is the greatest common divisor). For r = 1 we have x^2 + (x + 1)^2 = p, thus for x from A027861 we calculate primes p from A027862. For r = 2 we have x^2 + (x + 1)^2 + (x + 2)^2 = p, thus for x from A027863 we calculate primes p from A027864. For r = 5 we have x^2 + ... + (x + 5)^2 = p, thus for x from A027866 we calculate primes p from A027867. - Ctibor O. Zizka, Oct 04 2023

Examples

			13 is in the sequence because it is prime and 13 = 2^2 + 3^2. - _Michael B. Porter_, Aug 27 2016
		

References

  • D. M. Burton, Elementary Number Theory, Allyn and Bacon Inc. Boston, MA, 1976, p. 271.
  • Morris Kline, Mathematical Thought from Ancient to Modern Times, 1972. pp. 275.

Crossrefs

Primes p such that A079887(p) = 1.
Cf. A002731 (m values), A027861 (j values), A091277 (prime indices).
Subsequence of A002144 (p=4k+1).
Cf. A001844 (centered squares), A027863, A027864, A027866, A027867, A203571, A206549, A230812.

Programs

  • Magma
    [ a: n in [0..150] | IsPrime(a) where a is n^2+(n+1)^2 ]; // Vincenzo Librandi, Dec 18 2010
  • Mathematica
    Select[Table[n^2+(n+1)^2,{n,200}],PrimeQ] (* Harvey P. Dale, Aug 22 2012 *)
    Select[Total/@Partition[Range[200]^2,2,1],PrimeQ] (* Harvey P. Dale, Apr 20 2016 *)
  • PARI
    je=[]; for(n=1,500, if(isprime(n^2+(n+1)^2),je=concat(je,n^2+(n+1)^2))); je
    
  • PARI
    fermat(n) = { for(x=1,n, y=2*x*(x+1)+1; if(isprime(y),print1(y" ")) ) }
    

Formula

a(n) = ((A002731(n)^2 - 1)/2) + 1. - Torlach Rush, Mar 14 2014
a(n) = (A002731(n)^2 + 1)/2. - Zak Seidov, May 01 2014

Extensions

More terms from Cino Hilliard, Mar 16 2003

A027861 Numbers k such that k^2 + (k+1)^2 is prime.

Original entry on oeis.org

1, 2, 4, 5, 7, 9, 12, 14, 17, 19, 22, 24, 25, 29, 30, 32, 34, 35, 39, 42, 47, 50, 60, 65, 69, 70, 72, 79, 82, 84, 85, 87, 90, 97, 99, 100, 102, 104, 109, 110, 115, 122, 130, 135, 137, 139, 144, 149, 154, 157, 160, 162, 164, 167, 172, 174, 185, 187, 189, 195, 199, 202
Offset: 1

Views

Author

Keywords

Comments

k > 1 never ends in 1, 3, 6 or 8 (that is, k*(k+1) does not end in 2). - Lekraj Beedassy, Jul 09 2004
k > 1 can never be congruent to (1 or 3) mod 5, because if it were, then k^2 + (k+1)^2 would be divisible by 5. In other words, for k > 1, this sequence cannot contain any values in A047219. This means that we can immediately discard 40% of all possible k. - Dmitry Kamenetsky, Sep 02 2008

Crossrefs

Complement of A012132.
Cf. A002731 (2k+1 values), A027862 (resulting primes), A091277 (indices of resulting primes).
Cf. A047219 (k mod 5 = 1 or 3), A001844 (centered squares), A010051.

Programs

  • Haskell
    a027861 n = a027861_list !! (n-1)
    a027861_list = filter ((== 1) . a010051 . a001844) [0..]
    -- Reinhard Zumkeller, Jul 13 2014
    
  • Magma
    [n: n in [0..1000] |IsPrime(n^2 + (n+1)^2)]; // Vincenzo Librandi, Nov 19 2010
    
  • Mathematica
    Select[Range[250],PrimeQ[#^2+(#+1)^2]&] (* Harvey P. Dale, Dec 31 2017 *)
  • PARI
    is(n)=isprime(n^2 + (n+1)^2) \\ Charles R Greathouse IV, Apr 28 2015

Formula

a(n) = (A002731(n)-1)/2.
a(n) = (sqrt(2*A027862(n)-1)-1)/2. - Zak Seidov, Jul 22 2013
A010051(A001844(a(n))) = 1. - Reinhard Zumkeller, Jul 13 2014
a(n) = floor(sqrt(A027862(n)/2)). - Rémi Guillaume, Apr 02 2025

A002731 Numbers k such that (k^2 + 1)/2 is prime.

Original entry on oeis.org

3, 5, 9, 11, 15, 19, 25, 29, 35, 39, 45, 49, 51, 59, 61, 65, 69, 71, 79, 85, 95, 101, 121, 131, 139, 141, 145, 159, 165, 169, 171, 175, 181, 195, 199, 201, 205, 209, 219, 221, 231, 245, 261, 271, 275, 279, 289, 299, 309, 315, 321, 325, 329, 335, 345, 349, 371, 375, 379, 391, 399, 405
Offset: 1

Views

Author

Keywords

Comments

From Wolfdieter Lang, Feb 24 2012: (Start)
a(n) = sqrt(8*A129307(n)+1) = sqrt(2*A027862(n)-1), n >= 1.
a(n) is the nontrivial solution of the congruence a(n)^2 == 1 (Modd A027862(n)). The trivial one is +1. For Modd n see a comment on A203571. E.g., a(3)^2 = 81 == 1 (Modd 41), see a comment on A027862.
(End)

References

  • L. Euler, De numeris primis valde magnis (E283), reprinted in: Opera Omnia. Teubner, Leipzig, 1911, Series (1), Vol. 3, p. 24.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A027861. A027862 gives primes, A091277 gives prime indices.

Programs

  • Haskell
    a002731 n = a002731_list !! (n-1)
    a002731_list = filter ((== 1) . a010051 . a000982) [1, 3 ..]
    -- Reinhard Zumkeller, Jul 13 2014
  • Magma
    [n: n in [3..410] | IsPrime((n^2+1) div 2) ]; // Vincenzo Librandi, Sep 25 2012
    
  • Mathematica
    Select[Range[400], PrimeQ[(#^2 + 1)/2] &] (* Alonso del Arte, Feb 24 2012 *)
  • PARI
    forstep(n=1,10^3,2, if(isprime((n^2+1)/2),print1(n,", ")));
    /* Joerg Arndt, Sep 02 2012 */
    

Formula

a(n) = 2*A027861(n) + 1.

A116945 Numbers in both A002731(n) and A002731(A002731(n)).

Original entry on oeis.org

3, 11, 19, 59, 69, 221, 271, 349, 371, 391, 441, 451, 521, 529, 649, 779, 869, 921, 929, 951, 1001, 1031, 1051, 1171, 1359, 1391, 1421, 1689, 1701, 2199, 2321, 2349, 2381, 2671, 2711, 2719, 2821, 2901, 3001, 3241, 3341, 3399, 3441, 3499, 3691, 4299
Offset: 1

Views

Author

Jonathan Vos Post, Mar 25 2006

Keywords

Comments

Subset of A002731. A002731(n) = 2*A027861(n-1)+1. A027862 gives primes, A091277 gives prime index.

Examples

			a(1) = 3 because (3^2 + 1)/2 = 5 is prime and (5^2 + 1)/2 = 13 is prime.
a(2) = 11 because (11^2 + 1)/2 = 61 is prime and (61^2 + 1)/2 = 1861 is prime.
a(3) = 19 because (19^2 + 1)/2 = 181 is prime and (181^2 + 1)/2 = 16381 is prime.
a(4) = 59 because (59^2 + 1)/2 = 1741 is prime and (1741^2 + 1)/2 = 1515541 is prime.
a(5) = 69 because (69^2 + 1)/2 = 2381 is prime and (2381^2 + 1)/2 = 2834581 is prime. Further, (2834581^2+1)/2 = 4017424722781 is prime, which suggests another sequences one level of recursion deeper.
a(6) = 221 because (221^2 + 1)/2 = 24421 is prime and (24421^2 + 1)/2 = 298192621 is prime.
		

References

  • L. Euler, De numeris primis valde magnis (E283), reprinted in: Opera Omnia. Teubner, Leipzig, 1911, Series (1), Vol. 3, p. 24.

Crossrefs

Formula

n such that (n^2 + 1)/2 is prime and (((n^2 + 1)/2)^2 + 1)/2 is prime.

Extensions

More terms from Zak Seidov, Apr 03 2011
Showing 1-4 of 4 results.