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 51-60 of 70 results. Next

A301314 Number of ways to write n as x^2 + y^2 + z^2 + w^2, where w is a positive integer and x,y,z are nonnegative integers such that x + 3*y + 9*z = 2^k*m^3 for some k,m = 0,1,2,....

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 2, 1, 2, 1, 4, 4, 1, 2, 1, 3, 1, 1, 4, 2, 4, 1, 2, 3, 1, 1, 4, 2, 4, 3, 2, 5, 4, 3, 3, 7, 3, 2, 3, 1, 3, 1, 3, 6, 7, 2, 4, 7, 3, 1, 5, 2, 6, 3, 2, 7, 7, 1, 4, 9, 3, 4, 2, 5, 5, 4, 5, 4, 6, 1, 5, 5, 1, 2
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 18 2018

Keywords

Comments

Conjecture 1: a(n) > 0 for all n > 0.
Conjecture 2: Any positive integer can be written as x^2 + y^2 + z^2 + w^2, where x is a positive integer and y,z,w are nonnegative integers such that 2*x + 7*y = 2^k*m^3 for some k = 0,1,2 and m = 1,2,3,....
We have verified a(n) > 0 for all n = 1..10^7.
See also A301303 and A301304 for similar conjectures.

Examples

			a(7) = 1 since 7 = 1^2 + 2^2 + 1^2 + 1^2 with 1 + 3*2 + 9*1 = 2*2^3.
a(19) = 1 since 19 = 4^2 + 1^2 + 1^2 + 1^2 with 4 + 3*1 + 9*1 = 2*2^3.
a(46) = 1 since 46 = 0^2 + 6^2 + 1^2 + 3^2 with 0 + 3*6 + 9*1 = 3^3.
a(79) = 1 since 79 = 2^2 + 7^2 + 1^2 + 5^2 with 2 + 3*7 + 9*1 = 2^2*2^3.
a(125) = 1 since 125 = 2^2 + 0^2 + 0^2 + 11^2 with 2 + 3*0 + 9*0 = 2*1^3.
a(736) = 1 since 736 = 0^2 + 24^2 + 4^2 + 12^2 with 0 + 3*24 + 9*4 = 2^2*3^3.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    CQ[n_]:=CQ[n]=IntegerQ[n^(1/3)];
    QQ[n_]:=CQ[n]||CQ[n/2]||CQ[n/4];
    tab={};Do[r=0;Do[If[QQ[x+3y+9z]&&SQ[n-x^2-y^2-z^2],r=r+1],{x,0,Sqrt[n-1]},{y,0,Sqrt[n-1-x^2]},{z,0,Sqrt[n-1-x^2-y^2]}];tab=Append[tab,r],{n,1,80}];Print[tab]

A281980 Numbers of the form x^4 + y^2 with x^2 + 24*y a square, where x and y are nonnegative integers.

Original entry on oeis.org

0, 1, 2, 5, 16, 26, 32, 36, 50, 80, 81, 90, 145, 162, 226, 256, 260, 356, 405, 416, 485, 512, 576, 625, 626, 641, 661, 677, 746, 800, 821, 981, 1066, 1226, 1250, 1280, 1296, 1440, 1601, 1781, 2020, 2106, 2146, 2320, 2401, 2410, 2426, 2501, 2570, 2592, 2602, 2801, 2916, 2977, 3125, 3250, 3490, 3616, 3761, 3845
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 04 2017

Keywords

Comments

If m and x are integers with m == x or -x (mod 4) and m == x or -x (mod 3), then y = (m^2-x^2)/24 is an integer with x^2 + 24*y = m^2. So, the sequence has infinitely many terms.
The conjecture in A281976 implies that any nonnegative integer can be written as the sum of two squares and a term of the current sequence.

Examples

			a(1) = 0 since 0 = 0^4 + 0^2 with 0^2 + 24*0 = 0^2.
a(2) = 1 since 1 = 1^4 + 0^2 with 1^2 + 24*0 = 1^2.
a(3) = 2 since 2 = 1^4 + 1^2 with 1^2 + 24*1 = 5^2.
a(4) = 5 since 5 = 1^4 + 2^2 with 1^2 + 24*2 = 7^2.
a(5) = 16 since 16 = 2^4 + 0^2 with 2^2 + 24*0 = 2^2.
a(6) = 26 since 26 = 1^4 + 5^2 with 1^2 + 24*5 = 11^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    n=0;Do[Do[If[SQ[m-x^4]&&SQ[x^2+24*Sqrt[m-x^4]],n=n+1;Print[n," ",m];Goto[aa]],{x,0,m^(1/4)}];Label[aa];Continue,{m,0,4000}]

