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.
%I A124978 #25 Aug 14 2025 19:44:21 %S A124978 1,4,18,34,50,66,82,114,90,130,150,178,162,198,318,210,250,234,322, %T A124978 406,465,330,306,402,462,390,474,378,490,486,654,610,522,450,778,678, %U A124978 642,570,666,726,594,714,770,774,986,630,738,945,1035,850,1222,978,1014,918 %N A124978 Smallest positive number which has exactly n different partitions as a sum of 4 squares x^2+y^2+z^2+t^2. %C A124978 Is it known that a(n) always exists? - _Franklin T. Adams-Watters_, Dec 18 2006 %C A124978 A002635(a(n)) = n. - _Reinhard Zumkeller_, Jul 13 2014 %H A124978 T. D. Noe, <a href="/A124978/b124978.txt">Table of n, a(n) for n=1..1000</a> %H A124978 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a> %e A124978 a(4)=34 because 34 is smallest number which has 4 partitions 34=4^2+3^2+3^2+0^2 = 4^2+4^2+1^2+1^2 = 5^2+2^2+2^2+1^2 = 5^2+3^2+0^2+0^2 %e A124978 a(3)=18 which has 3 partitions 18=0^2+0^2+3^2+3^2=0^2+1^2+1^2+4^2=1^2+2^2+2^2+3^2. %t A124978 kmin[n_] := If[n<5, 1, 10n](* empirical, should be lowered in case of doubt *); %t A124978 a[n_] := a[n] = For[k=kmin[n], True, k++, If[Length[PowersRepresentations[ k, 4, 2]] == n, Return[k]]]; %t A124978 Table[Print[n, " ", a[n]]; a[n], {n, 1, 1000}] (* _Jean-François Alcover_, Mar 11 2019 *) %o A124978 (PARI) cnt4sqr(n)={ local(cnt=0,t2) ; for(x=0,floor(sqrt(n)), for(y=x,floor(sqrt(n-x^2)), for(z=y,floor(n-x^2-y^2), t2=n-x^2-y^2-z^2 ; if( t2>=z^2 && issquare(n-x^2-y^2-z^2), cnt++ ; ) ; ) ; ) ; ) ; return(cnt) ; } %o A124978 A124978(n)= { local(a=1) ; while(1, if( cnt4sqr(a)==n, return(a) ; ) ; a++ ; ) ; } %o A124978 { for(n=1,100, print(n," ",A124978(n)) ; ) ; } \\ _R. J. Mathar_, Nov 29 2006 %o A124978 (Haskell) %o A124978 import Data.List (elemIndex); import Data.Maybe (fromJust) %o A124978 a124978 = (+ 1) . fromJust . (`elemIndex` (tail a002635_list)) %o A124978 -- _Reinhard Zumkeller_, Jul 13 2014 %Y A124978 Cf. A006431, A094942, A124979-A124983, A000378, A002635, A061262. %K A124978 nonn %O A124978 1,2 %A A124978 _Artur Jasinski_, Nov 14 2006 %E A124978 Corrected and extended by _R. J. Mathar_, Nov 29 2006 %E A124978 More terms from _Franklin T. Adams-Watters_, Dec 18 2006