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 1+2x and 1+x^2 are in a.
2

%I #7 Apr 27 2014 00:19:27

%S 1,2,3,5,7,10,11,15,21,23,26,31,43,47,50,53,63,87,95,101,107,122,127,

%T 175,191,203,215,226,245,255,351,383,407,431,442,453,491,511,530,677,

%U 703,767,815,863,885,907,962,983,1023,1061,1355,1407,1535,1631,1727,1771,1815,1850,1925,1967,2047,2123,2210,2501

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

%C See A191203.

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

%e 1 -> 2,3 -> 5,7,10 ->

%t g = 11; Union[Flatten[NestList[{1 + 2 #, 1 + #^2} &, 1, g]]]

%t (* A191211; use g>10 to get all of first 60 terms *)

%o (Haskell)

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

%o a191211 n = a191211_list !! (n-1)

%o a191211_list = f $ singleton 1 where

%o f s = m : f (insert (2 * m + 1) $ insert (m ^ 2 + 1) s')

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

%o -- _Reinhard Zumkeller_, Apr 18 2014

%Y Cf. A191203.

%K nonn

%O 1,2

%A _Clark Kimberling_, May 29 2011