A282545 Number of ways to write n as x^4 + y^2 + z^2 + w^2 with y^2 + 64*z^2 + 1024*y*z a square, where x,y,z,w are nonnegative integers with y > 0.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 18 2017

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0.
(ii) Any nonnegative integer can be written as x^4 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that a*y^2 + b*y*z + c*z^2 is a square, whenever (a,b,c) is among the ordered triples (1,484,44), (1,666,9), (16,1336,169), (25,900,36).
(iii) For each c = 1, 49, any nonnegative integer can be written as x^4 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 120*(x^2+y)*z + c*z^2 is a square.
By the linked JNT paper, each n = 0,1,2,... can be expressed as the sum of a fourth power and three squares.
See also A282463, A282494 and A282495 for similar conjectures.

Examples

			a(1) = 1 since 1 = 0^4 + 1^2 + 0^2 + 0^2 with 1^2 + 64*0^2 + 1024*1*0 = 1^2.
a(31) = 1 since 31 = 1^4 + 2^2 + 1^2 + 5^2 with 2^2 + 64*1^2 + 1024*2*1 = 46^2.
a(47) = 1 since 47 = 1^4 + 6^2 + 3^2 + 1^2 with 6^2 + 64*3^2 + 1024*6*3 = 138^2.
a(79) = 1 since 79 = 1^4 + 7^2 + 2^2 + 5^2 with 7^2 + 64*2^2 + 1024*7*2 = 121^2.
a(156) = 1 since 156 = 3^4 + 5^2 + 5^2 + 5^2 with 5^2 + 64*5^2 + 1024*5*5 = 165^2.
a(184) = 1 since 184 = 0^4 + 12^2 + 6^2 + 2^2 with 12^2 + 64*6^2 + 1024*12*6 = 276^2.
a(316) = 1 since 316 = 2^4 + 10^2 + 10^2 + 10^2 with 10^2 + 64*10^2 + 1024*10*10 = 330^2.
a(380) = 1 since 380 = 1^4 + 3^2 + 3^2 + 19^2 with 3^2 + 64*3^2 + 1024*3*3 = 99^2.
a(2383) = 1 since 2383 = 3^4 + 22^2 + 33^2 + 27^2 with 22^2 + 64*33^2 + 1024*22*33 = 902^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[SQ[n-x^4-y^2-z^2]&&SQ[y^2+1024y*z+64z^2],r=r+1],{x,0,(n-1)^(1/4)},{y,1,Sqrt[n-x^4]},{z,0,Sqrt[n-x^4-y^2]}];Print[n," ",r];Continue,{n,1,80}]

A291455 Number of ways to write 2*n+1 as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x + 3*y + 5*z + 7*w, x^3 + 3*y^3 + 5*z^3 + 7*w^3 and x^7 + 3*y^7 + 5*z^7 + 7*w^7 are all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 24 2017

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 3, 4, 7, 17, 23, 34, 39, 51, 66, 69, 99, 109, 115, 171, 191. Also, any integer n > 1 with gcd(n,42) = 1 can be written as x + 3*y + 5*z + 7*w with x,y,z,w nonnegative integers such that x^3 + 3*y^3 + 5*z^3 + 7*w^3 and x^7 + 3*y^7 + 5*z^7 + 7*w^7 are both prime.
(ii) Any positive odd integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x + 5*y + 9*z + 11*w, x^3 + 5*y^3 + 9*z^3 + 11*w^3 and x^5 + 5*y^5 + 9*z^5 + 11*w^5 are all prime. Also, any integer n > 1 with gcd(n,30) = 1 can be written as x + 5*y + 9*z + 11*w with x,y,z,w nonnegative integers such that x^3 + 5*y^3 + 9*z^3 + 11*w^3 and x^5 + 5*y^5 + 9*z^5 + 11*w^5 are both prime.
(iii) Let (k,m) be one of the ordered pairs (1,2), (1,4), (1,5), (1,9), (2,6), (3,5), (8,8). Then any positive odd integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x^k + 3*y^k + 5*z^k + 7*w^k and x^m + 3*y^m + 5*z^m + 7*w^m are both prime.
(iv) Any positive odd integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that p = x + 3*y + 5*z + 7*w and 2*p+1 (or p-4) are both prime.
(v) For each m = 1, 2, 4, any positive odd integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that p = x^m + 3*y^m + 5*z^m + 7*w^m and p+6 are both prime.
See also A290935 for a similar conjecture involving twin primes.

