login
a(n) is the prime p such that pi(n^2, (n+1)^2+1) = pi((n+1)^2, p) where pi(s,t) = pi(t) - pi(s) is the number of primes between s and t.
0

%I #11 Aug 22 2024 05:18:43

%S 7,13,19,37,41,67,73,101,107,149,163,193,227,239,281,337,353,397,433,

%T 479,523,577,607,677,733,769,829,907,953,1013,1091,1151,1229,1289,

%U 1373,1439,1489,1601,1667,1777,1867,1907,2027,2099,2237,2281,2389,2543,2591

%N a(n) is the prime p such that pi(n^2, (n+1)^2+1) = pi((n+1)^2, p) where pi(s,t) = pi(t) - pi(s) is the number of primes between s and t.

%e a(1)=7 because pi(1,4)=2 and pi(4,7)=2.

%o (PARI) pi(m,n)=local(i,pic); pic=0; forprime (i=m,n,pic++); pic;

%o for (x=1,500,xc=0; px=pi(x^2,(x+1)^2); forprime (y=(x+1)^2,100000,xc++; if (xc==px, print1(y,", "); break)))

%K nonn

%O 1,1

%A _Jon Perry_, Jun 14 2002

%E Title clarified and offset corrected by _Sean A. Irvine_, Aug 21 2024