OFFSET
1,2
COMMENTS
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. A term in this sequence a(n) is such that no number (x) exists 1<=x<a(n) with an isomorphic binary tree.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
Gordon Hamilton, Integral Fission, Video for grade 7 teachers
EXAMPLE
a(8) = 40, make this the root node.
40 is first decomposed into 5 and 8; 5 is a leaf node.
8 is decomposed into 2 and 4; 2 is a leaf node.
4 is decomposed into 2 and 2; both are leaf nodes.
There is no number x (where 1 <= x < 40) which has a factor decomposition binary tree isomorphic to this.
PROG
(PARI) fissr(n) = {if (isprime(n), n, my(d = divisors(n)); my(nddt = #d\2 + 1); if (#d % 2, [fissr(d[nddt]), n, fissr(d[nddt])], [fissr(d[nddt-1]), n, fissr(d[nddt])]); ); }
fiss(n) = if (n==1, [], if (type(fv = fissr(n))== "t_INT", [fv], fv));
empty(v) = {my(nv = vector(#v)); for (i=1, #v, if (type(v[i]) == "t_INT", nv[i] = 0, nv[i] = empty(v[i])); ); nv; }
eqvec(va, vb) = {if (type(va) != type(vb), return (0)); if (type(va) == "t_INT", return (va == vb)); if (#va != #vb, return (0)); for (i=1, #va, if (!eqvec(va[i], vb[i]), return (0)); ); return (1); }
isalready(erep, vrep) = {if (! #vrep, return (0)); for (j=1, #vrep, if (eqvec(erep, vrep[j]), return (1); ); ); return (0); }
addrep(erep, vrep) = {nvrep = vector(#vrep+1, i, if (i <= #vrep, vrep[i], 0)); nvrep[#vrep+1] = erep; nvrep; }
lista(nn) = {vrep = []; for (n=1, nn, rep = fiss(n); erep = empty(rep); if (! isalready(erep, vrep), print1(n, ", "); vrep = addrep(erep, vrep); ); ); } \\ Michel Marcus, May 25 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul Richards, Jan 18 2007
STATUS
approved