%I #9 Mar 31 2023 02:30:05
%S 2,3,5,6,7,9,11,13,15,17,18,19,21,23,27,29,31,33,37,39,41,43,45,47,51,
%T 53,54,57,59,61,63,67,69,71,73,79,81,83,87,89,93,97,99,101,103,107,
%U 109,111,113,117,123,127,129,131,135,137,139,141,149,151,153,157,159
%N Numbers of form 3^i * prime(j), i>=0, j>0.
%C a(n) is either prime or of form 3*a(m), m<n.
%H Chai Wah Wu, <a href="/A106843/b106843.txt">Table of n, a(n) for n = 1..10000</a>
%o (Python)
%o from itertools import count, islice
%o from sympy import isprime
%o def A106843_gen(startvalue=2): # generator of terms >= startvalue
%o for m in count(max(startvalue,2)):
%o a, b = divmod(m,3)
%o while not b:
%o a, b = divmod(a,3)
%o if (k:=3*a+b)==1 or isprime(k):
%o yield m
%o A106843_list = list(islice(A106843_gen(),20)) # _Chai Wah Wu_, Mar 30 2023
%Y Cf. A093641.
%K nonn
%O 1,1
%A _Ralf Stephan_, May 05 2005