A376200 Indices where primes appear in A376198.
2, 3, 9, 10, 11, 23, 24, 25, 26, 52, 53, 54, 55, 56, 57, 58, 59, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488
Offset: 1
Keywords
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..100000
Programs
-
Python
from itertools import count, islice from sympy import isprime, nextprime def agen(): # generator of terms an, smc, smp = 2, 4, 3 for n in count(2): if not isprime(an): an = smp if an == 2*smp else smc else: yield n an = smp if smp < smc else smc if an == smp: smp = nextprime(smp) else: smc += 1 while isprime(smc): smc += 1 print(list(islice(agen(), 71))) # Michael S. Branicky, Oct 03 2024
Comments