login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

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

%S 1,4,13,40,49,121,148,157,193,364,445,472,481,580,589,625,769,1093,

%T 1336,1417,1444,1453,1741,1768,1777,1876,1885,1921,2308,2317,2353,

%U 2497,3073,3280,4009,4252,4333,4360,4369,5224,5305,5332,5341,5629,5656,5665,5764,5773,5809,6925,6952,6961,7060,7069,7105,7492,7501

%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="/A191132/b191132.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]]] (* A191132 *)

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

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

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

%o (Haskell)

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

%o a191132 n = a191132_list !! (n-1)

%o a191132_list = 1 : f (singleton 4)

%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 27 2011