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 41-50 of 52 results. Next

A003386 Numbers that are the sum of 8 nonzero 8th powers.

Original entry on oeis.org

8, 263, 518, 773, 1028, 1283, 1538, 1793, 2048, 6568, 6823, 7078, 7333, 7588, 7843, 8098, 8353, 13128, 13383, 13638, 13893, 14148, 14403, 14658, 19688, 19943, 20198, 20453, 20708, 20963, 26248, 26503, 26758, 27013, 27268, 32808, 33063, 33318, 33573
Offset: 1

Views

Author

Keywords

Comments

As the order of addition doesn't matter we can assume terms are in nondecreasing order. - David A. Corneth, Aug 01 2020

Examples

			From _David A. Corneth_, Aug 01 2020: (Start)
9534597 is in the sequence as 9534597 = 2^8 + 3^8 + 3^8 + 3^8 + 5^8 + 6^8 + 6^8 + 7^8.
13209988 is in the sequence as 13209988 = 1^8 + 1^8 + 2^8 + 2^8 + 2^8 + 6^8 + 7^8 + 7^8.
19046628 is in the sequence as 19046628 = 2^8 + 2^8 + 3^8 + 4^8 + 6^8 + 7^8 + 7^8 + 7^8. (End)
		

Crossrefs

A###### (x, y): Numbers that are the form of x nonzero y-th powers.
Cf. A000404 (2, 2), A000408 (3, 2), A000414 (4, 2), A003072 (3, 3), A003325 (3, 2), A003327 (4, 3), A003328 (5, 3), A003329 (6, 3), A003330 (7, 3), A003331 (8, 3), A003332 (9, 3), A003333 (10, 3), A003334 (11, 3), A003335 (12, 3), A003336 (2, 4), A003337 (3, 4), A003338 (4, 4), A003339 (5, 4), A003340 (6, 4), A003341 (7, 4), A003342 (8, 4), A003343 (9, 4), A003344 (10, 4), A003345 (11, 4), A003346 (12, 4), A003347 (2, 5), A003348 (3, 5), A003349 (4, 5), A003350 (5, 5), A003351 (6, 5), A003352 (7, 5), A003353 (8, 5), A003354 (9, 5), A003355 (10, 5), A003356 (11, 5), A003357 (12, 5), A003358 (2, 6), A003359 (3, 6), A003360 (4, 6), A003361 (5, 6), A003362 (6, 6), A003363 (7, 6), A003364 (8, 6), A003365 (9, 6), A003366 (10, 6), A003367 (11, 6), A003368 (12, 6), A003369 (2, 7), A003370 (3, 7), A003371 (4, 7), A003372 (5, 7), A003373 (6, 7), A003374 (7, 7), A003375 (8, 7), A003376 (9, 7), A003377 (10, 7), A003378 (11, 7), A003379 (12, 7), A003380 (2, 8), A003381 (3, 8), A003382 (4, 8), A003383 (5, 8), A003384 (6, 8), A003385 (7, 8), A003387 (9, 8), A003388 (10, 8), A003389 (11, 8), A003390 (12, 8), A003391 (2, 9), A003392 (3, 9), A003393 (4, 9), A003394 (5, 9), A003395 (6, 9), A003396 (7, 9), A003397 (8, 9), A003398 (9, 9), A003399 (10, 9), A004800 (11, 9), A004801 (12, 9), A004802 (2, 10), A004803 (3, 10), A004804 (4, 10), A004805 (5, 10), A004806 (6, 10), A004807 (7, 10), A004808 (8, 10), A004809 (9, 10), A004810 (10, 10), A004811 (11, 10), A004812 (12, 10), A004813 (2, 11), A004814 (3, 11), A004815 (4, 11), A004816 (5, 11), A004817 (6, 11), A004818 (7, 11), A004819 (8, 11), A004820 (9, 11), A004821 (10, 11), A004822 (11, 11), A004823 (12, 11), A047700 (5, 2).

Programs

  • Mathematica
    M = 92646056; m = M^(1/8) // Ceiling; Reap[
    For[a = 1, a <= m, a++, For[b = a, b <= m, b++, For[c = b, c <= m, c++,
    For[d = c, d <= m, d++, For[e = d, e <= m, e++, For[f = e, f <= m, f++,
    For[g = f, g <= m, g++, For[h = g, h <= m, h++,
    s = a^8 + b^8 + c^8 + d^8 + e^8 + f^8 + g^8 + h^8;
    If[s <= M, Sow[s]]]]]]]]]]][[2, 1]] // Union (* Jean-François Alcover, Dec 01 2020 *)

