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.

A377539 The number of iterations of the map x -> x + A000005(x), starting from n, until reaching an even number, and always at least one iteration taken.

This page as a plain text file.
%I A377539 #40 Jan 15 2025 09:17:06
%S A377539 1,1,4,3,3,1,2,1,1,1,6,1,5,1,4,3,4,1,3,1,2,1,2,1,1,1,16,1,16,1,15,1,
%T A377539 14,1,13,11,13,1,12,1,12,1,11,1,10,1,2,1,1,1,9,1,9,1,8,1,7,1,7,1,6,1,
%U A377539 5,5,5,1,5,1,4,1,4,1,3,1,2,1,2,1,2,1,1,1,38,1,37,1,36,1,36,1,35,1,35
%N A377539 The number of iterations of the map x -> x + A000005(x), starting from n, until reaching an even number, and always at least one iteration taken.
%C A377539 The iteration step is x -> A062249(x).
%C A377539 a(n) = 1 if and only if n is an odd square (A016754) or an even nonsquare (A157502). - _Robert Israel_, Oct 31 2024
%C A377539 Therefore, a(n) = 1 <=> A323158(n) = 0. - _Antti Karttunen_, Jan 15 2025
%H A377539 Antti Karttunen, <a href="/A377539/b377539.txt">Table of n, a(n) for n = 1..20000</a>
%e A377539 For n = 2, there is a(2) = 1 iteration to an even number: 2 -> 4 (with at least one iteration so 2 itself is not the even number target).
%e A377539 For n = 3 there are a(3) = 4 iterations to reach an even number: 3 -> 5 -> 7 -> 9 -> 12.
%p A377539 f:= proc(n) local x,i;
%p A377539   x:= n;
%p A377539   for i from 1 do x:= x + numtheory:-tau(x); if x::even then return i fi od
%p A377539 end proc:
%p A377539 map(f, [$1..200]); # _Robert Israel_, Oct 31 2024
%t A377539 a[n_] := -1 + Length@ NestWhileList[# + DivisorSigma[0, #] &, n, OddQ, {2, 1}]; Array[a, 100] (* _Amiram Eldar_, Oct 31 2024 *)
%o A377539 (PARI) A377539(n) = for(i=1,oo,if(!((n=(n+numdiv(n)))%2),return(i))); \\ _Antti Karttunen_, Jan 15 2025
%Y A377539 Cf. A000005, A062249 (step), A064491 (trajectory of 1), A016754, A157502, A323158.
%K A377539 nonn,look
%O A377539 1,3
%A A377539 _Ctibor O. Zizka_, Oct 31 2024