login
A206743
G.f.: 1/(1 - x/(1 - x^2/(1 - x^5/(1 - x^12/(1 - x^29/(1 - x^70/(1 -...- x^Pell(n)/(1 -...)))))))), a continued fraction.
5
1, 1, 1, 2, 3, 5, 8, 13, 22, 36, 60, 99, 164, 272, 450, 746, 1235, 2046, 3389, 5613, 9299, 15402, 25514, 42262, 70005, 115962, 192084, 318182, 527053, 873043, 1446161, 2395504, 3968060, 6572925, 10887788, 18035177, 29874537, 49485965, 81971484, 135782448
OFFSET
0,4
COMMENTS
From Clark Kimberling, Jun 12 2016: (Start)
Number of real integers in n-th generation of tree T(2i) defined as follows.
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.
For r = 2i, then g(3) = {3,2r,r+1, r^2}, in which the number of real integers is a(3) = 2.
See A274142 for a guide to related sequences. (End)
FORMULA
a(n) ~ c * d^n, where d = 1.6564594309887754808836889708489581749625897572527517021957723319642053908... and c = 0.3844078703275069072126260832303344589497793302955451672191630264983... - Vaclav Kotesovec, Aug 25 2017
EXAMPLE
G.f.: A(x) = 1 + x + x^2 + 2*x^3 + 3*x^4 + 5*x^5 + 8*x^6 + 13*x^7 +...
MAPLE
A206743 := proc(r)
local gs, n, gs2, el, a ;
gs := [2, r] ;
for n from 3 do
gs2 := [] ;
for el in gs do
gs2 := [op(gs2), el+1, r*el] ;
end do:
gs := gs2 ;
a := 0 ;
for el in gs do
if type(el, 'realcons') then
a := a+1 :
end if;
end do:
print(n, a) ;
end do:
end proc: # R. J. Mathar, Jun 16 2016
MATHEMATICA
z = 18; t = Join[{{0}}, Expand[NestList[DeleteDuplicates[Flatten[Map[{# + 1, x*#} &, #], 1]] &, {1}, z]]]; u = Table[t[[k]] /. x -> 2 I, {k, 1, z}]; Table[Count[Map[IntegerQ, u[[k]]], True], {k, 1, z}] (* Clark Kimberling, Jun 12 2016 *)
PROG
(PARI) {Pell(n)=polcoeff(x/(1-2*x-x^2+x*O(x^n)), n)}
{a(n)=local(CF=1+x*O(x^n), M=ceil(log(2*n+1)/log(2.4))); for(k=0, M, CF=1/(1-x^Pell(M-k+1)*CF)); polcoeff(CF, n, x)}
for(n=0, 55, print1(a(n), ", "))
(Python)
N = 1000
pell = [0, 1]
c = 2
while c < N:
....pell.append(c)
....c = pell[-1]*2 + pell[-2]
pell.reverse()
gf = [0]*(N+1)
for p in pell:
....gf = [-x for x in gf]
....gf[0] += 1
....quotient = [0]*(N+1)
....remainder = [0]*(N+1)
....remainder[p] = 1
....for n in range(N+1):
........q = remainder[n]//gf[0]
........for i in range(n, N+1):
............remainder[i] -= q*gf[i-n]
........quotient[n] = q
....gf = quotient
for i in range(N+1):
....print(i, gf[i])
# Kenny Lau, Aug 01 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Feb 12 2012
STATUS
approved