Examples

			a(4) = 1 since 2*4+1 = 0^2 + 2^2 + 2^2 + 1^2 with 0 + 3*2 + 5*2 + 7*1 = 23, 0^3 + 3*2^3 + 5*2^3 + 7*1^3 = 71 and 0^7 + 3*2^7 + 5*2^7 + 7*1^7 = 1031 all prime.
a(34) = 1 since 2*34+1 = 2^2 + 0^2 + 4^2 + 7^2 with 2 + 3*0 + 5*4 + 7*7 = 71, 2^3 + 3*0^3 + 5*4^3 + 7*7^3 = 2729 and 2^7 + 3*0^7 + 5*4^7 + 7*7^7 = 5846849 all prime.
a(66) = 1 since 2*66+1 = 4^2 + 6^2 + 9^2 + 0^2 with 4 + 3*6 + 5*9 + 7*0 = 67, 4^3 + 3*6^3 + 5*9^3 + 7*0^3 = 4357 and 4^7 + 3*6^7 + 5*9^7 + 7*0^7 = 24771037 all prime.
a(69) = 1 since 2*69+1 = 11^2 + 3^2 + 0^2 + 3^2 with 11 + 3*3 + 5*0 + 7*3 = 41, 11^3 + 3*3^3 + 5*0^3 + 7*3^3 = 1601 and 11^7 + 3*3^7 + 5*0^7 + 7*3^7 = 19509041 all prime.
a(191) = 1 since 2*191+1 = 11^2 + 6^2 + 1^2 + 15^2 with 11 + 3*6 + 5*1 + 7*15 = 139, 11^3 + 3*6^3 + 5*1^3 + 7*15^3 = 25609 and 11^7 + 3*6^7 + 5*1^7 + 7*15^7 = 1216342609 all prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    f[m_,x_,y_,z_,w_]:=f[m,x,y,z,w]=x^m+3y^m+5z^m+7w^m;
    Do[r=0;Do[If[SQ[2n+1-x^2-y^2-z^2]&&PrimeQ[f[1,x,y,z,Sqrt[2n+1-x^2-y^2-z^2]]]&&PrimeQ[f[3,x,y,z,Sqrt[2n+1-x^2-y^2-z^2]]]&&PrimeQ[f[7,x,y,z,Sqrt[2n+1-x^2-y^2-z^2]]],r=r+1],{x,0,Sqrt[2n+1]},{y,0,Sqrt[2n+1-x^2]},{z,0,Sqrt[2n+1-x^2-y^2]}];Print[n," ",r],{n,0,100}]

A282933 Number of ways to write n as x^4 + y^2 + z^2 + w^2 with x,y,z nonnegative integers and w a positive integer such that 8*y^2 - 8*y*z + 9*z^2 is a square.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 25 2017

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 16^k*m (k = 0,1,2,... and m = 1, 8, 15, 23, 39, 47, 71, 93, 239, 287, 311, 319, 383, 391, 591, 632, 1663, 2639, 5591, 6236).
(ii) Each n = 0,1,2,... can be written as x^4 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that a*y^2 - b*y*z + c*z^2 is a square, whenever (a,b,c) is among the ordered triples (6,21,19), (15,33,22), (16,54,39),(18,51,34), (19,53,34), (21,42,22), (22,69,51).
By the linked JNT paper, each n = 0,1,2,... is the sum of a fourth power and three squares, and we can also write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and y*(y-z) = 0. Whether y = 0 or y = z, the number 8*y^2 - 8*y*z + 9*z^2 is definitely a square.
First occurrence of k: 1, 2, 5, 6, 10, 18, 26, 25, 41, 85, 81, 101, 105, 90, 201, 146, 321, 341, 261, 325, 297, 370, 585, 306, 906, ..., . Robert G. Wilson v, Feb 25 2017

Examples

			a(8) = 1 since 8 = 0^4 + 0^2 + 2^2 + 2^2 with 8*0^2 - 8*0*2 + 9*2^2 = 6^2.
