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

%I #8 Jul 13 2013 12:04:10

%S 1,4,7,13,19,22,31,40,55,58,67,79,91,94,121,127,163,166,175,202,223,

%T 235,238,271,274,283,319,364,367,379,382,487,490,499,511,526,607,655,

%U 667,670,703,706,715,811,814,823,850,895,943,955,958,1087,1093,1099,1102,1135,1138,1147,1279,1459,1462,1471,1498,1519,1531,1534

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

%C See A191113.

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

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

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

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

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

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

%o (Haskell)

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

%o a191138 n = a191138_list !! (n-1)

%o a191138_list = f $ singleton 1

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

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

%o -- _Reinhard Zumkeller_, Jun 01 2011

%Y Cf. A191113.

%K nonn

%O 1,2

%A _Clark Kimberling_, May 28 2011