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-10 of 40 results. Next

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

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.

A012132 Numbers z such that x*(x+1) + y*(y+1) = z*(z+1) is solvable in positive integers x,y.

Original entry on oeis.org

3, 6, 8, 10, 11, 13, 15, 16, 18, 20, 21, 23, 26, 27, 28, 31, 33, 36, 37, 38, 40, 41, 43, 44, 45, 46, 48, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 66, 67, 68, 71, 73, 74, 75, 76, 77, 78, 80, 81, 83, 86, 88, 89, 91, 92, 93
Offset: 1

Views

Author

Sander van Rijnswou (sander(AT)win.tue.nl)

Keywords

Comments

Theorem (Sierpinski, 1963): n is a term iff n^2+(n+1)^2 is a composite number. - N. J. A. Sloane, Feb 29 2020
For n > 1, A047219 is a subset of this sequence. This is because n^2 + (n+1)^2 is divisible by 5 if n is (1 or 3) mod 5 (also see A027861). - Dmitry Kamenetsky, Sep 02 2008
From Hermann Stamm-Wilbrandt, Sep 10 2014: (Start)
For n > 0, A212160 is a subset of this sequence (n^2 + (n+1)^2 is divisible by 13 if n == (2 or 10) (mod 13)).
For n >= 0, A212161 is a subset of this sequence (n^2 + (n+1)^2 is divisible by 17 if n == (6 or 10) (mod 17)).
The above are for divisibility by 5, 13, 17; notation (1,3,5), (2,10,13), (6,10,17). Divisibility by p for a and p-a-1; notation (a,p-a-1,p). These are the next tuples: (8,20,29), (15,21,37), (4,36,41), (11,41,53), ... . The corresponding sequences are a subset of this sequence (8,20,37,49,66,78,... for (8,20,29)). These sequences have no entries in the OEIS yet. For any prime of the form 4*k+1 there is exactly one of these tuples/sequences.
For n > 1, A000217 (triangular numbers) is a subset of this sequence (3,6,10,15,...); z=A000217(n), y=z-1, x=n.
For n > 0, A001652 is a subset of this sequence; z=A001652(n), x=y=A053141(n).
For n > 1, A001108(=A115598) is a subset of this sequence; z=A001108(n), x=A076708(n), y=x+1.
For n > 0, A124124(2*n+1)(=A098790(2*n)) is a subset of this sequence (6,37,218,...); z=A124124(2*n+1), x=a(n)-1, y=a(n)+1, a(m) = 6*a(m-1) - a(m-2) + 2, a(0)=0, a(1)=4.
(End)

References

  • Aviezri S. Fraenkel, Diophantine equations involving generalized triangular and tetrahedral numbers, pp. 99-114 of A. O. L. Atkin and B. J. Birch, editors, Computers in Number Theory. Academic Press, NY, 1971.

Crossrefs

Complement of A027861. - Michael Somos, Jun 08 2000

Programs

Extensions

More terms and references from Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Feb 09 2000

A089489 Smallest k greater than n such that (k^2-n^2, 2*k*n, k^2+n^2) is a primitive Pythagorean triple and the corresponding right triangle has a prime hypotenuse.

Original entry on oeis.org

2, 3, 8, 5, 6, 11, 8, 13, 10, 13, 14, 13, 20, 15, 22, 19, 18, 23, 20, 23, 26, 23, 30, 25, 26, 31, 32, 33, 30, 31, 44, 33, 40, 35, 36, 49, 40, 45, 40, 43, 44, 43, 48, 49, 52, 49, 48, 53, 74, 51, 56, 57, 58, 59, 58, 61, 68, 63, 64, 61, 64, 65, 80, 71, 66, 71, 80, 95, 70, 71, 84
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 04 2003

Keywords

Comments

a(n)^2 + n^2 = A068487(n).
From Robert Israel, Dec 11 2024: (Start)
a(n) is the least k > n such that k^2 + n^2 is prime.
a(n) = n + 1 for n in A027861. (End)

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
      for k from n+1 by 2 do
        if isprime(k^2 + n^2) then return k fi
      od
    end proc:
    map(f, [$1..100]); # Robert Israel, Dec 11 2024

A215431 Numbers n such that n^128+(n+1)^128 is a prime.

Original entry on oeis.org

31, 37, 65, 191, 255, 287, 359, 786, 836, 1178, 1229, 1503, 1601, 1609, 2093, 2103, 2254, 2307, 2471, 2934, 2978, 3215, 3220, 3363, 3402, 3705, 3724, 3892, 3894, 3976, 4094, 4478, 4490, 4535, 4566, 4683, 4749, 4752, 4789, 4918, 5064, 6061, 6162, 6167
Offset: 1

Views

Author

