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.
%I A006556 M0175 #30 Jul 02 2025 16:01:55 %S A006556 2,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, %T A006556 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, %U A006556 2,3,11,2,1,2,1,1,1,4,2,2,1,3,2,1,2,2,14,3,1,3,2,2,1,1,1,1,1,10,2,1,6 %N A006556 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. %D A006556 J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996, p. 162. %D A006556 M. Kraitchik, Recherches sur la Théorie des Nombres. Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 1, p. 131. %D A006556 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A006556 T. D. Noe, <a href="/A006556/b006556.txt">Table of n, a(n) for n=3..1000</a> %H A006556 Victor Meally, <a href="/A006556/a006556.pdf">Letter to N. J. A. Sloane</a>, no date. %F A006556 (p-1)/x, where 10^x = 1 mod p. %e A006556 1/13=.0769230769..., 2/13=.1538461538..., 3/13= .2307692307..., etc., with 2 different cycles, so a(4) = 2 [13 is the 4th prime different from 2 or 5]. %t A006556 Map[(# - 1)/MultiplicativeOrder[10, #] &, {3}~Join~Prime@ Range[4, 101]] (* _Michael De Vlieger_, May 27 2020 *) %o A006556 (PARI) f(p) = (p-1)/znorder(Mod(10, p)); %o A006556 lista(nn) = {my(vp=select(x->(10%x), primes(nn))); apply(f, vp);} \\ _Michel Marcus_, May 27 2020 %Y A006556 See A048595 and A002371 for the length of the cycles. See also A054471. %K A006556 nonn,easy,base,nice %O A006556 3,1 %A A006556 _N. J. A. Sloane_ %E A006556 More terms from _James Sellers_, May 24 2000 %E A006556 Edited by _Charles R Greathouse IV_, Nov 01 2009