cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A274147 Number of integers in n-th generation of tree T(-1/2) defined in Comments.

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 6, 9, 13, 20, 31, 48, 70, 108, 165, 250, 379, 575, 875, 1332, 2017, 3066, 4661, 7076, 10751, 16328, 24801, 37684, 57229, 86931, 132062, 200588, 304701, 462844, 703043, 1067955, 1622207, 2464117, 3743047, 5685655, 8636525, 13118942, 19927624, 30270167, 45980452, 69844296, 106093768
Offset: 0

Views

Author

Clark Kimberling, Jun 11 2016

Keywords

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.
See A274142 for a guide to related sequences.

Examples

			For r = -1/2, we have g(3) = {3,2r,r+1, r^2}, in which the number of integers is a(3) = 2.
		

Crossrefs

Cf. A274142.

Programs

  • Maple
    A274147 := 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,'integer') then
                     a := a+1 :
                end if;
            end do:
            print(n,a) ;
        end do:
    end proc:
    A274147(-1/2) ; # 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 -> -1/2, {k, 1, z}]; Table[
    Count[Map[IntegerQ, u[[k]]], True], {k, 1, z}] (*A274147*)

Extensions

More terms from Kenny Lau, Jul 02 2016