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-6 of 6 results.

A181787 Number of solutions to n^2 = a^2 + b^2 + c^2 with positive a, b, c.

Original entry on oeis.org

0, 0, 0, 3, 0, 0, 3, 6, 0, 12, 0, 9, 3, 6, 6, 15, 0, 9, 12, 15, 0, 33, 9, 18, 3, 12, 6, 39, 6, 18, 15, 24, 0, 48, 9, 30, 12, 24, 15, 45, 0, 27, 33, 33, 9, 60, 18, 36, 3, 48, 12, 60, 6, 36, 39, 45, 6, 78, 18, 45, 15, 42, 24, 114, 0, 36, 48, 51, 9, 93, 30, 54, 12, 51, 24, 87, 15, 87, 45, 60, 0, 120, 27, 63, 33, 51, 33, 105, 9, 63, 60, 84, 18, 123, 36, 75, 3, 69, 48, 165, 12
Offset: 0

Views

Author

T. D. Noe, Nov 12 2010

Keywords

Comments

Note that a(n)=0 for n=0 and the n in A094958.

Examples

			a(3)=3 because 3^2 = 1^2+2^2+2^2 = 2^2+1^2+2^2 = 2^2+2^2+1^2. - _Robert Israel_, Aug 02 2019
		

Crossrefs

Programs

  • Maple
    N:= 200: # for a(0)..a(N)
    A:= Array(0..N):
    mults:= [1,3,6]:
    for a from 1 while 3*a^2 <= N^2 do
      if a::odd then b0:= a+1; db:= 2 else b0:= a; db:= 1 fi;
      for b from b0 by db while a^2 + 2*b^2 <= N^2 do
        if (a+b)::odd then c0:= b + (b mod 2); dc:= 2 else c0:= b; dc:= 1 fi;
        for c from c0 by dc do
          v:= a^2 + b^2 + c^2;
          if v > N^2 then break fi;
          if issqr(v) then
            w:= sqrt(v);
            A[w]:= A[w]+ mults[nops({a,b,c})];
          fi
    od od od:
    convert(A,list); # Robert Israel, Aug 02 2019
  • Mathematica
    nn=100; t=Table[0,{nn}]; Do[n=Sqrt[a^2+b^2+c^2]; If[n<=nn && IntegerQ[n], t[[n]]++], {a,nn}, {b,nn}, {c,nn}]; Prepend[t,0]

Formula

a(n) = A063691(n^2). - Michel Marcus, Apr 25 2015
a(2*n) = a(n). - Robert Israel, Aug 02 2019

A181788 Number of solutions to n^2 = a^2 + b^2 + c^2 with nonnegative a, b, c.

Original entry on oeis.org

1, 3, 3, 6, 3, 9, 6, 9, 3, 15, 9, 12, 6, 15, 9, 24, 3, 18, 15, 18, 9, 36, 12, 21, 6, 27, 15, 42, 9, 27, 24, 27, 3, 51, 18, 39, 15, 33, 18, 54, 9, 36, 36, 36, 12, 69, 21, 39, 6, 51, 27, 69, 15, 45, 42, 54, 9, 81, 27, 48, 24, 51, 27, 117, 3, 63, 51, 54, 18, 96, 39, 57, 15, 60, 33, 102, 18, 90, 54, 63, 9, 123, 36, 66, 36, 78, 36, 114, 12, 72, 69, 93, 21, 126, 39, 84, 6, 78, 51, 168, 27
Offset: 0

Views

Author

T. D. Noe, Nov 12 2010

Keywords

Crossrefs

Programs

  • Mathematica
    nn=100; t=Table[0,{nn}]; Do[n=Sqrt[a^2+b^2+c^2]; If[n<=nn && IntegerQ[n], t[[n]]++], {a,0,nn}, {b,0,nn}, {c,0,nn}]; Prepend[t,1]
  • PARI
    {a(n)=local(G=sum(k=0,n,x^(k^2)+x*O(x^(n^2))));polcoeff(G^3,n^2)} /* Paul D. Hanna */
    
  • PARI
    A(n)=my(G=sum(k=0,n,x^(k^2),x*O(x^(n^2)))^3); vector(n+1, k, polcoeff(G,(k-1)^2)) \\ Charles R Greathouse IV, Apr 20 2012

Formula

G.f.: [x^(n^2)] G(x)^3 where G(x) = Sum_{k>=0} x^(k^2); the notation [x^(n^2)] G(x)^3 denotes the coefficient of x^(n^2) in G(x)^3. [From Paul D. Hanna, Apr 20 2012]

