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-2 of 2 results.

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

A176796 Numbers k such that A129307(k) + A129307(k+1) is a square.

Original entry on oeis.org

1, 3, 12, 14, 17, 25, 30, 35, 39, 69, 71, 74, 80, 83, 88, 102, 107, 122, 126, 129, 134, 151, 170, 172, 176, 184, 187, 202, 220, 239, 244, 249, 258, 261, 263, 272, 280, 283, 289, 298, 308, 321, 363, 371, 377, 386, 390, 403, 421, 432, 438, 447, 451, 453, 477, 480
Offset: 1

Views

Author

Giovanni Teofilatto, Apr 26 2010

Keywords

Comments

Squares are in A075577.

Crossrefs

Programs

  • Maple
    A027861 := proc(n) option remember; local a; if n= 1 then 1; else for a from procname(n-1)+1 do if isprime(a^2+(a+1)^2) then return a; end if; end do: end if; end proc:
    A129307 := proc(n) A000217(A027861(n)) ; end proc:
    A176796 := proc(n) option remember; if n = 1 then 1; else for a from procname(n-1)+1 do if issqr(A129307(a)+A129307(a+1)) then return a; end if; end do: end if; end proc:
    seq(A176796(n),n=1..80) ; # R. J. Mathar, Jun 28 2010

Extensions

Extended beyond a(5) by R. J. Mathar, Jun 28 2010
Showing 1-2 of 2 results.