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.

Previous Showing 11-20 of 24 results. Next

A297788 Number of partitions of n into 3 squares and a nonnegative cube.

Original entry on oeis.org

1, 2, 2, 2, 2, 2, 2, 1, 2, 4, 4, 3, 3, 3, 3, 1, 2, 5, 5, 4, 3, 3, 3, 1, 2, 5, 6, 6, 4, 4, 5, 2, 3, 6, 6, 6, 5, 6, 5, 3, 3, 7, 6, 4, 6, 6, 6, 2, 3, 7, 6, 7, 6, 7, 8, 3, 4, 6, 6, 6, 5, 6, 8, 4, 4, 9, 8, 8, 7, 8, 7, 2, 6, 10, 9, 8, 8, 9, 7, 2, 6, 12, 11, 8, 7, 7
Offset: 0

Views

Author

XU Pingya, Jan 06 2018

Keywords

Comments

When n is not of the form 4^a * (8b + 7), according to Legendre's three-square theorem, n = x^2 + y^2 + z^2 = x^2 + y^2 + z^2 + 0^3 (where a, b, x, y and z are nonnegative integers with x <= y <= z).
If n = 8b + 7, then n - 1 = 8b + 6 is not of the form 4^a * (8b + 7). So n = (n - 1) + 1 = x^2 + y^2 + z^2 + 1^3.
If n = 4 * (8b + 7), then n - 1 = 8 * (4b + 3) + 3 is also not of the form 4^a * (8b + 7).
If n = 4^2 * (8b + 7), then n - 8 = 4 * (8 * (4b + 3) + 2) is not of the form 4^a * (8b + 7). n = (n - 8) + 8 = x^2 + y^2 + z^2 + 2^3.
If n = 4^k * (8b + 7) (k >= 3), then n - 8 = 4 * (8 * (4^(k - 1) * b + 4^(k - 3) * 14) - 2) = 4 * (8m - 2) is also not of the form 4^a * (8b + 7).
That is, every nonnegative integer can be represented as the sum of 3 squares and a nonnegative cube, so a(n) > 0.

Examples

			2 = 0^2 + 0^2 + 1^2 + 1^3 = 0^2 + 1^2 + 0^2 + 1^3, a(2) = 2.
9 = 0^2 + 0^2 + 1^2 + 2^3 = 0^2 + 1^2 + 0^2 + 2^3 = 0^2 + 2^2 + 2^2 + 1^3 = 1^2 + 2^2 + 2^2 + 0^3, a(9) = 4.
		

Crossrefs

Programs

  • Maple
    N:= 100: # to get a(0)..a(N)
    A:= Array(0..N):
    for x from 0 to floor(sqrt(N)) do
      for y from 0 to x while x^2 + y^2 <= N do
        for z from 0 to y while x^2 + y^2 + z^2 <= N do
          for w from 0 do
            t:= x^2 + y^2 + z^2 + w^3;
            if t > N then break fi;
            A[t]:= A[t]+1;
    od od od od:
    convert(A,list); # Robert Israel, Jan 11 2018
  • Mathematica
    a[n_]:=Sum[If[x^2+y^2+z^2+w^3==n, 1, 0], {x,0,n^(1/2)}, {y,x,(n-x^2)^(1/2)}, {z,y,(n-x^2-y^2)^(1/2)}, {w,0,(n-x^2-y^2-z^2)^(1/3)}]
    Table[a[n], {n,0,86}]

A307531 a(n) is the greatest sum i + j + k + l where i^2 + j^2 + k^2 + l^2 = n and 0 <= i <= j <= k <= l.

Original entry on oeis.org

0, 1, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 7, 6, 7, 8, 7, 8, 7, 8, 9, 8, 9, 8, 9, 10, 9, 10, 9, 10, 11, 8, 11, 10, 11, 12, 11, 12, 11, 12, 11, 12, 13, 12, 13, 12, 13, 12, 13, 14, 13, 14, 13, 14, 13, 12, 15, 14, 15, 14, 15, 14, 15, 16, 15, 16, 15, 16, 15, 16, 15
Offset: 0

Views

Author

Rémy Sigrist, Apr 13 2019

Keywords

Comments

The sequence is well defined as every nonnegative integer can be represented as a sum of four squares in at least one way.
It appears that a(n^2) = 2*n if n is even and 2*n-1 if n is odd. - Robert Israel, Apr 14 2019

Examples

			For n = 34:
- 34 can be expressed in 4 ways as a sum of four squares:
    i^2 + j^2 + k^2 + l^2   i+j+k+l
    ---------------------   -------
    0^2 + 0^2 + 3^2 + 5^2         8
    0^2 + 3^2 + 3^2 + 4^2        10
    1^2 + 1^2 + 4^2 + 4^2        10
    1^2 + 2^2 + 2^2 + 5^2        10
- a(34) = max(8, 10) = 10.
		

Crossrefs

See A307510 for the multiplicative variant.

