login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A354148 Index of prime(n) in A090252. 6
2, 3, 4, 6, 8, 9, 10, 12, 13, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 30, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 62, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 97, 98, 99, 100 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
All the primes appear in A090252 and in their correct order.
LINKS
EXAMPLE
A090252 begins 1, 2, 3, 5, 4, 7, 9, ..., so the indices of the primes are 2, 3, 4, 6, ...
PROG
(Python)
from math import gcd, prod
from sympy import isprime
from itertools import count, islice
def agen(): # generator of terms
alst, aset, mink = [1], {1}, 2
for n in count(2):
k, s = mink, n - n//2
prodall = prod(alst[n-n//2-1:n-1])
while k in aset or gcd(prodall, k) != 1: k += 1
alst.append(k); aset.add(k)
if isprime(k): yield n
while mink in aset: mink += 1
print(list(islice(agen(), 83))) # Michael S. Branicky, May 23 2022
CROSSREFS
Sequence in context: A156657 A026431 A026433 * A015858 A321473 A125292
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, May 22 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 10:22 EDT 2024. Contains 371967 sequences. (Running on oeis4.)