A225206 Number of Pythagorean quadruples (a, b, c, d) with d < 10^n.

Original entry on oeis.org

6, 571, 56268, 5614390, 561232920, 56120665334, 5612026652893, 561202243017532, 56120219419339591
Offset: 1

Views

Author

Arkadiusz Wesolowski, May 01 2013

Keywords

Comments

a(n) ~ Pi*A225207(n)/(1+G), where G is Catalan's constant (A006752).

Examples

			a(1) = 6 because there are six solutions (a, b, c, d) as follows: (1, 2, 2, 3), (2, 4, 4, 6), (2, 3, 6, 7), (1, 4, 8, 9), (3, 6, 6, 9), (4, 4, 7, 9) with d < 10.
		

Crossrefs

Formula

a(n) = Sum_{k=1..10^n-1} A181786(k). - Max Alekseyev, Feb 28 2023

Extensions

a(4) from Giovanni Resta, May 01 2013
a(5)-a(9) from Max Alekseyev, Feb 28 2023

A208882 Number of representations of square of prime(n) as a^2 + b^2 + c^2 with 0 < a <= b <= c.

Original entry on oeis.org

0, 1, 0, 1, 2, 1, 2, 3, 3, 3, 4, 4, 5, 6, 6, 6, 8, 7, 9, 9, 9, 10, 11, 11, 12, 12, 13, 14, 13, 14, 16, 17, 17, 18, 18, 19, 19, 21, 21, 21, 23, 22, 24, 24, 24, 25, 27, 28, 29, 28, 29, 30, 30, 32, 32, 33, 33, 34, 34, 35, 36, 36, 39, 39, 39, 39, 42, 42, 44, 43, 44
Offset: 1

Views

Author

Zak Seidov, Mar 02 2012

Keywords

Comments

Almost monotonically increasing sequence, only rarely a(n) <= a(n-1), contrary to case of n instead of prime(n) (A181786).

Examples

			a(2)=1 because prime(2)=3 and 3^2 = 1^2 + 2^2 + 2^2,
a(4)=1 because prime(4)=7 and 7^2 = 2^2 + 3^2 + 6^2,
a(5)=2 because prime(5)=11 and 11^2 = 2^2 + 6^2 + 9^2 = 6^2 + 6^2 + 7^2.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[FindInstance[{Prime[n]^2==a^2+b^2+c^2,0Harvey P. Dale, Mar 06 2020 *)

A210311 Primes that can be represented exactly in one way as a^2 + b^2 + c^2, 0 < a <= b <= c.

Original entry on oeis.org

3, 11, 17, 19, 29, 43, 53, 61, 67, 73, 97, 109, 157, 163, 193, 277, 397
Offset: 1

Views

Author

Zak Seidov, Mar 20 2012

Keywords

Comments

Note that there are no primes = 7 mod 8.
This sequence is probably complete. Is there a proof?
There are no more terms < 10^7. - Donovan Johnson, Mar 22 2012

Examples

			{p,a,b,c}: {3,1,1,1}, {11,1,1,3}, {17,2,2,3}, {19,1,3,3}, {29,2,3,4}, {43,3,3,5}, {53,1,4,6}, {61,3,4,6}, {67,3,3,7}, {73,1,6,6}, {97,5,6,6}, {109,3,6,8}, {157,2,3,12}, {163,1,9,9}, {193,6,6,11}, {277,4,6,15}, {397,3,8,18}.
		

Crossrefs

A210338 Primes that can be represented exactly in two ways as a^2 + b^2 + c^2, 0 < a <= b <= c.

Original entry on oeis.org

41, 59, 83, 107, 113, 137, 139, 181, 197, 211, 229, 283, 307, 313, 317, 331, 337, 373, 379, 421, 457, 499, 541, 547, 577, 613, 643, 709, 757, 853, 877, 883, 907, 1093, 1213
Offset: 1

Views

Author

Zak Seidov, Mar 20 2012

Keywords

Comments

This sequence is probably complete. Is there a proof of this?
There are no more terms < 10^7. - Donovan Johnson, Mar 22 2012

Examples

			{p,a,b,c}:
{41,1,2,6}, {41,3,4,4}
{59,1,3,7}, {59,3,5,5}
{83,1,1,9}, {83,3,5,7}
{107,1,5,9}, {107,3,7,7}.
		

Crossrefs

Showing 1-6 of 6 results.