OFFSET
1,3
COMMENTS
The corresponding sequence of squares is: 0,1,9,16,25,36,49,64,81,144,196,225,256,289,324,361,400,441,484,529,576,625,676,784,841,900,961,1024,1089,1156,1225,1296,1369,1444,1521,1600,1681,1764,1849,1936,... and the sequence of their square roots is: 0,1,3,4,5,6,7,8,9,12,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47,48,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,68,69,70,....
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..500
EXAMPLE
Since pi(6)=3 and 6+3=9 is a square, so 6 belongs to the sequence.
MAPLE
q:= n-> issqr(n+numtheory[pi](n)):
select(q, [$0..3000])[]; # Alois P. Heinz, Oct 27 2021
MATHEMATICA
Select[Range[0, 3000], IntegerQ[Sqrt[#+PrimePi[#]]]&] (* Harvey P. Dale, Feb 01 2014 *)
PROG
(PARI) isok(n) = issquare(n + primepi(n)); \\ Michel Marcus, Feb 01 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
David Garber, Nov 13 2002
EXTENSIONS
I put "more" to indicate that the two subsidiary sequences should be detached and made into separate sequences. - N. J. A. Sloane.
Offset changed and terms prepended by Harvey P. Dale and Michel Marcus, Feb 01 2014
Offset 1 from Alois P. Heinz, Oct 27 2021
STATUS
approved