

A262680


Number of squares encountered before zero is reached when iterating A049820 starting from n: a(0) = 0 and for n >= 1, a(n) = A010052(n) + a(A049820(n)).


10



0, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)



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 parentchild 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

(Scheme, with memoizationmacro definec)
(definec (A262680 n) (if (zero? n) n (+ (A010052 n) (A262680 (A049820 n)))))


CROSSREFS

Bisections: A262681, A262682.
Cf. A262687 (positions of records).
Cf. A000005, A000290, A010052, A049820, A155043, A259934, A261088, A262509, A262514, A262676, A262677.
Sequence in context: A114114 A090787 A229707 * A191329 A096661 A199339
Adjacent sequences: A262677 A262678 A262679 * A262681 A262682 A262683


KEYWORD

nonn


AUTHOR

Antti Karttunen, Oct 03 2015


STATUS

approved



