OFFSET
1,2
COMMENTS
The top-down definition of the binomial tree suits Matula-Goebel numbering: The tree of n = 2^k + r vertices, for 1 <= r <= 2^k is the binomial tree of 2^k vertices and a child subtree under the root which is the binomial tree of r vertices.
In the tree of n vertices, adding a new singleton child under each vertex gives the tree of 2*n vertices, so that a(2*n) = A348067(a(n)).
LINKS
Kevin Ryde, Table of n, a(n) for n = 1..117
Kevin Ryde, PARI/GP Code
FORMULA
a(2^k + r) = a(2^k) * prime(a(r)) for 1 <= r <= 2^k.
a(2^k) = A076146(k+1), being a tree of order k.
EXAMPLE
The tree of n=13 vertices numbered 0..12 is
0
| \ \ \
1 2 4 8
| | \ | \ \
3 5 6 9 10 12
| |
7 11
Vertices 0..7 are the binomial tree of 2^k = 8 vertices, and vertices 8..12 are the binomial tree of 5 vertices.
Using the recurrence, a(13) = a(8 + 5) = a(8) * prime(a(5)) = 78*37 = 2886.
MATHEMATICA
Aseq[n_]:=Module[{A=ConstantArray[0, n]}, A[[1]]=1;
Do[A[[m]]=A[[2^Floor@Log2[m-1]]]*Prime[A[[m-2^Floor@Log2[m-1]]]], {m, 2, n}];
A]
StringRiffle[ToString/@Aseq[40], ", "] (* Vincenzo Librandi, Dec 12 2025 *)
PROG
(PARI) \\ See links.
(Magma) Aseq := function(n)
A := [0 : i in [1..n]]; A[1] := 1; for m in [2..n] do A[m] := A[2^Floor(Log(m-1)/Log(2))]*NthPrime(A[m-2^Floor(Log(m-1)/Log(2))]); end for; return A; end function; Aseq(40); // Vincenzo Librandi, Dec 12 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Kevin Ryde, Nov 25 2022
STATUS
approved
