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.

A124967 Numbers which can be expressed as the ordered sum of 3 squares in 3 or more different ways.

This page as a plain text file.
%I A124967 #14 Oct 31 2019 13:18:50
%S A124967 41,50,54,65,66,74,81,86,89,90,98,99,101,110,113,114,117,121,122,125,
%T A124967 126,129,131,134,137,145,146,149,150,153,161,162,164,166,169,170,171,
%U A124967 173,174,178,179,181,182,185,186,189,194,197,198,200,201,205,206,209
%N A124967 Numbers which can be expressed as the ordered sum of 3 squares in 3 or more different ways.
%H A124967 Alois P. Heinz, <a href="/A124967/b124967.txt">Table of n, a(n) for n = 1..10000</a>
%e A124967 a(1) = 41 because 41 = 4^2+4^2+3^2 or 5^2+4^2+0^2 or 6^2+2^2+1^2.
%e A124967 117=0^2+6^2+9^2=1^2+4^2+10^2=2^2+7^2+8^2, so 117 is in the list.
%p A124967 b:= proc(n, i, t) option remember; `if`(n=0, 1, `if`(t*i^2<n, 0,
%p A124967       `if`(b(n, i-1, t)>3, 3, min(3, b(n, i-1, t)+
%p A124967       `if`(i^2>n, 0, b(n-i^2, i, t-1))))))
%p A124967     end:
%p A124967 a:= proc(n) option remember; local k;
%p A124967       for k from 1 +`if`(n=1, 0, a(n-1))
%p A124967       while b(k, isqrt(k), 3)<3 do od; k
%p A124967     end:
%p A124967 seq(a(n), n=1..100);  # _Alois P. Heinz_, Apr 10 2013
%t A124967 Select[Range[210], Length@PowersRepresentations[#, 3, 2] >= 3 &] (* _Ray Chandler_, Oct 31 2019 *)
%o A124967 (PARI) isA124967(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 >=3, return(1) ) ; ) ; ) ; return(0) ; } { for(n=1,200, if( isA124967(n), print1(n,", ") ; ) ; ) ; } (Mathar)
%Y A124967 Cf. A124966-A124971.
%K A124967 nonn
%O A124967 1,1
%A A124967 _Artur Jasinski_, Nov 14 2006
%E A124967 Corrected and extended by _Ray Chandler_ and _R. J. Mathar_, Nov 29 2006