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.

A124971 Numbers n which can be expressed as the ordered sum of 3 squares in 2 or more different ways and such that n+1 has the same property.

This page as a plain text file.
%I A124971 #15 Feb 07 2025 14:26:10
%S A124971 17,25,26,33,49,50,53,61,65,68,72,73,74,81,82,85,89,97,98,99,100,101,
%T A124971 104,105,106,107,108,109,113,116,117,121,122,125,129,130,131,136,137,
%U A124971 138,144,145,146,149,152,153,154,157,161,164,165,169,170,173,177,178
%N A124971 Numbers n which can be expressed as the ordered sum of 3 squares in 2 or more different ways and such that n+1 has the same property.
%H A124971 R. J. Mathar, <a href="/A124971/b124971.txt">Table of n, a(n) for n = 1..6598</a>
%F A124971 A000164(n)>=2 and A000164(n+1)>=2. - _R. J. Mathar_, Nov 29 2006
%e A124971 a(1)=17 because 17=3^2+2^2+2^2 = 4^2+1^2+0^2 and a(1)+1= 18=3^2+3^2+0^2 = 4^2+1^2+1^2
%t A124971 Select[Range[200], Length@PowersRepresentations[#, 3, 2] > 1 && Length@PowersRepresentations[# + 1, 3, 2] > 1 &] (* _Ray Chandler_, Oct 31 2019 *)
%o A124971 (PARI) isCnt3sqr(n)={ local(cnt=0,z2) ; for(x=0,floor(sqrt(n)), for(y=x,floor(sqrt(n-x^2)), z2=n-x^2-y^2 ; if( z2>=y^2 && issquare(z2), cnt++ ; ) ; if(cnt >=2, return(1) ) ; ) ; ) ; return(0) ; } isA124971(n)= { return( isCnt3sqr(n) && isCnt3sqr(n+1)) ; } { for(n=1,200, if( isA124971(n), print1(n,", ") ; ) ; ) ; } \\ _R. J. Mathar_, Nov 29 2006
%Y A124971 Cf. A124966-A124970.
%K A124971 nonn
%O A124971 1,1
%A A124971 _Artur Jasinski_, Nov 14 2006
%E A124971 Corrected and extended by _Ray Chandler_, Nov 30 2006
%E A124971 Corrected and extended by _R. J. Mathar_, Nov 29 2006