# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/
Search: id:a354791
Showing 1-1 of 1
%I A354791 #17 Jul 18 2022 09:49:02
%S A354791 1,7,14,15,17,29,31,35,59,63,64,71,79,119,120,127,129,143,159,223,239,
%T A354791 241,255,259,260,287,288,319,320,447,479,483,484,511,512,519,521,575,
%U A354791 577,639,641,895,959,960,967,968,969,1023,1025,1039,1043,1044,1151,1152
%N A354791 Indices of nonprime terms in A354790.
%H A354791 Rémy Sigrist, Table of n, a(n) for n = 1..5715
%H A354791 Rémy Sigrist, C program
%o A354791 (Python)
%o A354791 from math import lcm, gcd
%o A354791 from itertools import count, islice
%o A354791 from collections import deque
%o A354791 from sympy import factorint
%o A354791 def A354791_gen(): # generator of terms
%o A354791 aset, aqueue, c, b, f, i = {1}, deque([1]), 2, 1, True, 1
%o A354791 yield 1
%o A354791 while True:
%o A354791 for m in count(c):
%o A354791 if m not in aset and gcd(m,b) == 1 and all(map(lambda n:n<=1,fs:=factorint(m).values())):
%o A354791 i += 1
%o A354791 if len(fs) > 1:
%o A354791 yield i
%o A354791 aset.add(m)
%o A354791 aqueue.append(m)
%o A354791 if f: aqueue.popleft()
%o A354791 b = lcm(*aqueue)
%o A354791 f = not f
%o A354791 while c in aset:
%o A354791 c += 1
%o A354791 break
%o A354791 A354791_list = list(islice(A354791_gen(),30)) # _Chai Wah Wu_, Jul 17 2022
%o A354791 (C) See Links section.
%Y A354791 Cf. A354790, A354792.
%K A354791 nonn
%O A354791 1,2
%A A354791 _Michael De Vlieger_ and _N. J. A. Sloane_, Jul 17 2022
%E A354791 More terms from _Rémy Sigrist_, Jul 17 2022
# Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE