A068542 Period of the fraction 1/3^n.
3, 1, 370, 123456790, 411522633744855967078189300, 137174211248285322359396433470507544581618655692729766803840877914951989026063100
Offset: 1
Keywords
Examples
1/3^3 = 0.0370370370..., hence a(3) = 370.
Links
- Robert Israel, Table of n, a(n) for n = 1..8
Programs
-
Maple
f:= proc(n) local k,v; k:= numtheory:-order(10,3^n); v:= (10^k-1)/3^n; v * 10^(k-ilog10(v)-1) end proc: map(f, [$1..8]); # Robert Israel, Jul 23 2025
-
PARI
apply( {A068542(n)=10^(3^max(n-2,0)+logint(3^n,10))\3^n}, [1..6]) \\ M. F. Hasler, Apr 23 2021
Formula
a(n) = floor(10^(3^max(n-2,0)+L(3^n))/3^n) where L(m) = floor(log10(m)). - M. F. Hasler, Apr 23 2021
Comments