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.

A273341 Numbers n such that n^2+k-1 is the sum of two nonzero squares in exactly k ways for all k = 1, 2, 3.

Original entry on oeis.org

3444, 25456, 35860, 55544, 78936, 79740, 93660, 102612, 110676, 116788, 122512, 131808, 145680, 182624, 184936, 194184, 235848, 263988, 267060, 270480, 273740, 277416, 284352, 294756, 305160, 308676, 343356, 353760, 360696, 384924, 410404, 416136, 465844
Offset: 1

Views

Author

Altug Alkan, May 20 2016

Keywords

Comments

Sequence lists square roots of square terms of A273318.
Numbers n such that (n+k-1)^2 is the sum of two nonzero squares in exactly k ways for all k = 1, 2, 3 are 11998, 40748, 54248, ...

Examples

			3444 is a term because;
3444^2 = 756^2 + 3360^2.
3444^2 + 1 = 681^2 + 3376^2 = 1^2 + 3444^2.
3444^2 + 2 = 83^2 + 3443^2 = 1547^2 + 3077^2 = 1987^2 + 2813^2.
		

Crossrefs

Cf. A273318.

Programs

  • Mathematica
    nR[n_] := (SquaresR[2,n] + Plus @@ Pick[{-4,4}, IntegerQ /@ Sqrt[{n, n/2} ]])/8; Select[ Range[ 10^5], nR[#^2] == 1 && nR[#^2 + 1] == 2 && nR[#^2 + 2] == 3 &] (* Giovanni Resta, May 20 2016 *)
  • PARI
    is(n, k) = {nb = 0; lim = sqrtint(n); for (x=1, lim, if ((n-x^2 >= x^2) && issquare(n-x^2), nb++); ); nb == k; }
    isok(n) = is(n^2, 1) && is(n^2+1, 2) && is(n^2+2, 3);

Extensions

a(7)-a(33) from Giovanni Resta, May 20 2016