login
Increasing sequence generated by these rules: a(1)=1, and if x is in a then 2x+1 and 3x are in a.
3

%I #9 Jul 13 2013 12:04:09

%S 1,3,7,9,15,19,21,27,31,39,43,45,55,57,63,79,81,87,91,93,111,115,117,

%T 127,129,135,159,163,165,171,175,183,187,189,223,231,235,237,243,255,

%U 259,261,271,273,279,319,327,331,333,343,345,351,367,375,379,381,387,405,447,463,471,475,477,487,489,495,511,513,519,523,525,543

%N Increasing sequence generated by these rules: a(1)=1, and if x is in a then 2x+1 and 3x are in a.

%C See A190803.

%H Reinhard Zumkeller, <a href="/A190811/b190811.txt">Table of n, a(n) for n = 1..10000</a>

%t h = 2; i = 1; j = 3; k = 0; f = 1; g = 9 ;

%t a = Union[Flatten[NestList[{h # + i, j # + k} &, f, g]]] (* A190811 *)

%t b = (a - 1)/2; c = a/3; r = Range[1, 300];

%t d = Intersection[b, r] (* A002977 *)

%t e = Intersection[c, r] (* A190857 *)

%o (Haskell)

%o import Data.Set (singleton, deleteFindMin, insert)

%o a190811 n = a190811_list !! (n-1)

%o a190811_list = f $ singleton 1

%o where f s = m : (f $ insert (2*m+1) $ insert (3*m) s')

%o where (m, s') = deleteFindMin s

%o -- _Reinhard Zumkeller_, Jun 01 2011

%Y Cf. A190803.

%K nonn

%O 1,2

%A _Clark Kimberling_, May 20 2011