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.

A161188 Let S = A089237\{0} = union of primes and nonzero squares; sequence gives indices of primes.

Original entry on oeis.org

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

Views

Author

Daniel Tisdale, Jun 06 2009

Keywords

Crossrefs

Cf. A089237. Complement of A161187.
Cf. A050051.

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

A089237(a(n)+1) = A000040(n). - Reinhard Zumkeller, Dec 18 2012
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