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.

A237710 Least prime p < n with pi(n-p) a square, or 0 if such a prime p does not exist.

This page as a plain text file.
%I A237710 #10 Jan 28 2024 14:56:30
%S A237710 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,
%T A237710 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,
%U A237710 2,2,2,2,3,5,5,7,7,11,11,11,11,13
%N A237710 Least prime p < n with pi(n-p) a square, or 0 if such a prime p does not exist.
%C A237710 According to the conjecture in A237706, a(n) should be positive for all n > 2.
%H A237710 Zhi-Wei Sun, <a href="/A237710/b237710.txt">Table of n, a(n) for n = 1..10000</a>
%H A237710 Z.-W. Sun, <a href="http://arxiv.org/abs/1402.6641">Problems on combinatorial properties of primes</a>, arXiv:1402.6641, 2014
%e A237710 a(5) = 3 since pi(5-3) = 1^2, but pi(5-2) = 2 is not a square.
%t A237710 SQ[n_]:=IntegerQ[Sqrt[n]]
%t A237710 q[n_]:=SQ[PrimePi[n]]
%t A237710 Do[Do[If[q[n-Prime[k]],Print[n," ",Prime[k]];Goto[aa]],{k,1,PrimePi[n-1]}];
%t A237710 Print[n," ",0];Label[aa];Continue,{n,1,100}]
%t A237710 lp[n_]:=Module[{p=2},While[!IntegerQ[Sqrt[PrimePi[n-p]]],p=NextPrime[p]];p]; Join[{0,0},Array[ lp,80,3]] (* _Harvey P. Dale_, Jan 28 2024 *)
%Y A237710 Cf. A000040, A000290, A000720, A237706.
%K A237710 nonn
%O A237710 1,3
%A A237710 _Zhi-Wei Sun_, Feb 12 2014