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.

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

This page as a plain text file.
%I A273318 #18 May 20 2016 03:53:30
%S A273318 58472,79208,104616,150048,160848,205648,224648,234448,252808,259648,
%T A273318 259920,294048,297448,387648,421648,433448,462976,488448,506248,
%U A273318 563048,621448,683648,770976,790848,799648,837448,1008648,1040848,1084904,1186632,1195648,1205648,1212064
%N A273318 Numbers n such that n+k-1 is the sum of two nonzero squares in exactly k ways for all k = 1, 2, 3.
%C A273318 Numbers n such that n+k-1 is the sum of two nonzero squares in exactly 4-k ways for all k = 1, 2, 3 are 22984, 65600, 80800, 85544, ...
%H A273318 Robert Israel, <a href="/A273318/b273318.txt">Table of n, a(n) for n = 1..1095</a>
%e A273318 58472 is a term because;
%e A273318 58472 = 86^2 + 226^2.
%e A273318 58473 = 48^2 + 237^2 = 147^2 + 192^2.
%e A273318 58474 = 57^2 + 235^2 = 125^2 + 207^2 = 143^2 + 195^2.
%p A273318 N:= 10^6: # get all terms <= N-2
%p A273318 R:= Vector(N):
%p A273318 for x from 1 to floor(sqrt(N)) do
%p A273318   for y from 1 to min(x,floor(sqrt(N-x^2))) do
%p A273318     R[x^2+y^2]:= R[x^2+y^2]+1
%p A273318 od od:
%p A273318 count:= 0:
%p A273318 for n from 1 to N-2 do
%p A273318   if [R[n],R[n+1],R[n+2]] = [1,2,3] then
%p A273318   count:= count+1; A[count]:= n;
%p A273318 fi
%p A273318 od:
%p A273318 seq(A[i],i=1..count); # _Robert Israel_, May 19 2016
%o A273318 (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; }
%o A273318 isok(n) = is(n,1) && is(n+1,2) && is(n+2,3);
%Y A273318 Cf. A000404, A025284, A025285, A025286.
%K A273318 nonn
%O A273318 1,1
%A A273318 _Altug Alkan_, May 19 2016