A352929 Indices of primes in A093714.
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
Offset: 1
Keywords
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A093714.
Programs
-
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 *)
-
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
Comments