A241954 Number of integers x such that the repeated application of sigma(x)->x leads to n.
1, 0, 1, 2, 0, 1, 3, 4, 0, 0, 0, 3, 1, 2, 5, 0, 0, 2, 0, 1, 0, 0, 0, 10, 0, 0, 0, 4, 0, 1, 2, 4, 0, 0, 0, 1, 0, 1, 3, 1, 0, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 2, 0, 9, 1, 0, 0, 14, 0, 1, 5, 0, 0, 0, 0, 1, 0, 0, 0, 6, 0, 1, 0, 0, 0, 1, 0, 3, 0, 0, 0, 4, 0, 0
Offset: 1
Keywords
Examples
There is a single integer such that sigma(x) = 1 so a(1) = 1. For n=4, we have only sigma(3) = 4 and sigma(sigma(2)) = 4, so a(4) = 2. For n=7, we have only sigma(4) = 7, sigma(sigma(3)) = 7, and sigma(sigma(sigma(2))) = 7, so a(7) = 3.
Links
- Jens Kruse Andersen, Table of n, a(n) for n = 1..10000
- G. L. Cohen and H. J. J. te Riele, Iterating the sum-of-divisors function, Experimental Mathematics, 5 (1996), pp. 93-100 (see p. 97)
Programs
-
PARI
isok(i, n) = {j = i; while((k = sigma(j)) < n, j = k); k == n;} a(n) = {if (n == 1, return (1)); nb = 0; for (i=2, n-1, nb += isok(i, n);); nb;}
Comments