cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A190808 #10 Jul 13 2013 12:04:09
%S A190808 1,2,4,7,8,13,14,16,22,25,26,28,32,40,43,44,49,50,52,56,64,67,76,79,
%T A190808 80,85,86,88,97,98,100,104,112,121,128,130,133,134,148,151,152,157,
%U A190808 158,160,169,170,172,176,193,194,196,200,202,208,224,229,238,241,242,256
%N A190808 Increasing sequence generated by these rules:  a(1)=1, and if x is in a then 2x and 3x+1 are in a.
%C A190808 See A190803.
%H A190808 Reinhard Zumkeller, <a href="/A190808/b190808.txt">Table of n, a(n) for n = 1..10000</a>
%t A190808 h = 2; i = 0; j = 3; k = 1; f = 1; g = 9 ;
%t A190808 a = Union[Flatten[NestList[{h # + i, j # + k} &, f, g]]]  (* A190808 *)
%t A190808 b = a/2; c = (a - 1)/3; r = Range[1, 900];
%t A190808 d = Intersection[b, r] (* A190851 *)
%t A190808 e = Intersection[c, r] (* A190852 *)
%o A190808 (Haskell)
%o A190808 import Data.Set (singleton, deleteFindMin, insert)
%o A190808 a190808 n = a190808_list !! (n-1)
%o A190808 a190808_list = f $ singleton 1
%o A190808    where f s = m : (f $ insert (2*m) $ insert (3*m+1) s')
%o A190808              where (m, s') = deleteFindMin s
%o A190808 -- _Reinhard Zumkeller_, Jun 01 2011
%Y A190808 Cf. A190803, A190851, A190852.
%K A190808 nonn
%O A190808 1,2
%A A190808 _Clark Kimberling_, May 20 2011
%E A190808 a(55)=224 inserted by _Reinhard Zumkeller_, Jun 01 2011