cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A366922 a(n) is the exponent of 3 in the prime factorization of 10^n - 1.

This page as a plain text file.
%I A366922 #18 Oct 29 2023 14:58:08
%S A366922 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,
%T A366922 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,
%U A366922 3,2,2,4,2,2,3,2,2,3,2,2,6,2,2,3,2,2,3,2,2,4
%N A366922 a(n) is the exponent of 3 in the prime factorization of 10^n - 1.
%C A366922 1
%F A366922 a(n) = A007949(10^n - 1).
%F A366922 a(n) = A007949(n) + 2 = A051064(n) + 1.
%t A366922 a[n_]:=IntegerExponent[10^n-1,3]; Array[a,90] (* _Stefano Spezia_, Oct 28 2023 *)
%o A366922 (PARI) a366922(n) = valuation(10^n-1,3)
%o A366922 (Python)
%o A366922 def A366922(n):
%o A366922     c = 0
%o A366922     a, b = divmod(10**n-1, 3)
%o A366922     while b == 0:
%o A366922         a, b = divmod(a, 3)
%o A366922         c += 1
%o A366922     return c # _Chai Wah Wu_, Oct 29 2023
%Y A366922 Cf. A002283, A003020, A007949, A051064, A057951, A102347, A366921.
%K A366922 nonn,easy
%O A366922 1,1
%A A366922 _Hugo Pfoertner_, Oct 28 2023