Extensions

b-file checked by R. J. Mathar, Aug 01 2020
Incorrect program removed by David A. Corneth, Aug 01 2020

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

A145202 Primes of form 4*n^2 + 4*n + 653.

Original entry on oeis.org

653, 661, 677, 701, 733, 773, 821, 877, 941, 1013, 1093, 1181, 1277, 1381, 1493, 1613, 1741, 1877, 2333, 2677, 2861, 3253, 3461, 3677, 4133, 4373, 4621, 4877, 5413, 5693, 5981, 6277, 6581, 7213, 7541, 7877, 8221, 8573, 8933, 9677, 10061, 10453, 10853
Offset: 1

Views

Author

Klaus Brockhaus, Oct 04 2008

Keywords

Comments

First 18 terms are for n from 0 through 17, next terms are for n = 20, 22, 23, 25, 26, 27, 29, 30, 31, 32, 34, 35, 36, 37, 38, 40, ...
The sequence of n such that 4*n^2 + 4*n + 653 is composite starts 18, 19, 21, 24, 28, 33, 39, 46, 54, 60, 61, 62, 63, 65, 67, 72, 73, 75, 81, 82, 84, 85, 86, 93, 95, 96, 100, ...
These primes are in A000414. [Bruno Berselli, Apr 20 2014]

Examples

			a(18) = 4*17^2 + 4*17 + 653 = 1877.
		

Crossrefs

A145125 is essentially the same sequence.
Cf. A005846 (primes of form n^2 + n + 41).

Programs

  • Magma
    [a: n in [0..100] | IsPrime(a) where a is  4*n^2 + 4*n + 653]; // Vincenzo Librandi, Apr 21 2014
  • Mathematica
    Select[Table[4 n^2 + 4 n + 653, {n, 0, 100}], PrimeQ] (* Vincenzo Librandi, Apr 21 2014 *)
  • PARI
    {for(n=0, 50, if(isprime(p=4*n^2+4*n+653), print1(p, ",")))}
    

A347803 Expansion of ( Sum_{k>=0} k^2 * q^(k^2) )^4.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 16, 0, 0, 96, 0, 36, 256, 0, 432, 256, 0, 1728, 64, 486, 2304, 768, 3888, 0, 3072, 7776, 1728, 7112, 0, 13824, 12864, 0, 27648, 6336, 15552, 9261, 18688, 62208, 21744, 24576, 0, 72576, 51456, 24300, 117504, 38400, 101088, 9216, 93184, 155520, 86400, 142382, 62208, 352512, 67344, 0, 202752, 286176
Offset: 0

Views

Author

Seiichi Manyama, Sep 14 2021

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(i=1, n, sum(j=1, n, sum(k=1, n, sum(m=1, n, (i^2+j^2+k^2+m^2==n)*(i*j*k*m)^2))));
    
  • PARI
    my(N=66, x='x+O('x^N)); concat([0, 0, 0, 0], Vec(sum(k=0, sqrtint(N), k^2*x^k^2)^4))

Formula

a(n) is sum of i^2 * j^2 * k^2 *m^2 for positive integers i,j,k,m such that i^2+j^2+k^2+m^2=n.

A360530 a(n) is the smallest positive integer k such that n can be expressed as the arithmetic mean of k nonzero squares.

Original entry on oeis.org

1, 3, 3, 1, 2, 3, 3, 3, 1, 2, 3, 3, 2, 3, 3, 1, 2, 3, 3, 2, 4, 3, 3, 3, 1, 2, 3, 3, 2, 3, 3, 3, 3, 2, 3, 1, 2, 3, 3, 2, 2, 3, 3, 3, 2, 3, 3, 3, 1, 2, 3, 2, 2, 3, 3, 3, 3, 2, 3, 3, 2, 3, 3, 1, 2, 3, 3, 2, 4, 3, 3, 3, 2, 2, 3, 3, 4, 3, 3, 2, 1, 2, 3, 4, 2, 3, 3
Offset: 1

Views

Author

Yifan Xie, Apr 05 2023

Keywords

Comments

a(n) is the smallest number k such that n*k can be expressed as the sum of k nonzero squares.

Examples

			For n = 2, if k = 1, 2*1 = 2 is a nonsquare; if k = 2, 2*2 = 4 cannot be expressed as the sum of 2 nonzero squares; if k = 3, 2*3 = 6 = 2^2+1^2+1^2, so a(2) = 3.
		

