login

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

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

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

%S 1,5,7,17,23,31,53,71,95,127,161,215,287,383,485,511,647,863,1151,

%T 1457,1535,1943,2047,2591,3455,4373,4607,5831,6143,7775,8191,10367,

%U 13121,13823,17495,18431,23327,24575,31103,32767,39365,41471,52487,55295,69983,73727,93311,98303,118097,124415,131071,157463,165887

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

%C See A191113.

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

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

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

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

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

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

%t m = (a + 1)/2 (* A025613 *)

%o (Haskell)

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

%o a191145 n = a191145_list !! (n-1)

%o a191145_list = f $ singleton 1

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

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

%o -- _Reinhard Zumkeller_, Jun 01 2011

%Y See A191113.

%K nonn

%O 1,2

%A _Clark Kimberling_, May 28 2011