login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A262887 Number of ordered ways to write n as x^3 + y^2 + pi(z^2) (x >= 0, y >= 0 and z > 0) with z-1 or z+1 prime, where pi(m) denotes the number of primes not exceeding m. 3
2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 5, 3, 3, 3, 4, 2, 3, 5, 4, 3, 2, 4, 1, 2, 5, 6, 6, 3, 5, 3, 2, 4, 5, 8, 4, 5, 4, 4, 2, 2, 7, 5, 5, 4, 4, 3, 3, 5, 4, 5, 4, 4, 7, 5, 5, 1, 4, 3, 3, 8, 4, 5, 3, 4, 4, 7, 8, 5, 9, 7, 3, 1, 5, 8, 5, 4, 6, 5, 6, 4, 9, 8, 4, 2, 5, 6, 4, 4, 7, 8, 3, 9, 5, 5, 2, 6, 5, 4, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Conjecture: (i) a(n) > 0 for all n > 0. Also, each natural number can be written as x^2 + y^2 + pi(z^2) (0 <= x <= y and z > 0) with z-1 or z+1 prime.

(ii) Any integer n > 1 can be written as x^3 + y^2 + pi(z^2) with x >= 0, y >= 0 and z > 0 such that y or z is prime.

(iii) Any integer n > 1 can be written as x^3 + pi(y^2) + pi(z^2) (x >= 0, y > 0 and z > 0) with y or z prime. Also, each integer n > 1 can be written as x^2 + pi(p^2) + pi(q^2) (x >= 0 and p >= q > 0) with p prime.

Compare this conjecture with the conjecture in A262746.

LINKS

Zhi-Wei Sun, Table of n, a(n) for n = 1..10000

EXAMPLE

a(22) = 2 since 22 = 0^3 + 4^2 + pi(4^2) = 0^3 + 2^2 + pi(8^2) with 4+1 = 5 and 8-1 = 7 both prime.

a(24) = 1 since 24 = 2^3 + 4^2 + pi(1^2) with 1+1 = 2 prime.

a(40) = 2 since 40 = 0^3 + 6^2 + pi(3^2) = 3^3 + 3^2 + pi(3^2) with 3-1 = 2 prime.

a(57) = 1 since 57 = 2^3 + 7^2 + pi(1^2) with 1+1 = 2 prime.

a(73) = 1 since 73 = 4^3 + 3^2 + pi(1^2) with 1+1 = 2 prime.

MATHEMATICA

SQ[n_]:=IntegerQ[Sqrt[n]]

f[n_]:=PrimePi[n^2]

Do[r=0; Do[If[f[k]>n, Goto[aa]]; If[PrimeQ[k-1]==False&&PrimeQ[k+1]==False, Goto[bb]]; Do[If[SQ[n-f[k]-x^3], r=r+1], {x, 0, (n-f[k])^(1/3)}]; Label[bb]; Continue, {k, 1, n}]; Label[aa]; Print[n, " ", r]; Continue, {n, 1, 100}]

CROSSREFS

Cf. A000040, A000290, A000578, A000720, A262311, A262746, A262785, A262813.

Sequence in context: A227177 A132944 A210568 * A106432 A227923 A029836

Adjacent sequences:  A262884 A262885 A262886 * A262888 A262889 A262890

KEYWORD

nonn,hard

AUTHOR

Zhi-Wei Sun, Oct 04 2015

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 September 30 12:21 EDT 2020. Contains 337439 sequences. (Running on oeis4.)