login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A237710 Least prime p < n with pi(n-p) a square, or 0 if such a prime p does not exist. 5
0, 0, 2, 2, 3, 5, 5, 7, 2, 2, 2, 2, 3, 5, 5, 7, 7, 11, 11, 11, 11, 13, 13, 17, 2, 2, 2, 2, 2, 2, 3, 5, 5, 7, 7, 11, 11, 11, 11, 13, 13, 17, 17, 17, 17, 19, 19, 23, 23, 23, 23, 29, 29, 29, 2, 2, 2, 2, 2, 2, 3, 5, 5, 7, 7, 11, 11, 11, 11, 13 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

According to the conjecture in A237706, a(n) should be positive for all n > 2.

LINKS

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

Z.-W. Sun, Problems on combinatorial properties of primes, arXiv:1402.6641, 2014

EXAMPLE

a(5) = 3 since pi(5-3) = 1^2, but pi(5-2) = 2 is not a square.

MATHEMATICA

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

q[n_]:=SQ[PrimePi[n]]

Do[Do[If[q[n-Prime[k]], Print[n, " ", Prime[k]]; Goto[aa]], {k, 1, PrimePi[n-1]}];

Print[n, " ", 0]; Label[aa]; Continue, {n, 1, 100}]

CROSSREFS

Cf. A000040, A000290, A000720, A237706.

Sequence in context: A316185 A131429 A105605 * A090473 A113636 A262463

Adjacent sequences:  A237707 A237708 A237709 * A237711 A237712 A237713

KEYWORD

nonn

AUTHOR

Zhi-Wei Sun, Feb 12 2014

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 October 21 13:24 EDT 2019. Contains 328299 sequences. (Running on oeis4.)