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

A262976 Number of ordered ways to write n as 2^x + y^2 + pi(z^2) with x >= 0, y >= 0 and z > 0, where pi(m) denotes the number of primes not exceeding m.

Original entry on oeis.org

1, 2, 2, 3, 4, 4, 4, 6, 4, 6, 6, 7, 6, 7, 5, 6, 10, 5, 9, 10, 7, 7, 9, 9, 4, 12, 10, 9, 8, 7, 10, 9, 10, 7, 15, 10, 6, 13, 10, 9, 10, 16, 10, 10, 9, 8, 15, 9, 8, 15, 12, 12, 7, 12, 11, 14, 12, 8, 16, 6, 10, 11, 14, 8, 11, 17, 10, 16, 9, 13, 16, 15, 8, 18, 13, 10, 14, 10, 12, 16, 12, 13, 18, 11, 9, 17, 17, 9, 15, 16, 15, 9, 12, 12, 17, 12, 9, 21, 10, 11
Offset: 1

Views

Author

Zhi-Wei Sun, Oct 05 2015

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0.
(ii) Each positive integer can be written as 2^x + pi(y^2) + pi(z^2) with x >= 0, y > 0 and z > 0.

Examples

			a(1) = 1 since 1 = 2^0 + 0^2 + pi(1^2).
a(2) = 2 since 2 = 2^0 + 1^2 + pi(1^2) = 2 + 0^2 + pi(1^2).
a(3) = 2 since 3 = 2^0 + 0^2 + pi(2^2) = 2 + 1^2 + pi(1^2).
		

References

  • Zhi-Wei Sun, Problems on combinatorial properties of primes, in: M. Kaneko, S. Kanemitsu and J. Liu (eds.), Number Theory: Plowing and Starring through High Wave Forms, Proc. 7th China-Japan Seminar (Fukuoka, Oct. 28 - Nov. 1, 2013), Ser. Number Theory Appl., Vol. 11, World Sci., Singapore, 2015, pp. 169-187.

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    f[n_]:=PrimePi[n^2]
    Do[r=0;Do[If[f[x]>=n,Goto[aa]];Do[If[2^y>n-f[x],Goto[bb]];If[SQ[n-f[x]-2^y],r=r+1],{y,0,Log[2,n-f[x]]}];Label[bb];Continue,{x,1,n}];Label[aa];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-2 of 2 results.