A099551 Odd part of n modulo 10. Final digit of A000265(n).
1, 1, 3, 1, 5, 3, 7, 1, 9, 5, 1, 3, 3, 7, 5, 1, 7, 9, 9, 5, 1, 1, 3, 3, 5, 3, 7, 7, 9, 5, 1, 1, 3, 7, 5, 9, 7, 9, 9, 5, 1, 1, 3, 1, 5, 3, 7, 3, 9, 5, 1, 3, 3, 7, 5, 7, 7, 9, 9, 5, 1, 1, 3, 1, 5, 3, 7, 7, 9, 5, 1, 9, 3, 7, 5, 9, 7, 9, 9, 5, 1, 1, 3, 1, 5, 3, 7, 1, 9, 5, 1, 3, 3, 7, 5, 3, 7, 9, 9, 5, 1, 1
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
f:= n -> n/2^padic:-ordp(n,2) mod 10: map(f, [$1..200]); # Robert Israel, Aug 10 2018
-
Mathematica
Mod[Table[Max[Select[Divisors[n],OddQ]],{n,110}],10] (* Harvey P. Dale, Jun 22 2017 *) a[n_] := Mod[n / 2^IntegerExponent[n, 2], 10]; Array[a, 100] (* Amiram Eldar, Aug 29 2024 *)
-
PARI
a(n)=(n>>valuation(n,2))%10 \\ Charles R Greathouse IV, Dec 28 2012
Formula
G.f. g(x) satisfies: g(x) = g(x^2) + (x + 3*x^3 + 5*x^5 + 7*x^7 + 9*x^9)/(1-x^10). - Robert Israel, Aug 10 2018
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 5. - Amiram Eldar, Aug 29 2024