Vincenzo Librandi, Aug 31 2012

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[7000], PrimeQ[#^128 + (# + 1)^128] &]

A129307 Intersection of A000217 and A005098.

Original entry on oeis.org

1, 3, 10, 15, 28, 45, 78, 105, 153, 190, 253, 300, 325, 435, 465, 528, 595, 630, 780, 903, 1128, 1275, 1830, 2145, 2415, 2485, 2628, 3160, 3403, 3570, 3655, 3828, 4095, 4753, 4950, 5050, 5253, 5460, 5995, 6105, 6670, 7503, 8515, 9180, 9453, 9730, 10440, 11175
Offset: 1

Views

Author

Zak Seidov, May 26 2007

Keywords

Comments

Triangular numbers T(m)=m(m+1)/2 indices m of which are in A027861. T(m) such that m^2+(m+1)^2 is prime.

Crossrefs

Programs

  • Maple
    select(x-> isprime(4*x+1), [i*(i+1)/2$i=0..400])[];  # Alois P. Heinz, Feb 24 2024
  • Mathematica
    Select[Table[n(n+1)/2, {n, 0, 200}], PrimeQ[4#+1]&] (* Jean-François Alcover, Feb 24 2024 *)

Formula

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

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

A215432 Numbers n such that n^256+(n+1)^256 is a prime.

Original entry on oeis.org

85, 86, 157, 190, 195, 421, 504, 539, 621, 895, 1018, 1159, 1314, 1463, 1482, 1538, 1959, 2036, 2368, 2537, 2618, 2651, 3085, 3148, 3205, 3230, 3347, 3370, 3807, 4061, 4089, 4448, 4641, 4697, 4723, 4851, 4945
Offset: 1

Views

Author

Vincenzo Librandi, Aug 31 2012

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[5000], PrimeQ[#^256 + (# + 1)^256] &];

A091277 Numbers k such that the k-th prime is of the form m^2 + (m+1)^2.

Original entry on oeis.org

3, 6, 13, 18, 30, 42, 65, 82, 112, 135, 170, 197, 212, 271, 284, 319, 353, 369, 445, 505, 612, 682, 933, 1069, 1193, 1226, 1286, 1510, 1609, 1676, 1711, 1789, 1900, 2161, 2241, 2285, 2363, 2450, 2667, 2712, 2924, 3247, 3644, 3894, 4000, 4100, 4367, 4647, 4922
Offset: 1

Views

Author

Ray Chandler, Jan 03 2004

Keywords

Comments

Also, the k-th prime is of the form (m^2+1)/2.

Crossrefs

Programs

  • Mathematica
    Select[Range[5000],OddQ[Sqrt[2Prime[#]-1]]&] (* Harvey P. Dale, Jun 25 2018 *)

Formula

a(n)=k such that A000040(k)=A027862(n).

Extensions

Offset changed to 1 by Jinyuan Wang, Aug 02 2021

A109306 Numbers k such that k^2 + (k-1)^2 and k^2 + (k+1)^2 are both primes.

Original entry on oeis.org

2, 5, 25, 30, 35, 70, 85, 100, 110, 225, 230, 260, 285, 290, 320, 390, 410, 475, 490, 495, 515, 590, 680, 695, 710, 750, 760, 845, 950, 1080, 1100, 1135, 1175, 1190, 1195, 1270, 1295, 1305, 1330, 1365, 1410, 1475, 1715, 1750, 1785, 1845, 1855, 1925, 2015, 2060
Offset: 1

Views

Author

Zak Seidov, Jun 25 2005

Keywords

Comments

All terms, except for the first one, are multiples of 5. All corresponding primes, except the first, end in 1. Cf. A027861, where in pairs of successive numbers the larger one is a multiple of 5 and is a term in this sequence.

Examples

			25 is a term because 25^2 + 24^2 = 1201 and 25^2 + 26^2 = 1301 are both primes.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2, 10000], PrimeQ[ #^2+(#+1)^2]&&PrimeQ[ #^2+(#-1)^2]&]
  • PARI
    for(k=1,2060,my(j=2*k^2+1);if(isprime(j-2*k)&&isprime(j+2*k),print1(k,", "))) \\ Hugo Pfoertner, Dec 07 2019
    
  • Python
    from sympy import isprime
    def aupto(limit):
      alst, is2 = [], False
      for k in range(1, limit+1):
        is1, is2 = is2, isprime(k**2 + (k+1)**2)
        if is1 and is2: alst.append(k)
      return alst
    print(aupto(2060)) # Michael S. Branicky, Apr 25 2021

Formula

a(n)^2 = A075577(n). - David A. Corneth, Apr 25 2021

Extensions

Definition corrected by Walter Kehowski, Jul 04 2005
Showing 1-10 of 40 results. Next