A191113 Increasing sequence generated by these rules: a(1)=1, and if x is in a then 3x-2 and 4x-2 are in a.
1, 2, 4, 6, 10, 14, 16, 22, 28, 38, 40, 46, 54, 62, 64, 82, 86, 110, 112, 118, 136, 150, 158, 160, 182, 184, 190, 214, 244, 246, 254, 256, 326, 328, 334, 342, 352, 406, 438, 446, 448, 470, 472, 478, 542, 544, 550, 568, 598, 630, 638, 640, 726, 730, 734, 736, 758, 760, 766, 854, 974, 976, 982, 1000, 1014, 1022, 1024, 1054, 1216
Offset: 1
Keywords
Examples
1 -> 2 -> 4,6 -> 10,14,16,22 ->
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- David Garth and Adam Gouge, Affinely Self-Generating Sets and Morphisms, Journal of Integer Sequences, Article 07.1.5, 10 (2007) 1-13.
Programs
-
Haskell
import Data.Set (singleton, deleteFindMin, insert) a191113 n = a191113_list !! (n-1) a191113_list = 1 : f (singleton 2) where f s = m : (f $ insert (3*m-2) $ insert (4*m-2) s') where (m, s') = deleteFindMin s -- Reinhard Zumkeller, Jun 01 2011
-
Maple
N:= 2000: # to get all terms <= N S:= {}: agenda:= {1}: while nops(agenda) > 0 do S:= S union agenda; agenda:= select(`<=`,map(t -> (3*t-2,4*t-2),agenda) minus S, N) od: sort(convert(S,list)); # Robert Israel, Dec 22 2015
-
Mathematica
h = 3; i = -2; j = 4; k = -2; f = 1; g = 8; a = Union[Flatten[NestList[{h # + i, j # + k} &, f, g]]] (* a=A191113; regarding g, see the Mathematica note at A190803 *) b = (a + 2)/3; c = (a + 2)/4; r = Range[1, 900]; d = Intersection[b, r] (* A191146 *) e = Intersection[c, r] (* A191149 *) m = a/2 (* divisibility property *)
Formula
a(1)=1, and if x is in a then 3x-2 and 4x-2 are in a; the terms of a are listed in without repetitions, in increasing order.
Comments