References

  • J. H. Conway, The Sensual (Quadratic) Form, M.A.A., 1997, p. 140.

Crossrefs

Cf. A362068 (allows zeros), A362110 (distinct).

Programs

  • PARI
    findsquare(k, m) = if(k == 1, issquare(m), for(j=1, m, if(j*j+k > m, return(0), if(findsquare(k-1, m-j*j), return(1)))));
    a(n) = for(t = 1, n+1, if(findsquare(t, n*t), return(t)));

Formula

a(n) <= 4. Proof: With Lagrange's four-square theorem, if 4*n is not the sum of 4 positive squares (see A000534), then it is easy to express 3*n as the sum of 3 positive squares. - Yifan Xie and Thomas Scheuerle, Apr 29 2023

A145125 Primes of the form 4n^2-4n+653.

Original entry on oeis.org

653, 653, 661, 677, 701, 733, 773, 821, 877, 941, 1013, 1093, 1181, 1277, 1381, 1493, 1613, 1741, 1877, 2333, 2677, 2861, 3253, 3461, 3677, 4133, 4373, 4621, 4877, 5413, 5693, 5981, 6277, 6581, 7213, 7541, 7877, 8221, 8573, 8933, 9677, 10061, 10453
Offset: 1

Views

Author

Bobby Kramer (panthar1(AT)gmail.com), Oct 02 2008

Keywords

Comments

These primes are in A000414. [Bruno Berselli, Apr 20 2014]

Crossrefs

A145202 is essentially the same sequence.

Programs

  • Magma
    [ a: n in [0..900] | IsPrime(a) where a is 4*n^2-4*n+653]; // Vincenzo Librandi, Nov 25 2010
  • Mathematica
    Select[Table[4 n^2 - 4 n + 653, {n, 0, 300}], PrimeQ] (* Vincenzo Librandi, Apr 21 2014 *)

Extensions

More terms from Vincenzo Librandi, Apr 28 2010

A385531 Numbers x such that there exist three integers 00 such that sigma(x)^2 = sigma(y)^2 = sigma(z)^2 = x^2 + y^2 + z^2 + t^2.

Original entry on oeis.org

4, 6, 28, 45, 48, 60, 156, 204, 208, 360, 496, 1170, 2016, 2520, 2925, 3480, 4796, 5532, 5733, 7152, 7605, 8128, 9680, 11050, 12402, 15776, 33468, 36720, 37064, 38408, 43584, 50960, 55216, 63708, 70364, 83772, 92280, 106700, 114840, 116288, 149400, 163800, 166617, 167580
Offset: 1

Views

Author

S. I. Dimitrov, Jul 02 2025

Keywords

Comments

The numbers x, y, z and t form a sigma-quadratic quadruple. See Dimitrov link.

Examples

			(3480, 3672, 4296, 8520) is such a quadruple because sigma(3480)^2 = sigma(3672)^2 = sigma(4296)^2 = 3480^2 + 3672^2 + 4296^2 + 8520^2.
		

Crossrefs

