login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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

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

%S 1,2,5,6,10,14,17,22,26,29,41,42,50,58,65,70,77,86,90,106,118,122,125,

%T 149,166,170,173,194,202,209,230,234,257,262,269,282,310,317,346,353,

%U 362,365,374,426,446,474,490,497,502,509,518,581,598,605,626,666,682,689,694,701,770,778,785,806,810,838,845,922,929,938,950

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

%C See A191113.

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

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

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

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

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

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

%o (Haskell)

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

%o a191124 n = a191124_list !! (n-1)

%o a191124_list = f $ singleton 1

%o where f s = m : (f $ insert (3*m-1) $ insert (4*m+2) 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 27 2011