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

A262311 Number of ordered ways to write n = x^2 + y^2 + phi(z^2) (0 <= x <= y and z > 0) with y or z prime, where phi(.) is Euler's totient function given by A000010.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 01 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
I have verified this for n up to 10^6, and found that a(n) = 1 for the following 67 values of n: 2, 3, 4, 5, 8, 9, 13, 23, 29, 32, 39, 48, 68, 96, 108, 140, 144, 215, 264, 268, 324, 328, 384, 396, 404, 460, 471, 476, 500, 503, 684, 716, 759, 764, 768, 788, 860, 908, 936, 1032, 1076, 1112, 1148, 1164, 1259, 1344, 1399, 1443, 1484, 1503, 1551, 1839, 1868, 2088, 2723, 2883, 3744, 4296, 5963, 6804, 8328, 9680, 10331, 11948, 21524, 39716, 94415. It seems that a(n) = 1 for no other values of n.
It is easy to see that all the numbers phi(n^2) = n*phi(n) (n = 1,2,3,...) are pairwise distinct.
See also A262781 for a similar conjecture.

Examples

			a(2) = 1 since 2 = 0^2 + 0^2 + phi(2^2) with 2 prime.
a(5) = 1 since 5 = 0^2 + 2^2 + phi(1^2) with 2 prime.
a(23) = 1 since 23 = 1^2 + 4^2 + phi(3^2) with 3 prime.
a(29) = 1 since 29 = 0^2 + 3^2 + phi(5^2) with 3 and 5 both prime.
a(48) = 1 since 48 = 2^2 + 2^2 + phi(10^2) with 2 prime.
a(96) = 1 since 96 = 3^2 + 9^2 + phi(3^2) with 3 prime.
a(140) = 1 since 140 = 7^2 + 7^2 + phi(7^2) with 7 prime.
a(471) = 1 since 471 = 0^2 + 19^2 + phi(11^2) with 19 and 11 both prime.
a(476) = 1 since 476 = 8^2 + 16^2 + phi(13^2) with 13 prime.
a(936) = 1 since 936 = 4^2 + 30^2 + phi(5^2) with 5 prime.
a(1112) = 1 since 1112 = 23^2 + 23^2 + phi(9^2) with 23 prime.
a(1839) = 1 since 1839 = 3^2 + 30^2 + phi(31^2) with 31 prime.
a(1868) = 1 since 1868 = 2^2 + 2^2 + phi(62^2) with 2 prime.
a(2088) = 1 since 2088 = 15^2 + 39^2 + phi(19^2) with 19 prime.
a(2723) = 1 since 2723 = 34^2 + 35^2 + phi(19^2) with 19 prime.
a(2883) = 1 since 2883 = 21^2 + 44^2 + phi(23^2) with 23 prime.
a(3744) = 1 since 3744 = 4^2 + 54^2 + phi(29^2) with 29 prime.
a(4296) = 1 since 4296 = 26^2 + 60^2 + phi(5^2) with 5 prime.
a(5963) = 1 since 5963 = 26^2 + 59^2 + phi(43^2) with 59 and 43 both prime.
a(6804) = 1 since 6804 = 40^2 + 72^2 + phi(5^2) with 5 prime.
a(8328) = 1 since 8328 = 1^2 + 39^2 + phi(83^2) with 83 prime.
a(9680) = 1 since 9680 = 68^2 + 70^2 + phi(13^2) with 13 prime.
a(10331) = 1 since 10331 = 17^2 + 100^2 + phi(7^2) with 7 prime.
a(11948) = 1 since 11948 = 5^2 + 109^2 + phi(7^2) with 109 and 7 both prime.
a(21524) = 1 since 21524 = 59^2 + 109^2 + phi(79^2) with 109 and 79 both prime.
a(39716) = 1 since 39716 = 5^2 + 17^2 + phi(199^2) with 17 and 199 both prime.
a(94415) = 1 since 94415 = 115^2 + 178^2 + phi(223^2) with 223 prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    f[n_]:=EulerPhi[n^2]
    Do[r=0;Do[If[f[z]>n,Goto[aa]];Do[If[SQ[n-f[z]-x^2]&&(PrimeQ[z]||PrimeQ[Sqrt[n-f[z]-x^2]]),r=r+1],{x,0,Sqrt[(n-f[z])/2]}];Label[aa];Continue,{z,1,n}];Print[n," ",r];Continue,{n,1,100}]

A262785 Number of ordered ways to write n as x^2 + y^2 + p*(p+d)/2, where 0 <= x <= y, d is 1 or -1, and p is prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 01 2015

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 2, 9, 34, 45, 49, 72, 97, 241, 337, 538.
(ii) Any integer n > 9 can be written as x^2 + y^2 + z*(z+1), where x,y,z are nonnegative integers with z-1 or z+1 prime.
In 2015, the author refined a result of Euler by proving that any positive integer can be written as the sum of two squares and a positive triangular number.

Examples

			a(1) = 1 since 1 = 0^2 + 0^2 + 2*(2-1)/2 with 2 prime.
