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

A074590 Number of primitive solutions to n = x^2 + y^2 + z^2 (i.e., with gcd(x,y,z) = 1).

Original entry on oeis.org

1, 6, 12, 8, 0, 24, 24, 0, 0, 24, 24, 24, 0, 24, 48, 0, 0, 48, 24, 24, 0, 48, 24, 0, 0, 24, 72, 24, 0, 72, 48, 0, 0, 48, 48, 48, 0, 24, 72, 0, 0, 96, 48, 24, 0, 48, 48, 0, 0, 48, 72, 48, 0, 72, 72, 0, 0, 48, 24, 72, 0, 72, 96, 0, 0, 96, 96, 24, 0, 96, 48, 0, 0, 48, 120
Offset: 0

Views

Author

N. J. A. Sloane, Dec 03 2002

Keywords

Examples

			G.f. = 1 + 6*x + 12*x^2 + 8*x^3 + 24*x^5 + 24*x^6 + 24*x^9 + 24*x^10 + 24*x^11 + ...
		

References

  • See A005875 for references.
  • E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 54.

Crossrefs

Cf. A005875 (all solutions).

Programs

  • Mathematica
    a[n_] := (r = Reduce[ GCD[x, y, z] == 1 && n == x^2 + y^2 + z^2, {x, y, z}, Integers]; If[ r === False, 0, Length[ {ToRules[r]} ] ] ); a[0] = 1; Table[ a[n], {n, 0, 100}] (* Jean-François Alcover, Jan 13 2012 *)
    a[ n_] := If[ n < 1, Boole[n == 0], Length @ Select[ {x, y, z} /. FindInstance[ n == x^2 + y^2 + z^2, {x, y, z}, Integers, 10^9], 1 == GCD @@ # &]]; (* Michael Somos, May 21 2015 *)

Formula

n is representable as the sum of 3 squares if and only if n is not of the form 4^a (8k + 7) (cf. A000378).
A005875(n) = Sum_{d^2|n} a(n/d^2).
Let h = number of classes of primitive binary quadratic forms, corresponding to the discriminant D = -n if n = 3 (mod 8), D = -4n if n = 1, 2, 5, 6 (mod 8) and let d_1 = 1/2, d_3 = 1/3, d_n = 1 otherwise. Then a(n) = 12 h d_n, if n = 1, 2, 5, 6 (mod 8), 24 h d_n, if n = 3 (mod 8). (Grosswald)
Also, if n is squarefree and (r/n) is the Jacobi symbol, a(n) = 24 sum(r = 1, [n/4], (r/n)) if n = 1 (mod 4), 8 sum(r = 1, [n/2], (r/n)) if n = 3 (mod 8). (Grosswald)

Extensions

More terms from Vladeta Jovovic, Dec 04 2002

A133104 Number of partitions of n^4 into n nonzero squares.

Original entry on oeis.org

1, 0, 3, 1, 49, 732, 9659, 190169, 3225654, 61896383, 1360483727, 30969769918, 778612992660, 20749789703573, 579672756740101, 17115189938667708, 525530773660159970, 16825686497823918869, 561044904645283065043, 19368002907483932784642
Offset: 1

Views

Author

Hugo Pfoertner, Sep 11 2007

Keywords

Examples

			a(3)=3 because there are 3 ways to express 3^4 = 81 as a sum of 3 nonzero squares: 81 = 1^2 + 4^2 + 8^2 = 3^2 + 6^2 + 6^2 = 4^2 + 4^2 + 7^2.
a(4)=1 because the only way to express 4^4 = 256 as a sum of 4 nonzero squares is 256 = 8^2 + 8^2 + 8^2 + 8^2.
		

Crossrefs

Cf. A133105 (number of ways to express n^4 as a sum of n distinct nonzero squares), A133103 (number of ways to express n^3 as a sum of n nonzero squares).

Programs

  • PARI
    a(i, n, k)=local(s, j); if(k==1, if(issquare(n), return(1), return(0)), s=0; for(j=ceil(sqrt(n/k)), min(i, floor(sqrt(n-k+1))), s+=a(j, n-j^2, k-1)); return(s)) for(n=1,50, m=n^4; k=n; print1(a(m, m, k)", ") ) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), Dec 16 2007

Extensions

a(9) from Herman Jamke (hermanjamke(AT)fastmail.fm), Dec 16 2007
a(10) onwards from Robert Gerbicz, May 09 2008

A255844 a(n) = 2*n^2 + 6.

Original entry on oeis.org

6, 8, 14, 24, 38, 56, 78, 104, 134, 168, 206, 248, 294, 344, 398, 456, 518, 584, 654, 728, 806, 888, 974, 1064, 1158, 1256, 1358, 1464, 1574, 1688, 1806, 1928, 2054, 2184, 2318, 2456, 2598, 2744, 2894, 3048, 3206, 3368, 3534, 3704, 3878, 4056, 4238, 4424, 4614
Offset: 0

Views

Author

Avi Friedlich, Mar 08 2015

Keywords

Comments

This is the case k=3 of the form (n + sqrt(k))^2 + (n - sqrt(k))^2. Also, it is noted that a(n)*n = (n + 1)^3 + (n - 1)^3.
Equivalently, numbers m such that 2*m-12 is a square.
For n = 0..16, 3*a(n)-1 is prime (see A087370); for n = 0..12, 3*a(n)-5 is prime (see A107303).

Crossrefs

Cf. A016825 (first differences), A087370, A107303, A114949, A117950.
Cf. A152811: nonnegative numbers of the form 2*m^2-6.
Subsequence of A000378.
Cf. similar sequences listed in A255843.

Programs

  • Magma
    [2*n^2+6: n in [0..50]];
  • Mathematica
    Table[2 n^2 + 6, {n, 0, 50}]
  • PARI
    vector(50, n, n--; 2*n^2+6)
    
  • Sage
    [2*n^2+6 for n in (0..50)]
    

Formula

G.f.: 2*(3-5*x+4*x^2)/(1 - x)^3.
a(n) = a(-n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = 2*A117950(n).
From Amiram Eldar, Mar 28 2023: (Start)
Sum_{n>=0} 1/a(n) = (1 + sqrt(3)*Pi*coth(sqrt(3)*Pi))/12.
Sum_{n>=0} (-1)^n/a(n) = (1 + (sqrt(3)*Pi)*cosech(sqrt(3)*Pi))/12. (End)
E.g.f.: 2*exp(x)*(3 + x + x^2). - Elmo R. Oliveira, Jan 25 2025

Extensions

Corrected and extended by Bruno Berselli, Mar 11 2015

A294712 Numbers that are the sum of three squares (square 0 allowed) in exactly nine ways.

Original entry on oeis.org

425, 521, 545, 569, 614, 650, 701, 725, 729, 774, 809, 810, 845, 857, 953, 974, 989, 990, 1053, 1062, 1070, 1074, 1091, 1118, 1134, 1139, 1166, 1179, 1217, 1249, 1251, 1262, 1266, 1277, 1298, 1310, 1418, 1446, 1458, 1470, 1525, 1541, 1546, 1571, 1594, 1611
Offset: 1

Views

Author

Robert Price, Nov 07 2017

Keywords

Comments

These are the numbers for which A000164(a(n)) = 9.
a(n) is the n-th largest number which has a representation as a sum of three integer squares (square 0 allowed), in exactly nine ways, if neither the order of terms nor the signs of the numbers to be squared are taken into account. The multiplicity of a(n) with order and signs taken into account is A005875(a(n)).
This sequence is a proper subsequence of A000378.

Examples

			545 =  8^2 + 15^2 + 16^2
    =  0^2 + 16^2 + 17^2
    = 10^2 + 11^2 + 18^2
    =  5^2 + 14^2 + 18^2
    =  8^2 +  9^2 + 20^2
    =  1^2 + 12^2 + 20^2
    =  2^2 + 10^2 + 21^2
    =  5^2 +  6^2 + 22^2
    =  0^2 +  4^2 + 23^2. - _Robert Israel_, Nov 08 2017
		

Crossrefs

Programs

  • Maple
    N:= 10000: # to get all terms <= N
    V:= Array(0..N):
    for i from 0 to isqrt(N) do
      for j from 0 to i while i^2 + j^2 <= N do
        for k from 0 to j while i^2 + j^2 + k^2 <= N do
          t:= i^2 + j^2 + k^2;
          V[t]:= V[t]+1;
    od od od:
    select(t -> V[t] = 9, [$1..N]); # Robert Israel, Nov 08 2017
  • Mathematica
    Select[Range[0, 1000], Length[PowersRepresentations[#, 3, 2]] == 9 &]

Extensions

Updated Mathematica program to Version 11. by Robert Price, Nov 01 2019

A309779 Squares that can be expressed as the sum of two positive squares but not as the sum of three positive squares.

Original entry on oeis.org

25, 100, 400, 1600, 6400, 25600, 102400, 409600, 1638400, 6553600, 26214400, 104857600, 419430400, 1677721600, 6710886400, 26843545600, 107374182400, 429496729600, 1717986918400, 6871947673600, 27487790694400, 109951162777600, 439804651110400, 1759218604441600
Offset: 1

Views

Author

Bernard Schott, Aug 17 2019

Keywords

Comments

This sequence comes from the study of A309778, exactly, A309778(n) = 2 iff n^2 belongs to this sequence here.
According to Draxl link, a(n) is a term of this sequence iff a(n) = 5^2 * 4^(n-1) with n >= 1.
This sequence is a subsequence of A219222 whose terms are all of the form b_0 * 4^k with b_0 in A051952, hence, the only primitive term of this sequence here is 25.

Examples

			25 = 5^2 = 3^2 + 4^2,
100 = 10^2 = 6^2 + 8^2,
5^2 * 4^(n-1) = (5 * 2^(n-1))^2 = (3 * 2^(n-1))^2 + (4 * 2^(n-1))^2, but these terms are not the sum of three positive squares.
		

Crossrefs

Intersection of A000290 and A219222.

Programs

Formula

a(n) = 5^2 * 4^(n-1) with n >= 1.
a(n) = 4*a(n-1) for n > 1. G.f.: 25*x/(1 - 4*x). - Chai Wah Wu, Aug 29 2019
a(n) = 25 * A000302(n-1). - Alois P. Heinz, Aug 29 2019
E.g.f.: 25*(exp(4*x) - 1)/4. - Stefano Spezia, Oct 28 2023

A166265 Numbers of the form 1+x^2+y^2, x, y integers >= 1.

Original entry on oeis.org

3, 6, 9, 11, 14, 18, 19, 21, 26, 27, 30, 33, 35, 38, 41, 42, 46, 51, 53, 54, 59, 62, 66, 69, 73, 74, 75, 81, 83, 86, 90, 91, 98, 99, 101, 102, 105, 107, 110, 114, 117, 118, 123, 126, 129, 131, 137, 138, 146, 147, 149, 150, 154, 158, 161, 163, 165, 170, 171, 174, 179, 181, 182
Offset: 1

Views

Author

N. J. A. Sloane, Mar 05 2010

Keywords

Crossrefs

Programs

  • Mathematica
    With[{nn=40},Take[Union[Total/@Tuples[Range[nn]^2,2]+1],2*nn]] (* Harvey P. Dale, Mar 12 2015 *)

A173256 Partial sums of A001481.

Original entry on oeis.org

0, 1, 3, 7, 12, 20, 29, 39, 52, 68, 85, 103, 123, 148, 174, 203, 235, 269, 305, 342, 382, 423, 468, 517, 567, 619, 672, 730, 791, 855, 920, 988, 1060, 1133, 1207, 1287, 1368, 1450, 1535, 1624, 1714, 1811, 1909, 2009, 2110, 2214, 2320, 2429, 2542, 2658, 2775
Offset: 1

Views

Author

Jonathan Vos Post, Feb 14 2010

Keywords

Comments

The subsequence of primes in this sequence begins 3, 7, 29, 103, 269, 619, 1811, 3271.

Examples

			a(66) = 0 + 1 + 2 + 4 + 5 + 8 + 9 + 10 + 13 + 16 + 17 + 18 + 20 + 25 + 26 + 29 + 32 + 34 + 36 + 37 + 40 + 41 + 45 + 49 + 50 + 52 + 53 + 58 + 61 + 64 + 65 + 68 + 72 + 73 + 74 + 80 + 81 + 82 + 85 + 89 + 90 + 97 + 98 + 100 + 101 + 104 + 106 + 109 + 113 + 116 + 117 + 121 + 122 + 125 + 128 + 130 + 136 + 137 + 144 + 145 + 146 + 148 + 149 + 153 + 157 + 160 = 4876.
		

Crossrefs

Programs

  • Maple
    N:= 1000:
    A001481:= sort(convert({seq(seq(x^2+y^2, y=0..floor(sqrt(N-x^2))),x=0..floor(sqrt(N)))},list)):
    ListTools:-PartialSums(A001481); # Robert Israel, Mar 15 2016
  • Python
    from itertools import count, accumulate, islice
    from sympy import factorint
    def A173256_gen(): # generator of terms
        return accumulate(filter(lambda n:all(p & 3 != 3 or e & 1 == 0 for p, e in factorint(n).items()),count(0)))
    A173256_list = list(islice(A173256_gen(),30)) # Chai Wah Wu, Jun 27 2022

Formula

a(n) = Sum_{i=1..n} A001481(i) = Sum_{i=1..n} (numbers that are the sum of 2 nonnegative squares) = Sum_{i=1..n} (numbers n such that i = x^2 + y^2 has a solution in nonnegative integers x, y).

Extensions

a(21) corrected by Robert Israel, Mar 15 2016

A294713 Numbers that are the sum of three squares (square 0 allowed) in exactly ten ways.

Original entry on oeis.org

594, 626, 629, 734, 846, 914, 926, 929, 1001, 1026, 1041, 1097, 1125, 1190, 1193, 1209, 1214, 1229, 1241, 1265, 1289, 1326, 1329, 1382, 1386, 1409, 1433, 1490, 1505, 1509, 1521, 1530, 1581, 1637, 1689, 1691, 1713, 1725, 1730, 1739, 1749, 1754, 1770, 1778
Offset: 1

Views

Author

Robert Price, Nov 07 2017

Keywords

Comments

These are the numbers for which A000164(a(n)) = 10.
a(n) is the n-th largest number which has a representation as a sum of three integer squares (square 0 allowed), in exactly ten ways, if neither the order of terms nor the signs of the numbers to be squared are taken into account. The multiplicity of a(n) with order and signs taken into account is A005875(a(n)).
This sequence is a proper subsequence of A000378.

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 1000], Length[PowersRepresentations[#, 3, 2]] == 10 &]

Extensions

Updated Mathematica program to Version 11. by Robert Price, Nov 01 2019

A302359 Numbers that are the sum of 3 squares > 1.

Original entry on oeis.org

12, 17, 22, 24, 27, 29, 33, 34, 36, 38, 41, 43, 44, 45, 48, 49, 50, 54, 56, 57, 59, 61, 62, 65, 66, 67, 68, 69, 70, 72, 74, 75, 76, 77, 78, 81, 82, 83, 84, 86, 88, 89, 90, 93, 94, 96, 97, 98, 99, 101, 102, 104, 105, 106, 107, 108, 109, 110, 113, 114, 115, 116, 117, 118, 120, 121, 122, 123, 125, 126, 129
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 06 2018

Keywords

Examples

			33 is in the sequence because 33 = 2^2 + 2^2 + 5^2.
		

Crossrefs

Programs

  • Mathematica
    max = 130; f[x_] := Sum[x^(k^2), {k, 2, 20}]^3; Exponent[#, x] & /@ List @@ Normal[Series[f[x], {x, 0, max}]]
    With[{nn=15},Select[Union[Total/@Tuples[Range[2,nn]^2,3]],#<=nn^2+8&]] (* Harvey P. Dale, Jul 05 2021 *)
  • Python
    from itertools import count, takewhile, combinations_with_replacement as mc
    def aupto(N):
        sqrs = list(takewhile(lambda x: x<=N, (i**2 for i in count(2))))
        sum3 = set(sum(c) for c in mc(sqrs, 3) if sum(c) <= N)
        return sorted(sum3)
    print(aupto(129)) # Michael S. Branicky, Dec 17 2021

A347360 Numbers that can be represented as the sum of squares of 3 numbers and also equal to twice the sum of their joint products.

Original entry on oeis.org

18, 72, 98, 162, 288, 338, 392, 450, 648, 722, 882, 1152, 1352, 1458, 1568, 1800, 1922, 2178, 2450, 2592, 2738, 2888, 3042, 3528, 3698, 4050, 4608, 4802, 5202, 5408, 5832, 6272, 6498, 7200, 7442, 7688, 7938, 8450, 8712, 8978, 9522, 9800, 10368, 10658, 10952, 11250, 11552, 11858
Offset: 1

Views

Author

Alexander Kritov, Sep 22 2021

Keywords

Comments

Integers that can be represented as the sum of three squares of integers x, y, z, and additionally also satisfy x^2+y^2+z^2 = k *(x*y+ x*z + y*z), with k=2.
All possible k are given by A331605.

Examples

			For example, the third term (1,4,9) is 1^2+4^2+9^2 = 2*(1*4+1*9+4*9) = 98.
The sequence is given by
   a(n)    (x, y, z)
    18     (1,1,4)
    72     (2,2,8)
    98     (1,4,9)
   162     (3,3,12)
   288     (4,4,16)
   338     (1,9,16)
   392     (2,8,18)
   450     (5,5,20)
   648     (6,6,24)
   722     (4,9,25)
   882     (1,16,25) (3,12,27)  (7,7,28)
  1152     (8,8,32)  (2,18,32)
  1352     (2,18,32)
  1458     (9,9,36)
  1568     (4,16,36)
  1800     (10,10,40)
  1922     (1,25,36)
  2178     (11,11,44)
  2450     (5,20,45)
  2592     (12,12,48)
  2738     (9,16,49)
  2888     (8,18,50)
  3042     (3,27,48) (4,25,49) (13,13,52)
  3528     (2,32,50) (6,24,54)
		

References

  • E. Grosswald, Representations of Integers as Sums of Squares, Springer-Verlag, NY, 1985.

Crossrefs

Subsequence of A000378. Complement of A004215.
Cf. A033428 (case k=1), A324929, A331605 (k-numbers).

Programs

  • Mathematica
    q[n_] := (s = Select[PowersRepresentations[n,3,2], AllTrue[#, #1 > 0 &]&]) != {} && MemberQ[(#[[1]]*#[[2]] + #[[2]]*#[[3]] + #[[3]]*#[[1]])& /@ s, n/2]; Select[Range[2, 12000, 2], q] (* Amiram Eldar, Oct 03 2021 *)

Formula

Empirically, such numbers appear to be a(n) = 2*b_n^2 where b_n are numbers whose product of prime indices is even (A324929).The triplet (x,y,x) is always (n*k^2, n*m^2, n*p^2).
Previous Showing 41-50 of 55 results. Next