|
|
A366922
|
|
a(n) is the exponent of 3 in the prime factorization of 10^n - 1.
|
|
2
|
|
|
2, 2, 3, 2, 2, 3, 2, 2, 4, 2, 2, 3, 2, 2, 3, 2, 2, 4, 2, 2, 3, 2, 2, 3, 2, 2, 5, 2, 2, 3, 2, 2, 3, 2, 2, 4, 2, 2, 3, 2, 2, 3, 2, 2, 4, 2, 2, 3, 2, 2, 3, 2, 2, 5, 2, 2, 3, 2, 2, 3, 2, 2, 4, 2, 2, 3, 2, 2, 3, 2, 2, 4, 2, 2, 3, 2, 2, 3, 2, 2, 6, 2, 2, 3, 2, 2, 3, 2, 2, 4
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
1
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
a[n_]:=IntegerExponent[10^n-1, 3]; Array[a, 90] (* Stefano Spezia, Oct 28 2023 *)
|
|
PROG
|
(PARI) a366922(n) = valuation(10^n-1, 3)
(Python)
c = 0
a, b = divmod(10**n-1, 3)
while b == 0:
a, b = divmod(a, 3)
c += 1
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|