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 21-30 of 40 results. Next

A025363 Numbers that are the sum of 4 nonzero squares in exactly 7 ways.

Original entry on oeis.org

135, 148, 170, 172, 182, 183, 187, 189, 190, 199, 215, 229, 245, 261, 263, 289, 305, 317, 347, 356, 389, 401, 404, 592, 680, 688, 728, 760, 1424, 1616, 2368, 2720, 2752, 2912, 3040, 5696, 6464, 9472, 10880, 11008, 11648, 12160, 22784, 25856, 37888, 43520
Offset: 1

Views

Author

Keywords

Formula

{n: A025428(n) = 7}. - R. J. Mathar, Jun 15 2018

A025364 Numbers that are the sum of 4 nonzero squares in exactly 8 ways.

Original entry on oeis.org

130, 138, 150, 154, 175, 180, 186, 195, 196, 213, 214, 217, 218, 222, 228, 230, 235, 237, 238, 244, 259, 275, 276, 277, 302, 308, 311, 321, 323, 326, 332, 353, 365, 371, 419, 428, 449, 461, 520, 521, 552, 600, 616, 720, 744, 784, 856, 872, 888, 912, 920, 952, 976
Offset: 1

Views

Author

Keywords

Formula

{n: A025428(n) = 8}. - R. J. Mathar, Jun 15 2018

A025365 Numbers that are the sum of 4 nonzero squares in exactly 9 ways.

Original entry on oeis.org

162, 178, 207, 220, 223, 225, 226, 231, 242, 243, 253, 265, 266, 267, 271, 278, 283, 286, 287, 291, 309, 314, 316, 331, 334, 337, 349, 359, 361, 377, 380, 413, 452, 491, 509, 524, 569, 648, 712, 880, 904, 968, 1064, 1112, 1144, 1256, 1264, 1336, 1520, 1808, 2096
Offset: 1

Views

Author

Keywords

Formula

{n: A025428(n) = 9}. - R. J. Mathar, Jun 15 2018

A025366 Numbers that are the sum of 4 nonzero squares in exactly 10 ways.

Original entry on oeis.org

198, 246, 247, 268, 274, 285, 295, 301, 303, 307, 313, 319, 324, 335, 339, 369, 373, 379, 381, 395, 398, 409, 425, 431, 437, 443, 446, 596, 792, 984, 1072, 1096, 1296, 1592, 1784, 2384, 3168, 3936, 4288, 4384, 5184, 6368, 7136, 9536, 12672, 15744, 17152
Offset: 1

Views

Author

Keywords

Formula

{n: A025428(n) = 10}. - R. J. Mathar, Jun 15 2018

A097203 Number of 4-tuples (a,b,c,d) with 1 <= a <= b <= c <= d, a^2+b^2+c^2+d^2 = n and gcd(a,b,c,d) = 1.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 2, 0, 1, 2, 0, 1, 2, 1, 1, 2, 1, 2, 0, 0, 3, 2, 1, 2, 1, 2, 0, 2, 2, 1, 3, 1, 2, 3, 0, 2, 4, 1, 2, 2, 1, 3, 0, 1, 3, 3, 2, 2, 4, 2, 0, 3, 2, 3, 3, 2, 3, 3, 0, 2, 5, 2, 3, 3, 2, 4, 0, 1, 5, 4, 2, 4, 2, 3, 0, 4, 4, 3
Offset: 1

Views

Author

Keywords

Comments

The old entry with this sequence number was a duplicate of A034836.
From Wolfdieter Lang, Mar 25 2013: (Start)
a(n) = 0 if n has no partition with four parts, each a (nonzero) square, and the parts have no common factor > 1.
n is not representable as a primitive sum of four nonzero squares.
If n' has a representation [s(1),s(2),s(3),s(4)] with 1 <= s(1) <= s(2) <= s(3) <= s(4) and sum(s(j)^2,j=1..4) = n', then [k*s(1),k*s(2),k*s(3),k*s(4)] is a representation of n := k^2*n'. Therefore, only primitive representations with gcd(s(1),s(2),s(3),s(4)) = 1 are here considered.
See A025428(n) for the multiplicity of the representations of n as a sum of four nonzero squares.
For the n values with a(n) not zero (primitively representable as a sum of four nonzero squares) see A222949. (End)

