A122554 Let S(1) = {1} and, for n>1 let S(n) be the smallest set containing x, 2x and x+2 for each element x in S(n-1). a(n) is the number of elements in S(n).
1, 3, 6, 10, 15, 23, 35, 54, 84, 132, 209, 333, 533, 856, 1378, 2222, 3587, 5795, 9367, 15146, 24496, 39624, 64101, 103705, 167785, 271468, 439230, 710674, 1149879, 1860527, 3010379, 4870878, 7881228, 12752076, 20633273, 33385317, 54018557, 87403840, 141422362
Offset: 1
Keywords
Examples
Under the indicated set mapping we have {1} -> {1,2,3} -> {1,2,3,4,5,6} -> {1,2,3,4,5,6,7,8,10,12}, ..., so a(2)=3, a(3)=6, a(4)=10, etc.
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..43
Programs
-
Mathematica
Do[ Print@ Length@ Nest[ Union@ Flatten[ # /. a_Integer -> {a, 2a, a + 2}] &, {1}, n], {n, 0, 32}] (* Robert G. Wilson v, Sep 27 2006 *)
-
Python
from sympy import chain, islice def A122554_gen(): # generator of terms s = {1} while True: yield len(s) s = set(chain.from_iterable((x,x+2,2*x) for x in s)) A122554_list = list(islice(A122554_gen(),24)) # Chai Wah Wu, Jan 12 2022
Formula
Empirical g.f.: -x*(x^5-x^4-x^3-x^2+1) / ((x-1)^2*(x^2+x-1)). - Colin Barker, Nov 06 2014
Extensions
a(17)-a(33) from Robert G. Wilson v, Sep 27 2006
a(34)-a(36) from Jinyuan Wang, Apr 14 2020
a(37)-a(39) from Chai Wah Wu, Jan 12 2022
Comments