A060370 Ratios (p-1)/d, where p is a prime and d is the number of digits of the periodic part of the decimal expansion of 1/p.
1, 2, 4, 1, 5, 2, 1, 1, 1, 1, 2, 12, 8, 2, 1, 4, 1, 1, 2, 2, 9, 6, 2, 2, 1, 25, 3, 2, 1, 1, 3, 1, 17, 3, 1, 2, 2, 2, 1, 4, 1, 1, 2, 1, 2, 2, 7, 1, 2, 1, 1, 34, 8, 5, 1, 1, 1, 54, 4, 10, 2, 2, 2, 2, 1, 4, 3, 1, 2, 3, 11, 2, 1, 2, 1, 1, 1, 4, 2, 2, 1, 3, 2, 1, 2
Offset: 1
Examples
a(13) = 40/5 = 8, since 41 is the 13th prime and the periodic part of 1/41 = 0.02439024390... consists of 5 digits.
Links
- Carmine Suriano and T. D. Noe, Table of n, a(n) for n = 1..10000 (first 101 terms from Carmine Suriano)
Programs
-
Mathematica
Join[{1, 2, 4}, Table[p = Prime[n]; (p - 1)/Length[RealDigits[1/p, 10][[1, 1]]], {n, 4, 100}]] (* T. D. Noe, Oct 04 2012 *)
-
Python
from sympy import prime, n_order def A060370(n): return 1 if n == 1 or n == 3 else n_order(10, prime(n)) print([(prime(n)-1)//A060370(n) for n in range(1,86)]) # Karl-Heinz Hofmann, Mar 16 2022
Comments