[go: up one dir, main page]

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

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

%S 1,2,5,6,8,17,18,20,22,26,30,53,56,62,66,68,70,78,80,86,92,102,118,

%T 161,170,188,200,206,210,212,222,236,242,246,260,262,270,278,308,310,

%U 318,342,356,366,406,470,485,512,566,602,620,632,638,642,668,678,710,728,740,750,782,788,798,812,822,836,838,846,886,926,932,942

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

%C See A191113.

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

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

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

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

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

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

%o (Haskell)

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

%o a191140 n = a191140_list !! (n-1)

%o a191140_list = f $ singleton 1

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