Examples

			The solutions (if any) for n <= 20 are as follows:
n = 1:
n = 2:
n = 3:
n = 4: 1 1 1 1
n = 5:
n = 6:
n = 7: 1 1 1 2
n = 8:
n = 9:
n = 10: 1 1 2 2
n = 11:
n = 12: 1 1 1 3
n = 13: 1 2 2 2
n = 14:
n = 15: 1 1 2 3
n = 16:
n = 17:
n = 18: 1 2 2 3
n = 19: 1 1 1 4
n = 20: 1 1 3 3
From _Wolfdieter Lang_, Mar 25 2013: (Start)
a(16) = 0 because 16 is not a primitive sum of four nonzero squares. The representation [2,2,2,2] of 16 is not primitive.
a(40) = 0 because the only representation as sum of four nonzero squares (A025428(4) = 1) is [2,2,4,4], but this is not primitive.
a(28) = 2 because the two primitive representations of 28 are
[1, 1, 1, 5] and [1, 3, 3, 3]. [2, 2, 2, 4] = 2*[1, 1, 1, 2] is not primitive due to 28 = 2^2*7. (End)
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, g, t) option remember; `if`(n=0,
          `if`(g=1 and t=0, 1, 0), `if`(i<1 or t=0 or i^2*tn, 0, b(n-i^2, i, igcd(g, i), t-1))))
        end:
    a:= n-> `if`(n<4, 0, b(n, isqrt(n-3), 0, 4)):
    seq(a(n), n=1..120);  # Alois P. Heinz, Apr 02 2013
  • Mathematica
    Clear[b]; b[n_, i_, g_, t_] := b[n, i, g, t] = If[n == 0, If[g == 1 && t == 0, 1, 0], If[i < 1 || t == 0 || i^2*t < n, 0, b[n, i-1, g, t] + If[i^2 > n, 0, b[n-i^2, i, GCD[g, i], t-1]]]]; a[n_] := If[n < 4, 0, b[n, Sqrt[n-3] // Floor, 0, 4]]; Table[a[n], {n, 1, 99}] (* Jean-François Alcover, Apr 05 2013, translated from Alois P. Heinz's Maple program *)

Formula

If a(n) > 0 then 8 does not divide n.
a(n) = k if there are k different quadruples [s(1),s(2),s(3),s(4)] with 1 <= s(1) <= s(2) <= s(3) <= s(4), gcd(s(1),s(2),s(3),s(4)) = 1 and sum(s(j)^2,j=1..4) = n. If there is no such quadruple then a(n) = 0. - Wolfdieter Lang, Mar 25 2013

A239353 Number of unit hypercubes, aligned with a four-dimensional Cartesian mesh, completely within the first 2^4-ant of a hypersphere centered at the origin, ordered by increasing radius.

Original entry on oeis.org

1, 5, 11, 15, 19, 31, 32, 44, 48, 54, 58, 70, 82, 94, 100, 112, 124, 148, 164, 176, 194, 206, 219, 235, 247, 275, 281, 317, 333, 345, 369, 393, 417, 421, 437
Offset: 1

Views

Author

Rajan Murthy, Mar 16 2014

Keywords

Examples

			When the radius of the sphere reaches 2, one cube is completely within the sphere. When the radius reaches 7^(1/2), five cubes are completely within the sphere.
		

Crossrefs

Cf. A237707 (3-dimensional analog), A232499 (2-dimensional analog). The square radii corresponding to the elements of {a(n)} are the indices of the nonzero terms of A025428.

A346803 Numbers that are the sum of nine squares in ten or more ways.

Original entry on oeis.org

63, 65, 68, 71, 72, 74, 75, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127
Offset: 1

Views

Author

David Consiglio, Jr., Aug 04 2021

Keywords

Examples

			65 = 1^2 + 1^2 + 1^2 + 1^2 + 1^2 + 1^2 + 1^2 + 3^2 + 7^2
   = 1^2 + 1^2 + 1^2 + 1^2 + 1^2 + 2^2 + 2^2 + 4^2 + 6^2
   = 1^2 + 2^2 + 2^2 + 2^2 + 2^2 + 2^2 + 2^2 + 2^2 + 6^2
   = 1^2 + 1^2 + 1^2 + 1^2 + 1^2 + 1^2 + 3^2 + 5^2 + 5^2
   = 1^2 + 1^2 + 1^2 + 2^2 + 2^2 + 2^2 + 3^2 + 4^2 + 5^2
   = 1^2 + 1^2 + 1^2 + 1^2 + 3^2 + 3^2 + 3^2 + 3^2 + 5^2
   = 1^2 + 1^2 + 1^2 + 1^2 + 2^2 + 3^2 + 4^2 + 4^2 + 4^2
   = 2^2 + 2^2 + 2^2 + 2^2 + 2^2 + 2^2 + 3^2 + 4^2 + 4^2
   = 1^2 + 2^2 + 2^2 + 2^2 + 3^2 + 3^2 + 3^2 + 3^2 + 4^2
   = 1^2 + 1^2 + 3^2 + 3^2 + 3^2 + 3^2 + 3^2 + 3^2 + 3^2
so 65 is a term.
		

Crossrefs

Programs

  • Python
    from itertools import combinations_with_replacement as cwr
    from collections import defaultdict
    keep = defaultdict(lambda: 0)
    power_terms = [x**2 for x in range(1, 1000)]
    for pos in cwr(power_terms, 9):
        tot = sum(pos)
        keep[tot] += 1
        rets = sorted([k for k, v in keep.items() if v >= 10])
        for x in range(len(rets)):
            print(rets[x])
    
  • Python
    def A346803(n): return (63, 65, 68, 71, 72, 74, 75)[n-1] if n<8 else n+69 # Chai Wah Wu, May 09 2024

Formula

From Chai Wah Wu, May 09 2024: (Start)
All integers >= 77 are terms. Proof: since 246 can be written as the sum of 4 positive squares in 10 ways (see A025428) and any integer >= 34 can be written as a sum of 5 positive squares (see A025429), any integer >= 280 can be written as a sum of 9 positive squares in 10 or more ways. Integers from 77 to 279 are terms by inspection.
a(n) = 2*a(n-1) - a(n-2) for n > 9.
G.f.: x*(-x^8 + x^7 - x^6 + x^5 - 2*x^4 + x^2 - 61*x + 63)/(x - 1)^2. (End)

A025358 Numbers that are the sum of 4 nonzero squares in exactly 2 ways.

Original entry on oeis.org

31, 34, 36, 37, 39, 43, 45, 47, 49, 50, 54, 57, 61, 68, 69, 71, 74, 77, 81, 83, 86, 94, 107, 113, 116, 131, 136, 144, 149, 200, 216, 272, 296, 344, 376, 464, 544, 576, 800, 864, 1088, 1184, 1376, 1504, 1856, 2176, 2304, 3200, 3456, 4352, 4736, 5504, 6016, 7424
Offset: 1

Views

Author

Keywords

Comments

Conjecture: the even members of this sequence are all numbers of the form
k*4^m for k in [9,17,29], m>= 1, or k*4^m for k in [34, 50, 54, 74, 86, 94], m>=0. - Robert Israel, Nov 03 2017

Crossrefs

Cf. A025367 (at least 2 ways).

Programs

  • Maple
    N:= 10000: # to get all terms <= N
    T:= Vector(N):
    for a from 1 to floor(sqrt(N/4)) do
        for b from a to floor(sqrt((N-a^2)/3)) do
          for c from b to floor(sqrt((N-a^2-b^2)/2)) do
            for d from c to floor(sqrt(N-a^2-b^2-c^2)) do
              m:= a^2+b^2+c^2+d^2;
              T[m]:= T[m]+1;
    od od od od:
    select(i -> T[i] = 2, [$1..N]); # Robert Israel, Nov 03 2017
  • Mathematica
    M = 1000;
    Clear[T]; T[_] = 0;
    For[a = 1, a <= Floor[Sqrt[M/4]], a++,
      For[b = a, b <= Floor[Sqrt[(M - a^2)/3]], b++,
        For[c = b, c <= Floor[Sqrt[(M - a^2 - b^2)/2]], c++,
          For[d = c, d <= Floor[Sqrt[M - a^2 - b^2 - c^2]], d++,
            m = a^2 + b^2 + c^2 + d^2;
            T[m] = T[m] + 1;
    ]]]];
    Select[Range[M], T[#] == 2&] (* Jean-François Alcover, Mar 22 2019, after Robert Israel *)

Formula

{n: A025428(n) = 2}. - R. J. Mathar, Jun 15 2018

A025359 Numbers that are the sum of 4 nonzero squares in exactly 3 ways.

Original entry on oeis.org

28, 42, 55, 60, 66, 67, 73, 75, 78, 79, 85, 92, 95, 99, 109, 110, 112, 121, 125, 129, 134, 137, 161, 164, 168, 173, 179, 209, 240, 264, 312, 368, 440, 448, 536, 656, 672, 960, 1056, 1248, 1472, 1760, 1792, 2144, 2624, 2688, 3840, 4224, 4992, 5888, 7040, 7168
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A025368 (at least 3 ways).

Formula

{n: A025428(n) = 3}. - R. J. Mathar, Jun 15 2018

A216374 Number of ways to express the square of the n-th prime as the sum of four nonzero squares.

Original entry on oeis.org

1, 0, 1, 2, 3, 5, 7, 9, 13, 20, 23, 32, 38, 42, 50, 63, 77, 83, 99, 111, 117, 137, 150, 172, 204, 221, 230, 247, 257, 275, 347, 368, 402, 414, 475, 488, 527, 567, 595, 638, 682, 698, 776, 792, 825, 842, 945, 1055, 1092, 1112, 1150, 1210, 1230, 1333, 1397, 1463, 1530, 1553, 1622, 1668, 1692, 1813, 1989, 2041
Offset: 1

Views

Author

Mark Underwood, Sep 05 2012

Keywords

Comments

The simple counting and the conjectured first formula agree for all the primes from 3 to 997. The counting and the conjectured second formula agree for all the primes from 5 to 997. The author of this sequence would like to know whether the formulas are already known and/or how it could be proved.
I suspect Jacobi's theorem will suffice. - Charles R Greathouse IV, Sep 30 2012

Examples

			prime(n)'s are 2, 3, 5, 7, 11, 13, 17, ... giving the sequence 1, 0, 1, 2, 3, 5, 7, ...
		

Crossrefs

Programs

  • PARI
    forprime(p=2,1000, k=0; for(s1=1,sqrt((p^2)/4),for(s2=s1,sqrt((p^2 - s1^2)/3), for(s3=s2,sqrt((p^2-s1^2 - s2^2)/2), if(issquare(p^2-s1^2-s2^2-s3^2),k++)))) ; f = floor((p^2+4*p+24)/48.) ; f2 = (p^2 + 4*p + (19*(5*(p%48)+2)^2)%48 - 24)/48 ;                 print1([p,k,f,f2]" "))
    /* code above prints [p, k, f, f2] where p is the prime, k is the number of ways the square of p can be expressed as the sum of four nonzero squares, and f and f2 are the formulas derivations. f and k are observed to be the same for p from 3 to 997; f2 and k are observed to be the same for p from 5 to 997. */
    
  • PARI
    A216374(n)=sum(s1=1,.5*n=prime(n+1),my(t);sum(s2=s1,sqrtint((n^2-s1^2)\3),sum(s3=s2,sqrtint((t=n^2-s1^2-s2^2)\2),issquare(t-s3^2)))) \\ M. F. Hasler, Sep 11 2012

Formula

a(n) = floor((prime(n)^2 + 4*prime(n) + 24)/48) (conjectured for n>1).
a(n) = (prime(n)^2 + 4*prime(n) + (19*(5*(prime(n) mod 48)+2)^2) mod 48 - 24)/48 (conjectured for n>2).
a(n) = A025428(A001248(n)), where A001248(n) = A000040(n)^2 = prime(n)^2. - M. F. Hasler, Sep 10 2012
Previous Showing 21-30 of 40 results. Next