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

A264010 Number of ways to write n as x^2 + y*(y+1) + z*(z+1)/2, where x, y and z are nonnegative integers such that y or y+1 is prime, and z or z+1 is prime.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 2, 2, 3, 1, 1, 4, 4, 2, 1, 5, 4, 3, 3, 1, 6, 5, 4, 4, 4, 3, 6, 5, 1, 6, 7, 5, 4, 7, 4, 4, 7, 3, 6, 5, 5, 5, 6, 5, 5, 6, 3, 6, 9, 2, 4, 10, 2, 4, 3, 5, 9, 8, 6, 3, 10, 5, 5, 4, 4, 9, 8, 5, 4, 8, 7, 8, 7, 2, 5, 10, 6, 3, 8, 4, 6, 8, 3, 10, 6, 7, 7, 6, 5, 5, 5, 2, 10, 10, 4, 4, 11, 6, 5, 6
Offset: 1

Views

Author

Zhi-Wei Sun, Oct 31 2015

Keywords

Comments

Conjectures: (i) a(n) > 0 for all n > 2, and a(n) = 1 only for n = 3, 4, 5, 6, 10, 11, 15, 20, 29, 1125.
(ii) Any integer n > 2 can be written as x*(x+1) + y*(y+1)/2 + z*(z+1)/2, where x, y and z are nonnegative integers such that x or x+1 is prime, and y or y+1 is prime.
(iii) Any integer n > 7 can be written as x*(x+1) + y*(y+1)/2 + 3*z*(z+1)/2, where x, y and z are nonnegative integers such that y or y+1 is prime, and z or z+1 is prime.
It is known that any natural number can be written as x^2 + y*(y+1)+ z*(z+1)/2 (or x*(x+1) + y*(y+1)/2 + z*(z+1)/2, or x*(x+1) + y*(y+1)/2 + 3*z(z+1)/2) with x, y and z nonnegative integers.
See also A264025 for similar conjectures.

Examples

			a(5) = 1 since 5 = 0^2 + 1*2 + 2*3/2 with 2 prime.
a(6) = 1 since 6 = 1^2 + 1*2 + 2*3/2 with 2 prime.
a(10) = 1 since 10 = 1^2 + 2*3 + 2*3/2 with 2 prime.
a(11) = 1 since 11 = 2^2 + 2*3 + 1*2/2 with 2 prime.
a(15) = 1 since 15 = 0^2 + 3*4 + 2*3/2 with 3 prime.
a(20) = 1 since 20 = 2^2 + 2*3 + 4*5/2 with 2 and 5 both prime.
a(29) = 1 since 29 = 4^2 + 3*4 + 1*2/2 with 3 and 2 both prime.
a(1125) = 1 since 1125 = 33^2 + 5*6 + 3*4/2 with 5 and 3 both prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[(PrimeQ[y]||PrimeQ[y+1])==False,Goto[aa]];Do[If[(PrimeQ[z]||PrimeQ[z+1])&&SQ[n-y(y+1)-z(z+1)/2],r=r+1],{z,1,(Sqrt[8(n-y(y+1))+1]-1)/2}];Label[aa];Continue,{y,1,(Sqrt[4n+1]-1)/2}];Print[n, " ", r];Continue, {n,1,100}]
Showing 1-1 of 1 results.