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.

A322996 Number of iterations of A049820(x) = x - A000005(x) needed to reach an odd number or zero, when starting from x = n.

This page as a plain text file.
%I A322996 #17 Jan 15 2025 10:32:50
%S A322996 0,0,1,0,1,0,2,0,2,0,3,0,3,0,4,0,1,0,4,0,5,0,5,0,2,0,6,0,6,0,6,0,7,0,
%T A322996 7,0,1,0,8,0,8,0,8,0,9,0,9,0,9,0,10,0,10,0,10,0,10,0,11,0,10,0,12,0,1,
%U A322996 0,12,0,13,0,13,0,11,0,14,0,14,0,14,0,14,0,15,0,12,0,16,0,15,0,15,0,17,0,16,0,13,0,18,0,1,0,17,0,14,0
%N A322996 Number of iterations of A049820(x) = x - A000005(x) needed to reach an odd number or zero, when starting from x = n.
%H A322996 Antti Karttunen, <a href="/A322996/b322996.txt">Table of n, a(n) for n = 0..16384</a>
%H A322996 Antti Karttunen, <a href="/A322996/a322996.txt">Data supplement: n, a(n) computed for n = 1..110880</a>
%F A322996 a(0) = 0; for n >= 1, for n odd, a(n) = 0, and for n even, a(n) = 1 + a(n-A000005(n)).
%F A322996 a(n) <= A155043(n).
%F A322996 For n >= 83, a(2*n) = 1+A322987(2*n).
%t A322996 A322996[n_] := A322996[n] = If[n == 0 || OddQ[n], 0, 1 + A322996[n - DivisorSigma[0, n]]];
%t A322996 Array[A322996, 100, 0] (* _Paolo Xausa_, Jan 15 2025 *)
%o A322996 (PARI) A322996(n) = if((!n)||(n%2),0,1+A322996(n-numdiv(n)));
%o A322996 (PARI) A322996(n) = { for(j=0,oo,if((!n)||(n%2),return(j)); n -= numdiv(n)); };
%Y A322996 Cf. A000005, A049820, A155043, A259934, A322987, A322997 (bisection), A323073.
%Y A322996 Cf. also A322983.
%K A322996 nonn
%O A322996 0,7
%A A322996 _Antti Karttunen_, Jan 05 2019