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.

A307388 Length of the period of decimal representation of Product_{k=1..n} A038111(k)/A038110(k).

This page as a plain text file.
%I A307388 #36 May 07 2019 15:47:34
%S A307388 1,27,729,59049,43046721,31381059609,68630377364883,
%T A307388 150094635296999121,328256967394537077627,717897987691852588770249,
%U A307388 4710128697246244834921603689,92709463147897837085761925410587,3649600726280146254718103955713167842
%N A307388 Length of the period of decimal representation of Product_{k=1..n} A038111(k)/A038110(k).
%C A307388 The offset is 9 since for 0 < n < 5, the product is an integer, and for 4 < n < 9 the decimal expansion ends with zeros.
%H A307388 Jamie Morken, <a href="https://mathematica.stackexchange.com/questions/194687/displaying-the-number-of-repeating-digits-in-a-fraction">Mathematica Stack Exchange question</a>
%e A307388 For example for n=9 with (2/1) * (6/1) * (15/1) * (105/4) * (385/8) * (1001/16) * (17017/192) * (323323/3072) * (7436429/55296) = 2759414170256180364552625 / 154618822656 = 17846560482454.30745852273604315188195970323350694444444444444... so a(9) = 1.
%t A307388 Primorial[n_] := Times @@ Prime[Range[n]]
%t A307388 ClearAll[iter]
%t A307388 ClearAll[fracPer, vp];
%t A307388 (*p-adic order*)
%t A307388 vp[p_?PrimeQ, n_Integer] :=
%t A307388   Length@NestWhileList[#/p &, n/p, IntegerQ] - 1;
%t A307388 (*fraction decimal expansion period*)
%t A307388 fracPer[q_Integer] := 0;
%t A307388 fracPer[q_Rational] := Module[{den, p2, p5}, den = Denominator[q];
%t A307388    p2 = vp[2, den];
%t A307388    p5 = vp[5, den];
%t A307388    den = den/2^p2/5^p5;
%t A307388    If[den == 1, 0, MultiplicativeOrder[10, den]]];
%t A307388 iter[{periods_, frac_, n_}] := {{periods, fracPer[#]}, #, n + 1} &[
%t A307388    frac*Primorial[n]/EulerPhi[Primorial[Max[1, n - 1]]]];
%t A307388 Flatten@First@
%t A307388   Nest[iter, {0, Primorial[0]/EulerPhi[Primorial[0]], 0}, 50]
%Y A307388 Cf. A038111, A038110, A051626, A058250.
%K A307388 nonn,base
%O A307388 9,2
%A A307388 _Jamie Morken_, Apr 06 2019