OFFSET
1,1
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..440
J. O. M. Pedersen, Known Unitary Sociable Numbers of order different from four [Via Internet Archive Wayback-Machine]
MATHEMATICA
(* Function cycleL[] and support a034460[] are defined in A327159 *)
a327157[n_] := Map[cycleL, Range[n]]
a327157[45402] (* Hartmut F. W. Hoft, Feb 04 2024 *)
PROG
(PARI)
A034448(n) = { my(f=factorint(n)); prod(k=1, #f~, 1+(f[k, 1]^f[k, 2])); };
memo327159 = Map();
A327159(n) = if(1==n, 0, my(v, orgn=n, xs=Set([])); if(mapisdefined(memo327159, n, &v), v, while(n && !vecsearch(xs, n), xs = setunion([n], xs); n = A034460(n); if(mapisdefined(memo327159, n), for(i=1, #xs, mapput(memo327159, xs[i], 0)); return(0))); if(n==orgn, v = length(xs); for(i=1, v, mapput(memo327159, xs[i], v)), v = 0; mapput(memo327159, orgn, v)); (v)));
k=0; n=0; while(k<=1001, n++; if(t=A327159(n), k++; print(n, " -> ", t); write("b327157.txt", k, " ", n)));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 17 2019
STATUS
approved