Programs

  • PARI
    isok(x) = my(s=sigma(x), vi=select(t->(t>=x), invsigma(s))); for (i=1, #vi, for (j=1, #vi, for (k=1, #vi, if ((i==1) || (j==1) || (k==1), my(ss = s^2 - vi[i]^2 - vi[j]^2 - vi[k]^2); if (ss && issquare(ss), return(1)););););); \\ Michel Marcus, Jul 09 2025
    
  • PARI
    \\ See Corneth link

Extensions

Some missing terms added by Michel Marcus, Jul 09 2025
More terms from David A. Corneth, Jul 09 2025

A385860 a(n) is the number of distinct multisets of sides of quadrilaterals with perimeter n, where all four sides are squares.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 3, 0, 1, 1, 0, 1, 2, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 0, 2, 1, 1, 1
Offset: 0

Views

Author

Felix Huber, Jul 22 2025

Keywords

Comments

a(n) is the number of partitions of n into 4 nonzero squares < n/2.

Examples

			The a(51) = 1 multiset is [1, 9, 16, 25].
The a(52) = 3 multisets are [1, 1, 25, 25], [4, 16, 16, 16] and [9, 9, 9, 25].
		

Crossrefs

Programs

  • Maple
    # After Alois P. Heinz (A025428)
    b:=proc(n,i,t)
        option remember;
        `if`(n=0,`if`(t=0,1,0),`if`(i<1 or t<1, 0, b(n,i-1,t)+`if`(i^2>n,0,b(n-i^2,i,t-1))))
        end:
    A385860:=n->b(n,floor(sqrt((n-1)/2)),4):
    seq(A385860(n),n=0..87);

Formula

a(n) <= A025428(n).

A164098 Numbers of the form m * (k_1^2 + k_2^2 + ... + k_m^2).

Original entry on oeis.org

1, 4, 9, 10, 16, 18, 20, 25, 26, 27, 28, 33, 34, 36, 40, 42, 48, 49, 50, 51, 52, 54, 55, 57, 58, 60, 63, 64, 65, 66, 68, 70, 72, 74, 76, 78, 80, 81, 82, 84, 85, 87, 88, 90, 91, 92, 95, 99, 100, 102, 104, 105, 106, 108, 110, 112, 114, 115, 116, 120, 121, 122, 123, 124, 125
Offset: 1

Views

Author

Jonas Wallgren, Aug 10 2009, Aug 17 2009

Keywords

Comments

From Franklin T. Adams-Watters, Aug 29 2009: (Start)
The k_i must all be positive integers.
Note that every integer > 33 is the sum of 5 positive squares, and for n > 5, every integer > n+13 is the sum of n positive squares. (End)
The complement of this sequence includes: A000040, A037074, A143206, 2 * A002145, and 3 * A094712. - Robert Israel, Jan 27 2025

Examples

			34 = 2*(4^2 + 1^2), 42 = 3*(3^2 + 2^2 + 1^2), thus 34 and 42 are in the sequence.
		

Crossrefs

Programs

  • Maple
    g:= proc(y,m)
      # can we write y as sum of m positive squares?
       option remember;
       local x;
       if y < m then return false fi;
       if m = 1 then return issqr(y) fi;
       if issqr(y-m+1) then return true fi;
       for x from 1 while x^2 + m-1 < y do
         if procname(y-x^2,m-1) then return true fi
       od;
       false
    end proc:
    filter:= proc(n)
      ormap(t -> g(n/t, t), numtheory:-divisors(n))
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Jan 26 2025
  • PARI
    issumsqs(n,k) = if(n<=0||k<=0,return(k==0&&n==0)); forstep(j=sqrtint(n),max(sqrtint(n\k),1),-1,if(issumsqs(n-j^2,k-1),return(1)));0
    isa(n)=local(ds);ds=divisors(n);for(k=1,(#ds+1)\2,if(issumsqs(n\ds[k],ds[k]),return(1)));0
    for(n=1,200,if(isa(n),print1(n","))) \\ Franklin T. Adams-Watters, Aug 29 2009

Extensions

More terms from Franklin T. Adams-Watters, Aug 29 2009

A215537 Lowest k such that k is representable as both the sum of n and of n+1 nonzero squares.

Original entry on oeis.org

25, 17, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79
Offset: 1

Views

Author

Jon Perry, Aug 15 2012

Keywords

Examples

			25 = 5^2 = 3^2 + 4^2
17 = 4^2 + 1^2 = 3^2 + 2^2 + 2^2
12 = 2^2 + 2^2 + 2^2 = 3^2 + 1^2 + 1^2 + 1^2
after this just add 1^2 to both sides.
		

Crossrefs

Cf. A000290 (representable as sum of 1 square), A000404 (sum of 2 positive squares), A000408 (sum of 3 positive squares), A000414 (sum of 4 positive squares), A047700 (sum of 5 positive squares)

Programs

  • Maple
    # true if a is representable as a sum of n squares, each square >= m^2.
    isRepnSqrsMin := proc(a,n,m)
        local mpr ;
        if a < n*m^2 then
            return false;
        end if;
        if n = 1 then
            if a>= m^2 and issqr(a) then
                true;
            else
                false;
            end if;
        else
            for mpr from m to a do
                if a-mpr^2 < 1 then
                    return false;
                elif procname(a-mpr^2,n-1,mpr) then
                    return true;
                end if;
            end do:
        end if;
    end proc:
    # true if a is representable as a sum of n positive squares.
    isRepnSqrs := proc(a,n)
        isRepnSqrsMin(a,n,1) ;
    end proc:
    A215537 := proc(n)
        local k;
        for k from 1 do
            if isRepnSqrs(k,n) and isRepnSqrs(k,n+1) then
                return k;
            end if;
        end do:
    end proc: # R. J. Mathar, Sep 11 2012
Previous Showing 41-50 of 52 results. Next