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!)
A352929 Indices of primes in A093714. 2
2, 3, 4, 6, 8, 10, 13, 15, 17, 24, 28, 32, 36, 38, 42, 52, 54, 58, 64, 66, 70, 72, 78, 85, 89, 97, 99, 101, 103, 107, 123, 125, 133, 135, 143, 145, 153, 159, 161, 169, 175, 177, 185, 187, 193, 195, 203, 219, 221, 225, 227, 235, 237, 245, 251, 259, 263, 267, 269, 277, 279, 289, 303, 305, 309, 311, 325, 333, 341, 345, 349, 353, 363, 369, 375, 379, 385, 393 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Note this is different from "a(n) = index of prime(n) in A093714", which would start 3, 2, 4, 6, 8, ..., but would otherwise be the same.
LINKS
MATHEMATICA
nn = 400; c[_] = False; c[1] = True; j = 1; u = 2; Reap[Do[k = u; While[Nand[! TrueQ@ c[k], CoprimeQ[j, k], k != j + 1], k++]; Set[{j, c[k]}, {k, True}]; If[PrimeQ@ k, Sow[i]]; If[k == u, While[TrueQ@ c[u], u++]], {i, 2, nn}]][[-1, -1]] (* Michael De Vlieger, May 03 2022 *)
PROG
(Python)
from math import gcd
from sympy import isprime
from itertools import count, islice
def agen(): # generator of terms
an, aset, mink = 1, {1}, 2
for n in count(1):
if isprime(an): yield n
k = mink
while k in aset or gcd(an, k) != 1 or k-an == 1: k += 1
an = k
aset.add(an)
while mink in aset: mink += 1
print(list(islice(agen(), 78))) # Michael S. Branicky, May 03 2022
CROSSREFS
Cf. A093714.
Sequence in context: A029517 A177907 A083006 * A096061 A100919 A184109
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, May 03 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 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)