a(15) = 1 since 15 = 1^4 + 2^2 + 1^2 + 3^2 with 8*2^2 - 8*2*1 + 9*1^2 = 5^2.
a(23) = 1 since 23 = 1^4 + 3^2 + 3^2 + 2^2 with 8*3^2 - 8*3*3 + 9*3^2 = 9^2.
a(591) = 1 since 591 = 3^4 + 5^2 + 1^2 + 22^2 with 8*5^2 - 8*5*1 + 9*1^2 = 13^2.
a(632) = 1 since 632 = 4^4 + 12^2 + 6^2 + 14^2 with 8*12^2 - 8*12*6 + 9*6^2 = 30^2.
a(1663) = 1 since 1663 = 3^4 + 27^2 + 23^2 + 18^2 with 8*27^2 - 8*27*23 + 9*23^2 = 75^2.
a(2639) = 1 since 2639 = 7^4 + 15^2 + 3^2 + 2^2 with 8*15^2 - 8*15*3 + 9*3^2 = 39^2.
a(5591) = 1 since 5591 = 5^4 + 6^2 + 21^2 + 67^2 with 8*6^2 - 8*6*21 + 9*21^2 = 57^2.
a(6236) = 1 since 6236 = 1^4 + 45^2 + 31^2 + 57^2 with 8*45^2 - 8*45*31 + 9*31^2 = 117^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    Do[r=0;Do[If[SQ[n-x^4-y^2-z^2]&&SQ[8y^2-8*y*z+9z^2],r=r+1],{x,0,(n-1)^(1/4)},{y,0,Sqrt[n-1-x^4]},{z,0,Sqrt[n-1-x^4-y^2]}];Print[n," ",r];Continue,{n,1,80}]

A283617 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w integers and 0 <= z <= w such that x^3 + 2*y^3 is a square.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 12 2017

Keywords

Comments

Conjecture: (i) Let a and b >= a be positive integers with gcd(a,b) squarefree. Then, every n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w integers such that a*x^3 + b*y^3 is a square, if and only if (a,b) is among the ordered pairs (1,2), (1,8), (2,16), (4,23), (4,31), (5,9), (8,9), (8,225), (9,47), (25,88), (50,54).
(ii) Each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with x a nonnegative integer and y,z,w integers such that a*x^3 + b*y^3 is a square, whenever (a,b) is among the ordered pairs (1,8), (2,16), (8,1), (9,8), (88,25), (225,8).
(iii) Any positive integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z integers and w a positive integer such that x^3 + 19*y^3 + 19*z^3 is an integer cube.
(iv) Every n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w integers such that a*x^3 + b*y^3 + c*z^3 + d*w^3 is a square, whenever (a,b,c,d) is among the ordered quadruples (1,1,3,4), (1,2,3,5), (1,2,3,7), (1,2,4,5),(1,2,5,7), (1,3,4,5), (1,3,4,7), (1,3,6,8), (1,3,8,13), ((1,4,5,9), (1,7,8,11), (1,8,9,10), (1,8,9,11), (2,3,4,7), (2,4,7,9), (2,4,7,14), (2,7,9,11), (3,4,5,7), (3,8,9,11).
By the linked JNT paper, each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w integers such that x + 2*y is a square.

Examples

			a(0) = 1 since 0 = 0^2 + 0^2 + 0^2 + 0^2 with 0^3 + 2*0^3 = 0^2.
a(7) = 1 since 7 = (-1)^2 + 1^2 + 1^2 + 2^2 with (-1)^3 + 2*1^3 = 1^2.
a(79) = 1 since 79 = 3^2 + 3^2 + 5^2 + 6^2 with 3^3 + 2*3^3 = 9^2.
a(88) = 1 since 88 = 4^2 + 0^2 + 6^2 + 6^2 with 4^3 + 2*0^3 = 8^2.
a(151) = 1 since 151 = (-1)^2 + 1^2 + 7^2 + 10^2 with (-1)^3 + 2*1^3 = 1^2.
a(219) = 1 since 219 = 1^2 + 0^2 + 7^2 + 13^2 with 1^3 + 2*0^3 = 1^2.
a(438) = 1 since 438 = (-1)^2 + 1^2 + 6^2 + 20^2 with (-1)^3 + 2*1^3 = 1^2.
a(471) = 1 since 471 = 3^2 + (-1)^2 + 10^2 + 19^2 with 3^3 + 2*(-1)^3 = 5^2.
a(599) = 1 since 599 = 7^2 + (-3)^2 + 10^2 + 21^2 with 7^3 + 2*(-3)^3 = 17^2.
a(751) = 1 since 751 = 3^2 + 3^2 + 2^2 + 27^2 with 3^3 + 2*3^3 = 9^2.
a(807) = 1 since 807 = 3^2 + (-1)^2 + 11^2 + 26^2 with 3^3 + 2*(-1)^3 = 5^2.
a(19743) = 1 since 19743 = (-25)^2 + 25^2 + 58^2 + 123^2 with (-25)^3 + 2*25^3 = 125^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    Do[r=0;Do[If[SQ[(-1)^i*x^3+2(-1)^j*y^3],Do[If[SQ[n-x^2-y^2-z^2],r=r+1],{z,0,Sqrt[(n-x^2-y^2)/2]}]],{x,0,Sqrt[n]},{i,0,Min[x,1]},{y,0,Sqrt[n-x^2]},{j,0,Min[y,1]}];Print[n," ",r],{n,0,80}]

A291624 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that p = x + 2*y + 5*z, p - 2 and p + 4 are all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 28 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1 not divisible by 4.
See also A291635 for a stronger conjecture.

Examples

			a(2) = 1 since 2 = 0^2 + 1^2 + 1^2 + 0^2 with 0 + 2*1 + 5*1 = 7, 7 - 2 = 5 and 7 + 4 = 11 all prime.
a(5) = 1 since 5 = 2^2 + 0^2 + 1^2 + 0^2 with 2 + 2*0 + 5*1 = 7, 7 - 2 = 5 and 7 + 4 = 11 all prime.
a(181) = 1 since 181 = 1^2 + 6^2 + 0^2 + 12^2 with 1 + 2*6 + 5*0 = 13, 13 - 2 = 11 and 13 + 4 = 17 all prime.
a(285) = 1 since 285 = 10^2 + 4^2 + 5^2 + 12^2 with 10 + 2*4 + 5*5 = 43, 43 - 2 = 41 and 43 + 4 = 47 all prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    TQ[p_]:=TQ[p]=PrimeQ[p]&&PrimeQ[p-2]&&PrimeQ[p+4];
    Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&TQ[x+2y+5z],r=r+1],{x,0,Sqrt[n]},{y,0,Sqrt[n-x^2]},{z,0,Sqrt[n-x^2-y^2]}];Print[n," ",r],{n,1,100}]

