A161188 Let S = A089237\{0} = union of primes and nonzero squares; sequence gives indices of primes.
2, 3, 5, 6, 8, 9, 11, 12, 13, 15, 16, 18, 19, 20, 21, 23, 24, 25, 27, 28, 29, 30, 32, 33, 34, 36, 37, 38, 39, 40, 42, 43, 44, 45, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 59, 60, 61, 62, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 85, 86, 87, 88, 89
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Programs
-
Haskell
a161188 n = a161188_list !! (n-1) a161188_list = map (+ 1) $ findIndices ((== 1) . a010051) $ tail a089237_list -- Reinhard Zumkeller, Dec 18 2012
-
Python
from math import isqrt from sympy import prime def A161188(n): return n+isqrt(prime(n)) # Chai Wah Wu, Oct 12 2024
Formula
a(n) = floor(sqrt(prime(n))) + n. - Ilya Gutkovskiy, Feb 16 2017
Extensions
Edited by N. J. A. Sloane, Jun 07 2009
Extended by Ray Chandler, May 06 2010