Programs

  • C
    See Links section.
  • Maple
    g:= proc(n,k) option remember; local a;
      if k = 1 then if issqr(n) then return sqrt(n) else return -infinity fi fi;
      max(seq(a+procname(n-a^2,k-1),a=0..floor(sqrt(n))))
    end proc:
    seq(g(n,4), n=0..100); # Robert Israel, Apr 14 2019
  • Mathematica
    Array[Max[Total /@ PowersRepresentations[#, 4, 2]] &, 68, 0] (* Michael De Vlieger, Apr 13 2019 *)

A161148 Number of partitions of n such that each term of the partition is a squared divisor of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 3, 2, 3, 1, 5, 1, 4, 2, 6, 1, 9, 1, 8, 3, 6, 1, 16, 2, 7, 4, 12, 1, 21, 1, 15, 4, 9, 2, 39, 1, 10, 5, 25, 1, 35, 1, 24, 9, 12, 1, 76, 2, 21, 6, 32, 1, 61, 3, 38, 7, 15, 1, 174, 1, 16, 10, 46, 3, 93, 1, 50, 8, 42, 1, 231, 1, 19, 19, 60, 2, 135, 1
Offset: 1

Views

Author

R. J. Mathar, Jun 03 2009

Keywords

Examples

			a(n=12)=5 counts these 5 partitions of 12: 1^2+1^2+..+1^2 = 1^2+1^2+...+1^2+2^2 = 1^2+1^2+..+1^2+2^2+2^2 = 1^2+1^2+1^2+3^2=2^2+2^2+2^2. Partitions with the divisors 4, 6 or 12 do not contribute to the count because 4^2, 6^2 and 12^2 are larger than n.
		

Crossrefs

Programs

  • Maple
    a := proc(n) coeftayl(1/mul(1-x^(d^2),d=numtheory[divisors](n)),x=0,n) ; end:
  • Mathematica
    a[n_] := SeriesCoefficient[1/Product[1-x^(d^2), {d, Divisors[n]}], {x, 0, n}];
    Table[a[n], {n, 1, 80}] (* Jean-François Alcover, Apr 04 2024, after Maple code *)

Formula

a(p) = 1 if p a prime (A000040).
a(2p) = A130291(n) if p=A000040(n).
a(n) = [x^n] Product_{d|n} 1/( 1-x^(d^2) ).

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

A307510 a(n) is the greatest product i*j*k*l where i^2 + j^2 + k^2 + l^2 = n and 0 <= i <= j <= k <= l.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 4, 0, 3, 8, 0, 6, 16, 0, 12, 4, 9, 24, 8, 18, 0, 16, 36, 12, 32, 0, 24, 54, 0, 48, 20, 36, 81, 40, 72, 30, 64, 0, 60, 108, 45, 96, 40, 90, 48, 80, 144, 60, 135, 72, 120, 54, 0, 192, 108, 180, 96, 160, 72, 162, 256, 144, 240, 100
Offset: 0

Views

Author

Rémy Sigrist, Apr 11 2019

Keywords

Comments

The sequence is well defined as every nonnegative integer can be represented as a sum of four squares in at least one way.

Examples

			For n = 34:
- 34 can be expressed in 4 ways as a sum of four squares:
    i^2 + j^2 + k^2 + l^2   i*j*k*l
    ---------------------   -------
    0^2 + 0^2 + 3^2 + 5^2         0
    0^2 + 3^2 + 3^2 + 4^2         0
    1^2 + 1^2 + 4^2 + 4^2        16
    1^2 + 2^2 + 2^2 + 5^2        20
- a(34) = max(0, 16, 20) = 20.
		

Crossrefs

See A307531 for the additive variant.

Programs

  • C
    See Links section.
  • Maple
    g:= proc(n, k) option remember; local a;
      if k = 1 then if issqr(n) then return sqrt(n) else return -infinity fi fi;
      max(0,seq(a*procname(n-a^2, k-1), a=1..floor(sqrt(n))))
    end proc:
    seq(g(n, 4), n=0..100); # Robert Israel, Apr 15 2019
  • Mathematica
    Array[Max[Times @@ # & /@ PowersRepresentations[#, 4, 2]] &, 68, 0] (* Michael De Vlieger, Apr 13 2019 *)

Formula

a(n) = 0 iff n belongs to A000534.
a(n) <= (n/4)^2, with equality if and only if n is an even square. - Robert Israel, Apr 15 2019

A002637 Number of partitions of n into not more than 5 pentagonal numbers.

Original entry on oeis.org

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

Views

Author

Keywords

References

  • Gino 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).

Programs

  • Mathematica
    it=Expand[Normal @ Series[CoefficientList[Series[Product[(1+(q l[3k^2/2-k/2] x^(3k^2/2-k/2)))^5,{k,512}],{x,0,512}],x],{q,0,5}]]/. (Integer) q^(e:1)->1 /.q->1 ; Drop[it/.l[]->1,1] (* _Wouter Meeussen, May 17 2008 *)

Extensions

More terms from Naohiro Nomoto, Feb 28 2002

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

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

Original entry on oeis.org

130, 138, 153, 154, 171, 180, 182, 195, 196, 201, 213, 214, 217, 228, 229, 238, 241, 244, 247, 249, 253, 254, 257, 259, 269, 276, 277, 281, 295, 299, 303, 308, 317, 319, 332, 335, 347, 428, 431, 520, 552, 616, 720, 728, 784, 856, 912, 952, 976, 1016, 1104
Offset: 1

Views

Author

Robert Price, Oct 27 2017

Keywords

Comments

A002635(a(n)) = 10.

Crossrefs

Programs

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