A291635 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that p = x + 2*y + 5*z, p - 2, p + 4 and p + 10 are all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 28 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1 not divisible by 4.
This is stronger than the conjecture in A291624. Obviously, it implies that there are infinitely many prime quadruples (p-2, p, p+4, p+10).
We have verified that a(n) > 0 for any integer 1 < n < 10^7 not divisible by 4.

Examples

			a(61) = 1 since 61 = 4^2 + 0^2 + 3^2 + 6^2 with 4 + 2*0 + 5*3 = 19, 19 - 2 = 17, 19 + 4 = 23 and 19 + 10 = 29 all prime.
a(253) = 1 since 253 = 12^2 + 8^2 + 3^2 + 6^2 with 12 + 2*8 + 5*3 = 43, 43 - 2 = 41, 43 + 4 = 47 and 43 + 10 = 53 all prime.
a(725) = 1 since 725 = 7^2 + 0^2 + 0^2 + 26^2 with 7 + 2*0 + 5*0 = 7, 7 - 2 = 5, 7 + 4 = 11 and 7 + 10 = 17 all prime.
a(1511) = 1 since 1511 = 18^2 + 15^2 + 11^2 + 29^2 with 18 + 2*15 + 5*11 = 103, 103 - 2 = 101, 103 + 4 = 107 and 103 + 10 = 113 all prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    PQ[p_]:=PQ[p]=PrimeQ[p]&&PrimeQ[p-2]&&PrimeQ[p+4]&&PrimeQ[p+10]
    Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&PQ[x+2y+5z],r=r+1],{x,0,Sqrt[n]},{y,0,Sqrt[n-x^2]},{z,0,Sqrt[n-x^2-y^2]}];Print[n," ",r],{n,1,100}]

