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.

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.

This page as a plain text file.
%I A060370 #13 Mar 16 2022 20:00:01
%S A060370 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,
%T A060370 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,
%U A060370 3,1,2,3,11,2,1,2,1,1,1,4,2,2,1,3,2,1,2
%N 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.
%C A060370 The sequence of 2nd, 4th and following terms coincides with A006556, which gives the "number of different cycles of digits in the decimal expansions of 1/p, 2/p, ..., (p-1)/p where p = n-th prime different from 2 or 5".
%H A060370 Carmine Suriano and T. D. Noe, <a href="/A060370/b060370.txt">Table of n, a(n) for n = 1..10000</a> (first 101 terms from Carmine Suriano)
%F A060370 a(n) = (b(n)-1)/c(n), where b(n) and c(n) are the n-th terms of A000040 and A048595 respectively.
%e A060370 a(13) = 40/5 = 8, since 41 is the 13th prime and the periodic part of 1/41 = 0.02439024390... consists of 5 digits.
%t A060370 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 *)
%o A060370 (Python) from sympy import prime, n_order
%o A060370 def A060370(n): return 1 if n == 1 or n == 3 else n_order(10, prime(n))
%o A060370 print([(prime(n)-1)//A060370(n) for n in range(1,86)]) # _Karl-Heinz Hofmann_, Mar 16 2022
%Y A060370 Cf. A000040, A060283, A048595, A006556.
%K A060370 nonn,base
%O A060370 1,2
%A A060370 _Klaus Brockhaus_, Apr 01 2001