A054709 Number of powers of 8 modulo n.
1, 2, 2, 2, 4, 3, 1, 2, 2, 5, 10, 3, 4, 2, 4, 3, 8, 3, 6, 5, 2, 11, 11, 3, 20, 5, 6, 2, 28, 5, 5, 3, 10, 9, 4, 3, 12, 7, 4, 5, 20, 3, 14, 11, 4, 12, 23, 4, 7, 21, 8, 5, 52, 7, 20, 2, 6, 29, 58, 5, 20, 6, 2, 3, 4, 11, 22, 9, 22, 5, 35, 3, 3, 13, 20, 7, 10, 5, 13, 6, 18, 21, 82, 3, 8, 15, 28
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from David W. Wilson)
Crossrefs
Programs
-
Mathematica
a[n_] := IntegerExponent[4*n, 8] + MultiplicativeOrder[8, n/2^IntegerExponent[n, 2]]; Array[a, 100] (* Amiram Eldar, Aug 25 2024 *)
Formula
a(n) = valuation(4*n, 8) + A007739(n). - Amiram Eldar, Aug 25 2024