OFFSET
1,2
LINKS
M. F. Hasler, Table of n, a(n) for n = 1..20000, Nov 19 2019 (first 1000 terms from Michel Marcus)
M. Alekseyev, PARI/GP Scripts for Miscellaneous Math Problems: invsigma.gp, Oct. 2005
G. L. Cohen and H. J. J. te Riele, Iterating the sum-of-divisors function, Experimental Mathematics, 5 (1996), pp. 91-100.
R. J. Mathar, Illustrations
FORMULA
EXAMPLE
We have the following trees (a <- b means sigma(a) = b):
2 <-- 3 <-- 4 <-- 7 <-- 8 <-- 15 <-- 24 <-- 60 <-- ...
9 <-- 13 <-- 14 <-’
5 <-- 6 <-- 12 <-- 28 <-- 56 <-- 120 <-- ...
11 <-’ /
10 <-- 18 <-- 39 <-’
The number 1 has strictly speaking an arrow to itself, so it is not part of a tree. (For all n > 1, sigma(n) > n, so no other fixed point or longer "cycle" can exist.) But actually we rather consider connected components, and let a(1) = 1 as the smallest element of this connected component.
a(2) = 2, since there is no smaller x such that sigma(x) = 2: the subtree with root 2 is reduced to a single node: 2. Similarly, a(m) = m for all m in A007369.
For n=3, since sigma(2) = 3, the tree whose root is 3 has 2 nodes: 2 and 3, and the smallest one is 2, hence a(3) = 2.
Similarly, although 24 occurs directly first at sigma(14), it is also reached from 15 which is in turn reached, via intermediate steps, from 2. Thus, the subtree with root 24 has as 2 as smallest element, whence a(24) = 2.
PROG
(PARI) lista(nn) = {my(v = vector(nn)); v[1] = 1; for (i=2, nn, my(s = i); while (s <= nn, if (v[s] == 0, v[s] = i); s = sigma(s); ); ); for (i=1, nn, if (v[i] == 0, v[i] = i); ); v; } \\ Michel Marcus, Nov 19 2019
(PARI) A257670(n)=if(n>2, vecmin(concat(apply(self, invsigma(n)), n)), n) \\ See Alekseyev-link for invsigma(). - David A. Corneth and M. F. Hasler, Nov 20 2019
CROSSREFS
Cf. A257669 (number of terms in current tree).
KEYWORD
nonn
AUTHOR
Michel Marcus, May 03 2015
EXTENSIONS
Edited by M. F. Hasler, Nov 19 2019
STATUS
approved