login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A216374 Number of ways to express the square of the n-th prime as the sum of four nonzero squares. 3
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

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

LINKS

Table of n, a(n) for n=1..64.

"Pythagorean ... Tuples", message #919, Unsolved Problems Yahoo Group

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)mod48)+2)^2)mod48 - 24)/48 (conjectured for n>2).

a(n)=A025428(A001248(n+1)), where A001248(n)=A000040(n)^2=prime(n)^2. - M. F. Hasler, Sep 10 2012

EXAMPLE

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

PROG

(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

CROSSREFS

Cf. A025428, A001248.

Sequence in context: A271661 A035563 A240063 * A240448 A218614 A028378

Adjacent sequences:  A216371 A216372 A216373 * A216375 A216376 A216377

KEYWORD

nonn

AUTHOR

Mark Underwood, Sep 05 2012

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 23 05:36 EDT 2019. Contains 321422 sequences. (Running on oeis4.)