%I
%S 0,1,2,3,4,6,9,10,16,21,36,45,55,81,100,136,231,256,441,666,1035,1296,
%T 1540,2025,3025,3321,5050,6561,9316,10000,18496,26796,32896,53361,
%U 65536,97461,194481,222111,443556,536130,840456,1071225,1186570,1679616,2051325
%N If x is in the sequence then so are x^2 and x(x+1)/2.
%H Reinhard Zumkeller, <a href="/A241241/b241241.txt">Table of n, a(n) for n = 1..1000</a>
%t Nest[Flatten[{#,#^2,(#(#+1))/2}]&,{0,1,2},5]//Union (* _Harvey P. Dale_, Aug 12 2016 *)
%o (Haskell)
%o import Data.Set (singleton, deleteFindMin, insert)
%o a241241 n = a241241_list !! (n1)
%o a241241_list = 0 : 1 : f (singleton 2) where
%o f s = m : f (insert (a000290 m) $ insert (a000217 m) s')
%o where (m, s') = deleteFindMin s
%Y Cf. A000290, A000217.
%Y Subsequence of A005214; some subsequences: A001146, A007501, A011764, A176594, A173501, A050909.
%K nonn
%O 1,3
%A _Reinhard Zumkeller_, Apr 17 2014
%E Initial 0 and 1 prepended by _Jon Perry_, Apr 17 2014