a(2) = 1 since 2 = 0^2 + 1^2 + 2*(2-1)/2 with 2 prime.
a(3) = 3 since 3 = 0^2 + 0^2 + 2*(2+1)/2 = 0^2 + 0^2 + 3*(3-1)/2 = 1^2 + 1^2 + 2*(2-1)/2 with 2 and 3 both prime.
a(9) = 1 since 9 = 2^2 + 2^2 + 2*(2-1)/2 with 2 prime.
a(34) = 1 since 34 = 2^2 + 3^2 + 7*(7-1)/2 with 7 prime.
a(45) = 1 since 45 = 1^2 + 4^2 + 7*(7+1)/2 with 7 prime.
a(49) = 1 since 49 = 3^2 + 5^2 + 5*(5+1)/2 with 5 prime.
a(72) = 1 since 72 = 1^2 + 4^2 + 11*(11-1)/2 with 11 prime.
a(97) = 1 since 97 = 1^2 + 9^2 + 5(5+1)/2 with 5 prime.
a(241) = 1 since 241 = 1^2 + 15^2 + 5*(5+1)/2 with 5 prime.
a(337) = 1 since 337 = 5^2 + 6^2 + 23*(23+1)/2 with 23 prime.
a(538) = 1 since 538 = 3^2 + 8^2 + 31*(31-1)/2 with 31 prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    f[d_,n_]:=Prime[n](Prime[n]+(-1)^d)/2
    Do[r=0;Do[If[SQ[n-f[d,k]-x^2],r=r+1],{d,0,1},{k,1,PrimePi[(Sqrt[8n+1]-(-1)^d)/2]},{x,0,Sqrt[(n-f[d,k])/2]}];Print[n," ",r];Continue,{n,1,100}]

A262982 Number of ordered ways to write n as x^4 + phi(y^2) + z*(z+1)/2 with x >= 0, y > 0 and z > 0, where phi(.) is Euler's totient function given by A000010.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 06 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1, and a(n) = 1 only for n = 2, 6, 20, 26, 40, 82, 89, 105, 305, 416, 470, 725, 6135, 25430, 90285.
Compare this with the conjectures in A262311, A262785 and A262813.

Examples

			a(2) = 1 since 1 = 0^4 + phi(1^2) + 1*2/2.
a(6) = 1 since 6 = 1^4 + phi(2^2) + 2*3/2.
a(20) = 1 since 20 = 2^4 + phi(1^2) + 2*3/2.
a(26) = 1 since 26 = 0^4 + phi(5^2) + 3*4/2.
a(40) = 1 since 40 = 0^4 + phi(6^2) + 7*8/2.
a(82) = 1 since 82 = 0^4 + phi(9^2) + 7*8/2.
a(89) = 1 since 89 = 3^4 + phi(2^2) + 3*4/2.
a(105) = 1 since 105 = 0^4 + phi(14^2) + 6*7/2.
a(305) = 1 since 305 = 4^4 + phi(12^2) + 1*2/2.
a(416) = 1 since 416 = 4^4 + phi(10^2) + 15*16/2.
a(470) = 1 since 470 = 2^4 + phi(12^2) + 28*29/2.
a(725) = 1 since 725 = 2^4 + phi(3^2) + 37*38/2.
a(6135) = 1 since 6135 = 6^4 + phi(81^2) + 30*31/2.
a(25430) = 1 since 25430 = 5^4 + phi(152^2) + 166*167/2.
a(90285) = 1 since 90285 = 16^4 + phi(212^2) + 73*74/2.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=EulerPhi[n^2]
    TQ[n_]:=n>0&&IntegerQ[Sqrt[8n+1]]
    Do[r=0;Do[If[f[x]>n,Goto[aa]];Do[If[TQ[n-f[x]-y^4],r=r+1],{y,0,(n-f[x])^(1/4)}];Label[aa];Continue,{x,1,n}];Print[n," ",r];Continue,{n,1,100}]

A262979 Number of ordered ways to write n as x^4 + phi(y^2) + z*(3*z-1)/2 with x >= 0 and y > 0, where phi(.) is Euler's totient function given by A000010.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 06 2015

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0.
(ii) Any positive integer n can be written as x^4 + phi(y^2) + pi(z^2) (or x^4 + pi(y^2) + pi(z^2)) with y > 0 and z > 0, where pi(m) denotes the number of primes not exceeding m.

Examples

			a(5) = 1 since 5 = 1^4 + phi(2^2) + (-1)*(3*(-1)-1)/2.
a(6) = 2 since 6 = 0^4 + phi(1^2) + 2*(3*2-1)/2 = 0^4 + phi(3^2) + 0*(3*0-1)/2.
a(16) = 2 since 16 = 0^4 + phi(1^2) + (-3)*(3*(-3)-1)/2
= 1^4 + phi(4^2) + (-2)*(3*(-2)-1)/2.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=EulerPhi[n^2]
    PenQ[n_]:=IntegerQ[Sqrt[24n+1]]
    Do[r=0;Do[If[f[x]>n,Goto[aa]];Do[If[PenQ[n-f[x]-y^4],r=r+1],{y,0,(n-f[x])^(1/4)}];Label[aa];Continue,{x,1,n}];Print[n," ",r];Continue,{n,1,100}]
Showing 1-4 of 4 results.