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-10 of 25 results. Next

A178419 Partial sums of A006431.

Original entry on oeis.org

0, 1, 3, 6, 11, 17, 24, 32, 43, 57, 72, 95, 119, 151, 207, 303, 431, 655, 1039, 1551, 2447, 3983, 6031, 9615, 15759, 23951, 38287, 62863, 95631, 152975, 251279, 382351, 611727, 1004943, 1529231, 2446735, 4019599, 6116751, 9786767, 16078223
Offset: 1

Views

Author

Jonathan Vos Post, May 27 2010

Keywords

Crossrefs

Cf. A006431.

Formula

a(n) = Sum_{i=1..n} A006431(i).
G.f.: -x^2*(36*x^13 +28*x^12 +32*x^11 +21*x^10 +17*x^9 +14*x^8 +13*x^7 +12*x^6 +5*x^5 +2*x^4 -x^3 -3*x^2 -2*x -1) / ((x -1)*(4*x^3 -1)). - Colin Barker, Apr 20 2013

A002635 Number of partitions of n into 4 squares.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 2, 3, 2, 2, 2, 2, 1, 1, 3, 3, 3, 3, 2, 2, 2, 1, 3, 4, 2, 4, 3, 3, 2, 2, 3, 4, 3, 2, 4, 2, 2, 2, 4, 5, 3, 5, 3, 5, 3, 1, 4, 5, 3, 3, 4, 3, 4, 2, 4, 6, 4, 4, 4, 5, 2, 3, 5, 5, 5, 5, 4, 4, 3, 2, 6, 7, 4, 5, 5, 5, 4, 2, 5, 9, 5, 3, 5, 4, 3, 1, 6, 7, 6, 7, 5, 7, 5, 3, 6, 7, 4
Offset: 0

Views

Author

Keywords

Comments

a(A124978(n)) = n; a(A006431(n)) = 1; a(A180149(n)) = 2; a(A245022(n)) = 3. - Reinhard Zumkeller, Jul 13 2014

Examples

			1: 1000; 2: 1100; 3:1110; 4: 2000 and 1111; 5: 2100; 6: 2110; 7: 2111; 8: 2200; 9: 3000 and 2210; 10: 3100 and 2211; etc.
		

References

  • G. Loria, Sulla scomposizione di un intero nella somma di numeri poligonali. (Italian) Atti Accad. Naz. Lincei. Rend. Cl. Sci. Fis. Mat. Nat. (8) 1, (1946). 7-15.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Equivalent sequences for other numbers of squares: A010052 (1), A000161 (2), A000164 (3), A000174 (5), A000177 (6), A025422 (7), A025423 (8), A025424 (9), A025425 (10).

