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.

A379985 Numbers k such that k^2 is of the form b^2 + (4*c)^2 where b*c is squarefree.

Original entry on oeis.org

5, 13, 17, 25, 29, 37, 61, 65, 85, 109, 137, 145, 149, 157, 169, 173, 193, 197, 205, 221, 229, 241, 265, 269, 293, 305, 325, 365, 377, 401, 409, 421, 433, 445, 485, 505, 533, 541, 557, 565, 569, 629, 673, 685, 689, 701, 709, 725, 761, 773, 797
Offset: 1

Views

Author

Lei Zhou, Jan 07 2025

Keywords

Comments

It is known that the sum of squares of two odd numbers cannot be a square number, and when the sum of square of two numbers is the square of an odd number, the even one among the two numbers has to be multiple of 4. Thus the Mathematica program will not miss any entries.
a(n) == 1 (mod 4).
Numbers 4x^2 + y^2 where x, y are coprime numbers such that y is odd and x, y, 2x+y, 2x-y are squarefree. - Yifan Xie, Jan 09 2025, corrected by Robert Israel, Feb 03 2025

Examples

			5 is a term since 5^2 = 3^2 + (4*1)^2 and 3*1 is squarefree.
149 is a term since 149^2 = 51^2 + (4*35)^2 and 51*35 = 3*5*7*17 is squarefree.
		

Crossrefs

Subsequence of A009003.

Programs

  • Maple
    N:= 1000: # for terms <= N
    Res:= {}:
    for x from 1 while 4*x^2 < N do
      if not numtheory:-issqrfree(x) then next fi;
      for y from 1 by 2  while 4*x^2 + y^2 <= N do
        if igcd(x,y) = 1 and andmap(numtheory:-issqrfree,[y,2*x+y,2*x-y]) then Res:= Res union  {4*x^2 + y^2} fi
    od od:
    sort(convert(Res,list)); # Robert Israel, Feb 03 2025
  • Mathematica
    a = {}; Do[m = n^2; b = n; While[b = b - 2; b > 1, k = m - b^2; If[c = Sqrt[k]/4; IntegerQ[c] && SquareFreeQ[b*c], AppendTo[a, n]]], {n, 5, 800, 2}]; a

Extensions

Edited by Robert Israel, Feb 03 2025