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-3 of 3 results.

A125020 a(n) = (A124983(n)-1)/4.

Original entry on oeis.org

0, 2, 11, 12, 20, 29, 30, 38, 61, 65, 83, 90, 92, 101, 110, 119, 132, 137, 151, 159, 164, 182, 200, 208, 218, 227, 240, 245, 254, 263, 272, 308, 335, 344, 353, 355, 389, 393, 407, 434, 443, 451, 453, 462, 502, 514, 515, 524, 542, 551, 552, 578, 587, 600, 605, 623
Offset: 1

Views

Author

Artur Jasinski, Nov 16 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 600], !PrimeQ[4*# + 1] && Length @ PowersRepresentations[4*# + 1, 2, 2] == 1 &] (* Amiram Eldar, Mar 12 2020 *)

Extensions

More terms from Amiram Eldar, Mar 12 2020

A124978 Smallest positive number which has exactly n different partitions as a sum of 4 squares x^2+y^2+z^2+t^2.

Original entry on oeis.org

1, 4, 18, 34, 50, 66, 82, 114, 90, 130, 150, 178, 162, 198, 318, 210, 250, 234, 322, 406, 465, 330, 306, 402, 462, 390, 474, 378, 490, 486, 654, 610, 522, 450, 778, 678, 642, 570, 666, 726, 594, 714, 770, 774, 986, 630, 738, 945, 1035, 850, 1222, 978, 1014, 918
Offset: 1

Views

Author

Artur Jasinski, Nov 14 2006

Keywords

Comments

Is it known that a(n) always exists? - Franklin T. Adams-Watters, Dec 18 2006
A002635(a(n)) = n. - Reinhard Zumkeller, Jul 13 2014

Examples

			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
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.
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a124978 = (+ 1) . fromJust . (`elemIndex` (tail a002635_list))
    -- Reinhard Zumkeller, Jul 13 2014
  • Mathematica
    kmin[n_] := If[n<5, 1, 10n](* empirical, should be lowered in case of doubt *);
    a[n_] := a[n] = For[k=kmin[n], True, k++, If[Length[PowersRepresentations[ k, 4, 2]] == n, Return[k]]];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 1000}] (* Jean-François Alcover, Mar 11 2019 *)
  • 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) ; }
    A124978(n)= { local(a=1) ; while(1, if( cnt4sqr(a)==n, return(a) ; ) ; a++ ; ) ; }
    { for(n=1,100, print(n," ",A124978(n)) ; ) ; } \\ R. J. Mathar, Nov 29 2006
    

Extensions

Corrected and extended by R. J. Mathar, Nov 29 2006
More terms from Franklin T. Adams-Watters, Dec 18 2006

A125018 Numbers == 1 (mod 4) with a unique partition as a sum of 2 squares x^2 + y^2.

Original entry on oeis.org

1, 5, 9, 13, 17, 29, 37, 41, 45, 49, 53, 61, 73, 81, 89, 97, 101, 109, 113, 117, 121, 137, 149, 153, 157, 173, 181, 193, 197, 229, 233, 241, 245, 257, 261, 269, 277, 281, 293, 313, 317, 333, 337, 349, 353, 361, 369, 373, 389, 397, 401, 405, 409, 421, 433
Offset: 1

Views

Author

Artur Jasinski, Nov 16 2006

Keywords

Examples

			5 = 1^2 + 2^2, 9 = 0^2 + 3^2, 13 = 2^2 + 3^2, 17 = 1^2 + 4^2, 29 = 2^2 + 5^2, ... - _Michael Somos_, Jul 25 2023
		

Crossrefs

Programs

  • Mathematica
    Select[4 * Range[0, 100] + 1, Length @ PowersRepresentations[#, 2, 2] == 1 &] (* Amiram Eldar, Mar 12 2020 *)
  • PARI
    isok(n)= {if (n % 4 != 1, return(0)); A000161(n) == 1;} \\ Michel Marcus, Nov 02 2013

Extensions

More terms from Michel Marcus, Nov 02 2013
Showing 1-3 of 3 results.