|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|