Programs

  • Haskell
    a002635 = p (tail a000290_list) 4 where
    p ks'@(k:ks) c m = if m == 0 then 1 else
    if c == 0 || m < k then 0 else p ks' (c - 1) (m - k) + p ks c m
    -- Reinhard Zumkeller, Jul 13 2014
  • Mathematica
    Length[PowersRepresentations[ #, 4, 2]] & /@ Range[0, 107] (* Ant King, Oct 19 2010 *)
  • PARI
    for(n=1,100,print1(sum(a=0,n,sum(b=0,a,sum(c=0,b,sum(d=0,c,if(a^2+b^2+c^2+d^2-n,0,1))))),","))
    
  • PARI
    a(n)=local(c=0); if(n>=0, forvec(x=vector(4,k,[0,sqrtint(n)]),c+=norml2(x)==n,1)); c
    

A294524 Numbers that have a unique partition into a sum of five nonnegative squares.

Original entry on oeis.org

0, 1, 2, 3, 6, 7, 15
Offset: 1

Views

Author

Robert Price, Nov 01 2017

Keywords

Comments

This sequence is finite and complete. See the von Eitzen Link and the proof in A294675 stating that for n > 5408, the number of ways to write n as a sum of 5 squares (without allowing zero squares) is at least floor(sqrt(n - 101) / 8) = 9. Since this sequence relaxes the restriction of zero squares the number of representations for n > 5408 is at least nine. Then an inspection of n <= 5408 completes the proof.

References

  • E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, New York, 1985, p. 86, Theorem 1.

Crossrefs

Programs

  • Mathematica
    m = 5;
    r[n_] := Reduce[xx = Array[x, m]; 0 <= x[1] && LessEqual @@ xx && AllTrue[xx, NonNegative] && n == Total[xx^2], xx, Integers];
    For[n = 0, n < 20, n++, rn = r[n]; If[rn[[0]] === And, Print[n, " ", rn]]] (* Jean-François Alcover, Feb 25 2019 *)

A000534 Numbers that are not the sum of 4 nonzero squares.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 8, 9, 11, 14, 17, 24, 29, 32, 41, 56, 96, 128, 224, 384, 512, 896, 1536, 2048, 3584, 6144, 8192, 14336, 24576, 32768, 57344, 98304, 131072, 229376, 393216, 524288, 917504, 1572864, 2097152, 3670016, 6291456, 8388608, 14680064
Offset: 1

Views

Author

Keywords

Comments

For n > 15, a(n) = A006431(n-1). - Thomas Ordowski, Nov 18 2012

References

  • J. H. Conway, The Sensual (Quadratic) Form, M.A.A., 1997, p. 140.
  • L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 2, p. 302.
  • E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, Theorem 3, pp. 74-75.

Crossrefs

Cf. A123069, A000414 (complement).

Programs

  • Mathematica
    q=22;lst={};Do[Do[Do[Do[z=a^2+b^2+c^2+d^2;If[z<=q^2+3,AppendTo[lst,z]],{d,q}],{c,q}],{b,q}],{a,q}];lst1=Union@lst lst={};Do[AppendTo[lst,n],{n,q^2+3}];lst2=lst Complement[lst2,lst1] (* Vladimir Joseph Stephan Orlovsky, Feb 07 2010 *)
    Join[{0,1,2,3,5,6,8,9,11,14,17,24,29,32,41}, LinearRecurrence[{0, 0, 4}, {56, 96, 128}, 30]] (* Jean-François Alcover, Feb 09 2016 *)
  • PARI
    for(n=1,224,if(sum(a=1,n,sum(b=1,a,sum(c=1,b,sum(d=1,c,if(a^2+b^2+c^2+d^2-n,0,1)))))==0,print1(n,",")))
    
  • PARI
    {a(n)=if( n<2, 0, n<16, [1, 2, 3, 5, 6, 8, 9, 11, 14, 17, 24, 29, 32, 41][n-1], [4, 7, 12][n%3+1] * 2^(n\3*2-7))}; /* Michael Somos, Apr 23 2006 */
    
  • PARI
    is(n)=my(k=if(n,n/4^valuation(n,4),2)); k==2 || k==6 || k==14 || setsearch([0, 1, 3, 5, 9, 11, 17, 29, 41], n) \\ Charles R Greathouse IV, Sep 03 2014
    
  • Python
    from itertools import count, islice
    def A000534_gen(startvalue=0): # generator of terms >= startvalue
        return filter(lambda n:n in {0, 1, 3, 5, 9, 11, 17, 29, 41} or n>>((~n&n-1).bit_length()&-2) in {2,6,14},count(max(startvalue,0)))
    A000534_list = list(islice(A000534_gen(),30)) # Chai Wah Wu, Jul 09 2022

Formula

Consists of the numbers 0, 1, 3, 5, 9, 11, 17, 29, 41, 2*4^m, 6*4^m and 14*4^m (m >= 0). Compare A123069.
From 224 on, a(n) = 4*a(n-3).
Numbers n such that A025428(n) = 0.
G.f.: x^2*(36*x^16 + 32*x^15 + 60*x^14 + 55*x^13 + 36*x^12 + 27*x^11 + 20*x^10 + 19*x^9 + 18*x^8 + 13*x^7 + 11*x^6 + 4*x^5 + 2*x^4 - x^3 - 3*x^2 - 2*x - 1)/(4*x^3 - 1). - Chai Wah Wu, Jul 09 2022

A180149 Integers with precisely two partitions into sums of four squares of nonnegative numbers.

Original entry on oeis.org

4, 9, 10, 12, 13, 16, 17, 19, 20, 21, 22, 29, 30, 31, 35, 39, 40, 44, 46, 47, 48, 64, 71, 80, 88, 120, 160, 176, 184, 192, 256, 320, 352, 480, 640, 704, 736, 768, 1024, 1280, 1408, 1920, 2560, 2816, 2944, 3072, 4096, 5120, 5632, 7680
Offset: 1

Views

Author

Ant King, Aug 17 2010

Keywords

Comments

The largest odd member of this sequence is 71, and from a(32)=320 onwards the terms satisfy the eighth-order recurrence relation a(n)=4a(n-8).
A002635(a(n)) = 2. - Reinhard Zumkeller, Jul 13 2014

Examples

			As the fifth integer which has precisely two partitions into sums of four squares of nonnegative numbers is 13, then a(5)=13.
		

Crossrefs

Programs

  • Haskell
    a180149 n = a180149_list !! (n-1)
    a180149_list = filter ((== 2) . a002635) [0..]
    -- Reinhard Zumkeller, Jul 13 2014
  • Mathematica
    Select[Range[10000], Length[PowersRepresentations[ #, 4, 2]]==2&]

Formula

The members of this sequence are {9, 13, 17, 19, 21, 29, 30, 31, 35, 39, 46, 47, 71} together with all integers of the form 5*2^N, 11*2^N and {1,3,30,46}*4^N where N > 0 (which includes a necessary correction to Lehmer's result).

A245022 Integers with precisely three partitions into sums of four squares of nonnegative numbers.

Original entry on oeis.org

18, 25, 26, 27, 28, 33, 37, 38, 41, 43, 51, 53, 55, 59, 60, 62, 72, 79, 92, 95, 104, 112, 152, 240, 248, 288, 368, 416, 448, 608, 960, 992, 1152, 1472, 1664, 1792, 2432, 3840, 3968, 4608, 5888, 6656, 7168, 9728, 15360, 15872, 18432, 23552, 26624, 28672
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 13 2014

Keywords

Comments

A002635(a(n)) = 3.

Examples

			a(1) = 18 = 16 + 1 + 1 + 0 = 9 + 9 + 0 + 0 = 9 + 4 + 4 + 1;
a(2) = 25 = 25 + 0 + 0 + 0 = 16 + 9 + 0 + 0 = 16 + 4 + 4 + 1;
a(3) = 26 = 25 + 1 + 0 + 0 = 16 + 9 + 1 + 0 = 9 + 9 + 4 + 4;
a(4) = 27 = 25 + 1 + 1 + 0 = 16 + 9 + 1 + 1 = 9 + 9 + 9 + 0;
a(5) = 28 = 25 + 1 + 1 + 1 = 16 + 4 + 4 + 4 = 9 + 9 + 9 + 1;
a(6) = 33 = 25 + 4 + 4 + 0 = 16 + 16 + 1 + 0 = 16 + 9 + 4 + 4;
a(7) = 37 = 36 + 1 + 0 + 0 = 25 + 4 + 4 + 4 = 16 + 16 + 4 + 1;
a(8) = 38 = 36 + 1 + 1 + 0 = 25 + 9 + 4 + 0 = 16 + 9 + 9 + 4;
a(9) = 41 = 36 + 4 + 1 + 0 = 25 + 16 + 0 + 0 = 16 + 16 + 9 + 0;
a(10) = 43 = 25 + 16 + 1 + 1 = 25 + 9 + 9 + 0 = 16 + 9 + 9 + 9;
a(11) = 51 = 49 + 1 + 1 + 0 = 25 + 25 + 1 + 0 = 25 + 16 + 9 + 1;
a(12) = 53 = 49 + 4 + 0 + 0 = 36 + 16 + 1 + 0 = 36 + 9 + 4 + 4.
		

Crossrefs

Programs

  • Haskell
    a245022 n = a245022_list !! (n-1)
    a245022_list = filter ((== 3) . a002635) [0..]
  • Mathematica
    Select[ Range@ 30000, Length@PowersRepresentations[#, 4, 2] == 3 &] (* Robert G. Wilson v, Oct 27 2017 *)

Extensions

a(44)-a(50) from Robert Price, Oct 26 2017

A295150 Numbers that have exactly two representations as a sum of five nonnegative squares.

Original entry on oeis.org

4, 5, 8, 9, 10, 11, 12, 14, 23, 24
Offset: 1

Views

Author

Robert Price, Nov 15 2017

Keywords

Comments

This sequence is finite and complete. See the von Eitzen Link and the proof in A294675 stating that for n > 5408, the number of ways to write n as a sum of 5 squares (without allowing zero squares) is at least floor(sqrt(n - 101) / 8) = 9. Since this sequence relaxes the restriction of zero squares, the number of representations for n > 5408 is at least nine. Then an inspection of n <= 5408 completes the proof.

References

  • E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, New York, 1985, p. 86, Theorem 1.

Crossrefs

Programs

  • Mathematica
    okQ[n_] := Length[PowersRepresentations[n, 5, 2]] == 2;
    Select[Range[100], okQ] (* Jean-François Alcover, Feb 26 2019 *)

A294282 Integers with precisely four partitions into sums of four squares of nonnegative numbers.

Original entry on oeis.org

34, 36, 42, 45, 49, 57, 61, 63, 65, 67, 68, 69, 77, 78, 83, 87, 94, 107, 116, 119, 136, 144, 168, 272, 312, 376, 464, 544, 576, 672, 1088, 1248, 1504, 1856, 2176, 2304, 2688, 4352, 4992, 6016, 7424, 8704, 9216, 10752, 17408, 19968, 24064, 29696, 34816, 36864, 43008, 69632, 79872, 96256
Offset: 1

Views

Author

Robert Price, Oct 26 2017

Keywords

Comments

A002635(a(n)) = 4.

Crossrefs

Programs

  • Mathematica
    f[n_]:=Length@PowersRepresentations[n, 4, 2]; Select[Range@850, f@#==4 &] (* Vincenzo Librandi, Oct 28 2017 *)

A294297 Integers with precisely five partitions into sums of four squares of nonnegative numbers.

Original entry on oeis.org

50, 52, 54, 58, 70, 73, 74, 75, 76, 84, 85, 86, 89, 91, 93, 101, 103, 109, 111, 113, 127, 131, 140, 142, 143, 151, 167, 191, 200, 208, 216, 232, 280, 296, 304, 336, 344, 560, 568, 800, 832, 864, 928, 1120, 1184, 1216, 1344, 1376, 2240, 2272, 3200, 3328, 3456
Offset: 1

Views

Author

Robert Price, Oct 27 2017

Keywords

Comments

A002635(a(n)) = 5.

Crossrefs

Programs

  • Mathematica
    f[n_] := Length@ PowersRepresentations[n, 4, 2]; Select[ Range@ 3500, f@# == 5 &] (* Robert G. Wilson v, Oct 27 2017 *)

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
Showing 1-10 of 25 results. Next