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 11 results. Next

A006431 Numbers that have a unique partition into a sum of four nonnegative squares.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 7, 8, 11, 14, 15, 23, 24, 32, 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

David M. Bloom

Keywords

Comments

From a(16) = 96 onwards, the terms of this sequence satisfy the third-order recurrence relation a(n) = 4a(n-3). - Ant King, Aug 15 2010
A002635(a(n)) = 1. - Reinhard Zumkeller, Jul 13 2014

References

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

Crossrefs

Programs

  • Haskell
    a006431 n = a006431_list !! (n-1)
    a006431_list = filter ((== 1) . a002635) [0..]
    -- Reinhard Zumkeller, Jul 13 2014
  • Mathematica
    Select[Range[0,3584], Length[PowersRepresentations[ #,4,2]] == 1&] (* Ant King, Aug 15 2010 *)
    CoefficientList[Series[x  (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)/(4 x^3 - 1), {x, 0, 50}], x] (* Vincenzo Librandi, Oct 14 2013 *)
    LinearRecurrence[{0,0,4},{0,1,2,3,5,6,7,8,11,14,15,23,24,32,56},50] (* Harvey P. Dale, Nov 26 2015 *)
  • PARI
    {a(n)=if(n<2, 0, if(n<15, [1, 2, 3, 5, 6, 7, 8, 11, 14, 15, 23, 24, 32] [n-1], [4, 7, 12][n%3+1]*2^(n\3*2-7)))} /* Michael Somos, Apr 23 2006 */
    

Formula

Consists of the seven odd numbers 1, 3, 5, 7, 11, 15, 23, plus 0, and numbers of forms 2*4^k, 6*4^k, 14*4^k, k >= 0.
The set {n nonnegative : A002635(n) = 1}.
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) / (4*x^3 -1). - Colin Barker, Apr 20 2013
log(a(n)) = n*log(4)/3 + C(n) + o(1) where C(n) ~ {-2.82922, -3.00364, -2.90612} for n (mod 3) == {2,0,1}. - Bill McEachen, Oct 21 2022

Extensions

More terms from James Sellers, Dec 24 1999
Corrected by T. D. Noe, Jun 15 2006
Definition revised by Ant King, May 06 2010
Edited and Grosswald reference added by Wolfdieter Lang, Aug 12 2015

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
    

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

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 *)

A337853 a(n) is the number of partitions of n as the sum of two Niven numbers.

Original entry on oeis.org

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

Views

Author

Marius A. Burtea, Sep 26 2020

Keywords

Comments

a(n) >= 1 for n >= 2 ?.
For n <= 200000, a(n) = 1 only for n = 2, 3, 299, (2 = 1 + 1, 3 = 1 + 2, 299 = 1 + 288) and a(n) = 2 only for n in {4, 5, 35, 59, 79, 95, 97, 149, 169, 179, 389}.

Examples

			0 and 1 cannot be decomposed as the sum of two Niven numbers, so a(0) = a(1) = 0.
4 = 1 + 3 = 2 + 2 and 1, 2, 3 are in A005349, so a(4) = 2.
15 = 3 + 12 = 5 + 10 = 6 + 9 = 7 + 8 and 3, 5, 6, 7, 8, 9, 10, 12 are in A005349, so a(15) = 4.
		

Crossrefs

Programs

  • Magma
    niven:=func; [#RestrictedPartitions(n,2,{k: k in [1..n-1] | niven(k)}): n in [0..100]];
  • Mathematica
    m = 100; nivens = Select[Range[m], Divisible[#, Plus @@ IntegerDigits[#]] &]; a[n_] := Length[IntegerPartitions[n, {2}, nivens]]; Array[a, m, 0] (* Amiram Eldar, Sep 27 2020 *)

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

Original entry on oeis.org

66, 81, 97, 99, 105, 110, 115, 121, 123, 124, 137, 139, 141, 149, 155, 156, 158, 159, 164, 179, 188, 239, 264, 284, 440, 496, 624, 632, 656, 752, 1056, 1136, 1760, 1984, 2496, 2528, 2624, 3008, 4224, 4544, 7040, 7936, 9984, 10112, 10496, 12032, 16896, 18176
Offset: 1

Views

Author

Robert Price, Oct 27 2017

Keywords

Comments

A002635(a(n)) = 6.

Crossrefs

Programs

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

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

Original entry on oeis.org

82, 98, 100, 102, 106, 108, 118, 125, 129, 132, 133, 134, 135, 161, 163, 173, 183, 197, 199, 204, 211, 212, 215, 236, 263, 328, 392, 400, 408, 424, 432, 472, 528, 536, 816, 848, 944, 1312, 1568, 1600, 1632, 1696, 1728, 1888, 2112, 2144, 3264, 3392, 3776
Offset: 1

Views

Author

Robert Price, Oct 27 2017

Keywords

Comments

A002635(a(n)) = 7.

Crossrefs

Programs

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

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

Original entry on oeis.org

90, 146, 166, 174, 185, 187, 205, 206, 207, 209, 219, 220, 221, 223, 231, 235, 251, 260, 271, 287, 316, 359, 360, 380, 584, 664, 696, 824, 880, 1040, 1264, 1440, 1520, 2336, 2656, 2784, 3296, 3520, 4160, 5056, 5760, 6080, 9344, 10624, 11136, 13184, 14080
Offset: 1

Views

Author

Robert Price, Oct 27 2017

Keywords

Comments

A002635(a(n)) = 9.

Crossrefs

Programs

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

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

Original entry on oeis.org

114, 117, 122, 126, 145, 147, 148, 157, 165, 169, 172, 175, 177, 181, 190, 193, 203, 227, 233, 311, 456, 488, 504, 592, 688, 760, 1824, 1952, 2016, 2368, 2752, 3040, 7296, 7808, 8064, 9472, 11008, 12160, 29184, 31232, 32256, 37888, 44032, 48640
Offset: 1

Views

Author

Robert Price, Oct 27 2017

Keywords

Comments

A002635(a(n)) = 8.

Crossrefs

Programs

  • Mathematica
    f[n_]:=Length@PowersRepresentations[n, 4, 2]; Select[Range@850, f@#==8 &] (* Vincenzo Librandi, Oct 28 2017 *)
Showing 1-10 of 11 results. Next