login
Odd part of n modulo 9.
8

%I #11 Aug 29 2024 09:15:58

%S 1,1,3,1,5,3,7,1,0,5,2,3,4,7,6,1,8,0,1,5,3,2,5,3,7,4,0,7,2,6,4,1,6,8,

%T 8,0,1,1,3,5,5,3,7,2,0,5,2,3,4,7,6,4,8,0,1,7,3,2,5,6,7,4,0,1,2,6,4,8,

%U 6,8,8,0,1,1,3,1,5,3,7,5,0,5,2,3,4,7,6,2,8,0,1,5,3,2,5,3,7,4,0,7,2,6

%N Odd part of n modulo 9.

%H Amiram Eldar, <a href="/A099550/b099550.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A010878(A000265(n)).

%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 4. - _Amiram Eldar_, Aug 29 2024

%t a[n_] := Mod[n / 2^IntegerExponent[n, 2], 9]; Array[a, 100] (* _Amiram Eldar_, Aug 29 2024 *)

%o (PARI) a(n) = (n>>valuation(n, 2))%9 \\_Charles R Greathouse IV_, May 14 2014

%Y Cf. A000265, A010878.

%Y Cf. A099544, A099545, A099546, A099547, A099548, A099549, A099551.

%K nonn,easy

%O 1,3

%A _Ralf Stephan_, Oct 23 2004