cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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)).

This page as a plain text file.
%I A262680 #36 Oct 04 2015 02:39:35
%S A262680 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,
%T A262680 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,
%U A262680 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
%N 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)).
%C A262680 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.
%C A262680 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.
%C A262680 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.
%H A262680 Antti Karttunen, <a href="/A262680/b262680.txt">Table of n, a(n) for n = 0..10201</a>
%e A262680 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.
%e A262680 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.
%o A262680 (Scheme, with memoization-macro definec)
%o A262680 (definec (A262680 n) (if (zero? n) n (+ (A010052 n) (A262680 (A049820 n)))))
%Y A262680 Bisections: A262681, A262682.
%Y A262680 Cf. A262687 (positions of records).
%Y A262680 Cf. A000005, A000290, A010052, A049820, A155043, A259934, A261088, A262509, A262514, A262676, A262677.
%K A262680 nonn
%O A262680 0,5
%A A262680 _Antti Karttunen_, Oct 03 2015