OFFSET
1,1
COMMENTS
Integral Fission (consecutive isomorphic trees): For a natural number, n, make it the root node of a binary tree. The left child node (L) is the largest divisor of n which is greater than 1 but less than or equal to the square root of n, if this exists. The right child node is n/L, if the left node exists. Thus if n is a prime it is a leaf node; otherwise if it is composite then it is the product of its two children. If n = 1 then we have an empty tree.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
Gordon Hamilton, Integral Fission, Video for grade 7 teachers
MAPLE
with(numtheory):
t:= proc(n) option remember; `if`(n=1, "0",
`if`(isprime(n), "10", (d-> cat("1", t(d), t(n/d), "0"))(
max(select(x-> is(x<=sqrt(n)), divisors(n))[]))))
end:
a:= proc(n) option remember; local k;
for k from 1 +`if`(n=1, 0, a(n-1))
while t(k)<>t(k+1) do od; k
end:
seq(a(n), n=1..60); # Alois P. Heinz, Aug 09 2014
MATHEMATICA
t[n_] := t[n] = If[n == 1, "0", If[PrimeQ[n], "10", ("1" <> t[#] <> t[n/#] <> "0"&)[Max[Select[Divisors[n], # <= Sqrt[n]&]]]]];
a[n_] := a[n] = (For[k = 1 + If[n == 1, 0, a[n-1]], t[k] != t[k+1], k++]; k);
Array[a, 60] (* Jean-François Alcover, Mar 27 2017, after Alois P. Heinz *)
PROG
(PARI) isok(n) = eqvec(empty(fiss(n)), empty(fiss(n+1))); \\ using A125508 scripts; Michel Marcus, May 25 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Gordon Hamilton, May 15 2014
EXTENSIONS
More terms from Michel Marcus, May 25 2014
STATUS
approved