login
A161187
Let S = A089237\{0} = union of primes and nonzero squares; sequence gives indices of squares.
3
1, 4, 7, 10, 14, 17, 22, 26, 31, 35, 41, 46, 52, 58, 63, 70, 78, 84, 91, 98, 106, 114, 122, 129, 139, 148, 156, 165, 175, 184, 193, 204, 214, 225, 235, 246, 256, 266, 279, 291, 304, 316, 326, 339, 351, 365, 376, 390, 406, 417, 429, 445, 462, 475, 489, 501, 514
OFFSET
1,2
LINKS
FORMULA
A089237(a(n)+1) = A000290(n). - Reinhard Zumkeller, Dec 18 2012
MATHEMATICA
Table[PrimePi[n^2 - 1] + n, {n, 60}] (* Vincenzo Librandi, Feb 18 2016 *)
PROG
(Haskell)
a161187 n = a161187_list !! (n-1)
a161187_list = tail $ findIndices ((== 1) . a010052) a089237_list
-- Reinhard Zumkeller, Dec 18 2012
(Magma) [1] cat [#PrimesUpTo(n^2-1)+n: n in [2..100]]; // Vincenzo Librandi, Feb 18 2016
(Python)
from sympy import primepi
def A161187(n): return n+primepi(n**2) # Chai Wah Wu, Oct 12 2024
CROSSREFS
Cf. A089237. Complement of A161188.
Cf. A050052.
Sequence in context: A184118 A310690 A310691 * A273287 A310692 A300306
KEYWORD
easy,nonn
AUTHOR
Daniel Tisdale, Jun 06 2009
EXTENSIONS
Edited by N. J. A. Sloane, Jun 07 2009
Extended by Ray Chandler, May 06 2010
STATUS
approved