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.

A273236 Primes p such that p + k is the sum of two nonzero squares in exactly k ways for all k = 1, 2, 3.

Original entry on oeis.org

563047, 1186631, 1205647, 1421647, 1871503, 2058047, 2615047, 2739103, 2795047, 3703463, 3743647, 4106447, 4723847, 4748047, 4758847, 5744447, 6991847, 8376847, 9951047, 10014847, 12214303, 12773447, 14161183, 14402447, 15232031, 15630847
Offset: 1

Views

Author

Altug Alkan, May 26 2016

Keywords

Comments

All terms of this sequence are the sum of 4 but no fewer nonzero squares.

Examples

			The prime 563047 is a term because 563048 = 218^2 + 718^2, 563049 = 165^2 + 732^2 = 357^2 + 660^2 and 563050 = 71^2 + 747^2 = 141^2 + 737^2 = 505^2 + 555^2.
		

Crossrefs

Programs

  • 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) = isprime(n) && is(n+1, 1) && is(n+2, 2) && is(n+3, 3);

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