OFFSET
0,4
COMMENTS
Let T* be the infinite tree with root 0 generated by these rules: if p is in T*, then p+1 is in T* and x*p is in T*. Let g(n) be the set of nodes in the n-th generation, so that g(0) = {0}, g(1) = {1}, g(2) = {2,x}, g(3) = {3,2x,x+1,x^2}, etc. Let T(r) be the tree obtained by substituting r for x.
Guide to related sequences:
r sequence
1/2 A274142
1/3 A274143
1/4 A274144
2/3 A274145
3/4 A274146
-1/2 A274147
-1/3 A274148
-1/4 A274149
-2/3 A274150
-3/4 A274151
3/2 A274152
5/2 A274153
-3/2 A274154
-5/2 A274155
2^(1/2) A000045 (Fibonacci numbers)
2^(1/3) A000930
2^(1/4) A003269
2^(-1/2) A274156
3^(-1/2) A274157
2^(-1/3) A274158
3^(-1/3) A274159
i A274160
2i A206743
3i A274162
4i A274163
i/2 A274149
i/3 A274165
i+1 A274166
i-1 A274167
(-1+3i)/2 A274168
LINKS
Kenny Lau, Table of n, a(n) for n = 0..5847
EXAMPLE
If r = 1/2, then g(3) = {3,2r,r+1, r^2}, in which the integers are 3 and 1, so that a(3) = 2.
MATHEMATICA
z = 18; t = Join[{{0}}, Expand[NestList[DeleteDuplicates[Flatten[Map[{# + 1, x*#} &, #], 1]] &, {1}, z]]];
u = Table[t[[k]] /. x -> 1/2, {k, 1, z}];
Table[Count[Map[IntegerQ, u[[k]]], True], {k, 1, z}]
(* second program: *)
T[0] = {0}; T[n_] := T[n] = Complement[Join[T[n-1]+1, x*T[n-1]], T[n-1]]; Reap[For[n = 0, n <= 25, n++, cnt = Count[T[n] /. x -> 1/2, _Integer]; Print[n, " ", cnt]; Sow[cnt]]][[2, 1]] (* Jean-François Alcover, Jun 14 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jun 11 2016
EXTENSIONS
More terms from Jean-François Alcover, Jun 14 2016
More terms from Kenny Lau, Jul 04 2016
STATUS
approved