A381494 Smallest number with reciprocal of period length n in base 7.
1, 2, 4, 9, 5, 2801, 36, 29, 64, 27, 11, 1123, 13, 16148168401, 113, 31, 17, 14009, 108, 419, 55, 261, 23, 47, 73, 2551, 53, 81, 145, 59, 99, 311, 256, 3631, 56036, 81229, 135, 223, 1676, 486643, 41, 83, 1017, 166003607842448777, 115, 837, 188, 13722816749522711, 153, 3529, 10204
Offset: 0
Examples
a(3)=9 since 1/9 has period 3 in base 7 (.053053053...) and no smaller number has this property.
References
- J. Brillhart et al., Factorizations of b^n +- 1. Contemporary Mathematics, Vol. 22, Amer. Math. Soc., Providence, RI, 2nd edition, 1985; and later supplements.
Programs
-
Maple
f:= proc(n) local d,k; for d in sort(convert(numtheory:-divisors(7^n-1),list)) do if andmap(k -> 7^k-1 mod d <> 0, [$1 .. n-1]) then return d fi od end proc: f(0):= 1: f(1):= 2: map(f, [$0..80]); # Robert Israel, Feb 28 2025
-
Mathematica
a[n_] := First[Select[Divisors[7^n - 1], MultiplicativeOrder[7, #] == n &, 1]]; a[0] = 1; a[1] = 2; Table[a[n], {n, 0, 50}]
-
Python
from sympy import divisors def A381494(n): return next(d for d in divisors(7**n-1) if d>1 and all(pow(7,k,d)!=1 for k in range(1,n))) if n else 1 # Chai Wah Wu, Feb 28 2025
Formula
Conjecture: a(n) = A218358(n) for n>=2. - R. J. Mathar, Mar 03 2025
Comments