[go: up one dir, main page]

login
A190808
Increasing sequence generated by these rules: a(1)=1, and if x is in a then 2x and 3x+1 are in a.
5
1, 2, 4, 7, 8, 13, 14, 16, 22, 25, 26, 28, 32, 40, 43, 44, 49, 50, 52, 56, 64, 67, 76, 79, 80, 85, 86, 88, 97, 98, 100, 104, 112, 121, 128, 130, 133, 134, 148, 151, 152, 157, 158, 160, 169, 170, 172, 176, 193, 194, 196, 200, 202, 208, 224, 229, 238, 241, 242, 256
OFFSET
1,2
COMMENTS
See A190803.
LINKS
MATHEMATICA
h = 2; i = 0; j = 3; k = 1; f = 1; g = 9 ;
a = Union[Flatten[NestList[{h # + i, j # + k} &, f, g]]] (* A190808 *)
b = a/2; c = (a - 1)/3; r = Range[1, 900];
d = Intersection[b, r] (* A190851 *)
e = Intersection[c, r] (* A190852 *)
PROG
(Haskell)
import Data.Set (singleton, deleteFindMin, insert)
a190808 n = a190808_list !! (n-1)
a190808_list = f $ singleton 1
where f s = m : (f $ insert (2*m) $ insert (3*m+1) s')
where (m, s') = deleteFindMin s
-- Reinhard Zumkeller, Jun 01 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, May 20 2011
EXTENSIONS
a(55)=224 inserted by Reinhard Zumkeller, Jun 01 2011
STATUS
approved