OFFSET
0,5
COMMENTS
Number of perfect squares (A000290) encountered before zero is reached when starting from k = n and repeatedly applying the map that replaces k by k - d(k), where d(k) is the number of divisors of k (A000005). This count includes n itself if it is a square, but excludes the final zero.
Also number of times the parity (of numbers encountered) changes until zero is reached when iterating A049820. This count includes also the last parity change 1 - d(1) -> 0 if coming to zero through 1.
There is a lower bound for this sequence that grows without limit if and only if either (1) A259934 is indeed the unique sequence (satisfying its given condition) and it contains an infinite number of squares (see A262514), or (2) more generally, if each one of all (hypothetically multiple) infinite branches of the tree (defined by parent-child relation A049820(child) = parent) contains an infinite number of squares. See also comments in A262509.
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..10201
EXAMPLE
For n=1, we subtract 1 - A000005(1) = 0, thus we reach zero in one step, and the starting value 1 is a square, thus a(1) = 1. Also, the parity changes once, from odd to even as we go from 1 to 0.
For n=24, when we start repeatedly subtracting the number of divisors (A000005), we obtain the following numbers: 24 - A000005(24) = 24 - 8 = 16, 16 - A000005(16) = 16 - 5 = 11, 11 - 2 = 9, 9 - 3 = 6, 6 - 4 = 2, 2 - 2 = 0. Of these numbers, 16 and 9 are squares larger than zero, thus a(24)=2. Also, we see that the parity changes twice: from even to odd at 16 and then back from odd to even at 9.
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 03 2015
STATUS
approved