A299825 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x <= y, x == y (mod 2), and |x+y-z| is a power of 4 (including 4^0 = 1).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 3, 1, 3, 1, 2, 6, 1, 3, 4, 2, 2, 2, 2, 4, 5, 1, 3, 2, 2, 2, 2, 4, 3, 3, 2, 2, 3, 4, 3, 7, 4, 1, 6, 2, 3, 4, 1, 7, 4, 3, 6, 1, 4, 3, 3, 4, 2, 3, 5, 3, 2, 1, 1, 7, 5, 4, 3, 3, 4, 3, 3, 4, 4, 5, 6, 3, 2, 3, 4
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 19 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 2, 6, 13, 15, 18, 27, 43, 53, 63, 93, 107, 109, 123, 141, 159, 165, 173, 477, 493, 653, 1005, 16^k*m (k = 0,1,2,... and m = 3, 4, 7, 8).
We have verified that a(n) > 0 for all n = 1..5*10^6.
A weaker version of the conjecture was proved by the author in arXiv:1701.05868.

Examples

			a(8) = 1 since 8 = 2^2 + 2^2 + 0^2 + 0^2 with 2 == 2 (mod 2) and 2 + 2 - 0 = 4.
a(13) = 1 since 13 = 0^2 + 2^2 + 3^2 + 0^2 with 0 == 2 (mod 2) and 0 + 2 - 3 = -4^0.
a(109) = 1 since 109 = 2^2 + 4^2 + 5^2 + 8^2 with 2 == 4 (mod 2) and 2 + 4 - 5 = 4^0.
a(123) = 1 since 123 = 1^2 + 3^2 + 8^2 + 7^2 with 1 == 3 (mod 2) and 1 + 3 - 8 = -4.
a(477) = 1 since 477 = 0^2 + 10^2 + 11^2 + 16^2 with 0 == 10 (mod 2) and 0 + 10 - 11 = -4^0.
a(653) = 1 since 653 = 8^2 + 12^2 + 21^2 + 2^2 with 8 == 12 (mod 2) and 8 + 12 - 21 = -4^0.
a(1005) = 1 since 1005 = 0^2 + 10^2 + 11^2 + 28^2 with 0 == 10 (mod 2) and 0 + 10 - 11 = -4^0.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    Pow[n_]:=Pow[n]=IntegerQ[Log[4,n]];
    Do[r=0;Do[If[Mod[x-y,2]==0&&Pow[Abs[x+y-z]]&&SQ[n-x^2-y^2-z^2],r=r+1],{x,0,Sqrt[n/2]},{y,x,Sqrt[n-x^2]},{z,0,Sqrt[n-x^2-y^2]}];Print[n," ",r],{n,1,80}]

A300448 Number of the integers 4^k*m with k >= 0 and m = 1, 2, 5 such that n^2 - 4^k*m can be written as the sum of two squares.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 06 2018

Keywords

Comments

Conjecture 1: a(n) > 0 for all n > 0.
Conjecture 2: Each positive square n^2 can be written as 4^k*m + x^2 + y^2 with k,x,y nonnegative integers and m among 1, 5 17.
Conjecture 3: For each n = 1,2,3,... we can write n^2 as 4^k*m + x^2 + y^2 with k,x,y nonnegative integers and m among 1, 5, 65.
Conjecture 3 implies that A300441(n) > 0 for all n > 0 since 4*A001353(0)^2 + 1 = 1, 4*A001353(1)^2 + 1 = 5 and 4*A001353(2)^2 + 1 = 65.
We have verified Conjectures 1-3 for all n = 1..2*10^7.

Examples

			a(1) = 1 since 1^2 - 4^0*1 = 0 = 0^2 + 0^2.
a(2) = 2 since 2^2 - 4^0*2 = 2 = 1^2 + 1^2 and 2^2 - 4*1 = 0 = 0^2 + 0^2.
a(4) = 2 since 4^2 - 4^1*2 = 8 = 2^2 + 2^2 and 4^2 - 4^2*1 = 0 = 0^2 + 0^2.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=FactorInteger[n];
    g[n_]:=g[n]=Sum[If[Mod[Part[Part[f[n],i],1]-3,4]==0&&Mod[Part[Part[f[n],i],2],2]==1,1,0],{i,1,Length[f[n]]}]==0;
    QQ[n_]:=QQ[n]=n==0||(n>0&&g[n]);
    u[1]=1; u[2]=2; u[3]=5;
    tab={};Do[r=0;Do[If[QQ[n^2-4^k*u[m]],r=r+1],{m,1,3},{k,0,Log[4,n^2/u[m]]}];tab=Append[tab,r],{n,1,80}];Print[tab]
Previous Showing 51-60 of 70 results. Next