|
|
A005244
|
|
A self-generating sequence: start with 2 and 3, take all products of any 2 previous elements, subtract 1 and adjoin them to the sequence.
(Formerly M0704)
|
|
6
|
|
|
2, 3, 5, 9, 14, 17, 26, 27, 33, 41, 44, 50, 51, 53, 65, 69, 77, 80, 81, 84, 87, 98, 99, 101, 105, 122, 125, 129, 131, 134, 137, 149, 152, 153, 158, 159, 161, 164, 167, 173, 194, 195, 197, 201, 204, 206, 209, 219, 230, 233, 237, 239, 242, 243, 249
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
REFERENCES
|
R. K. Guy, Unsolved Problems in Number Theory, E31.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
|
|
EXAMPLE
|
17 is present because it equals 2*9-1.
|
|
MATHEMATICA
|
f[s_, mx_] := Union[s, Select[Apply[Times, Subsets[s, {2}], {1}] - 1, # <= mx &]]; mx = 250; FixedPoint[f[#, mx] &, {2, 3}] (* Jean-François Alcover, Mar 29 2011 *)
|
|
PROG
|
(Haskell)
import Data.Set (singleton, deleteFindMin, fromList, union)
a005244 n = a005244_list !! (n-1)
a005244_list = f [2] (singleton 2) where
f xs s = y :
f (y : xs) (s' `union` fromList (map ((subtract 1) . (* y)) xs))
where (y, s') = deleteFindMin s
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,nice,easy
|
|
AUTHOR
|
D. R. Hofstadter
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|