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.

A245061 Prime numbers p such that p - primepi(p) is a square, where primepi is the prime counting function.

This page as a plain text file.
%I A245061 #24 Jul 12 2014 17:58:50
%S A245061 2,3,37,541,647,881,1151,1301,1627,2377,3271,5179,5641,10501,11597,
%T A245061 11821,18503,20543,23339,31259,35461,38669,39499,42901,43331,44201,
%U A245061 45523,51973,53407,67213,67757,70489,72169,77291,98893,99551,128291,139721,145207,150011
%N A245061 Prime numbers p such that p - primepi(p) is a square, where primepi is the prime counting function.
%H A245061 Chai Wah Wu, <a href="/A245061/b245061.txt">Table of n, a(n) for n = 1..500</a>
%F A245061 a(n) = prime(A064370(n+1)). - _Michel Marcus_, Jul 11 2014
%e A245061 37 is in the sequence because primepi(37) = 12, and 37 - 12 = 5^2.
%e A245061 541 is in the sequence because primepi(541) = 100, and 541 - 100 = 21^2.
%e A245061 547 is not in the sequence because primepi(547) = 101, and 547 - 101 = 446, which is not a perfect square.
%p A245061 with(numtheory): A245061:=n->`if`(type(sqrt(n-pi(n)),integer) and type(n,prime), n, NULL): seq(A245061(n), n=2..10^5); # _Wesley Ivan Hurt_, Jul 10 2014
%t A245061 Select[Prime[Range[200]], IntegerQ[Sqrt[# - PrimePi[#]]] &] (* _Alonso del Arte_, Jul 11 2014 *)
%o A245061 (PARI) select(p->issquare(p-primepi(p)), primes(15000)) \\ _Michel Marcus_, Jul 11 2014
%o A245061 (Python)
%o A245061 import sympy,gmpy2
%o A245061 [sympy.prime(n) for n in range(1,10**6) if gmpy2.is_square(sympy.prime(n)-n)] # _Chai Wah Wu_, Jul 11 2014
%Y A245061 Cf. A104269, A113410, A064370.
%K A245061 nonn
%O A245061 1,1
%A A245061 _Chai Wah Wu_, Jul 10 2014
%E A245061 More terms from _Michel Marcus_, Jul 11 2014