login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Odd part of n modulo 8.
8

%I #12 Aug 29 2024 09:16:01

%S 1,1,3,1,5,3,7,1,1,5,3,3,5,7,7,1,1,1,3,5,5,3,7,3,1,5,3,7,5,7,7,1,1,1,

%T 3,1,5,3,7,5,1,5,3,3,5,7,7,3,1,1,3,5,5,3,7,7,1,5,3,7,5,7,7,1,1,1,3,1,

%U 5,3,7,1,1,5,3,3,5,7,7,5,1,1,3,5,5,3,7,3,1,5,3,7,5,7,7,3,1,1,3,1,5,3

%N Odd part of n modulo 8.

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

%F a(n) = A010877(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], 8]; Array[a, 100] (* _Amiram Eldar_, Aug 29 2024 *)

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

%Y Cf. A000265, A010877.

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

%K nonn,easy

%O 1,3

%A _Ralf Stephan_, Oct 23 2004