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.

Previous Showing 41-47 of 47 results.

A158899 These are numbers n such that the reciprocal, 1/n, is a repeating fraction whose period is n/2 - 1.

Original entry on oeis.org

14, 34, 38, 46, 58, 94, 118, 122, 194, 218, 226, 262, 298, 334, 358, 362, 386, 446, 458, 466, 514, 526, 538, 626, 674, 734, 758, 766, 778, 838, 866, 922, 974, 982, 998, 1006, 1018, 1082, 1142, 1154, 1186, 1238, 1294, 1318, 1402, 1418, 1454, 1486, 1622, 1642
Offset: 1

Views

Author

Robert Hutchins, Mar 29 2009

Keywords

Comments

These numbers relate to the long period primes, those that for 1/m the period is m-1 (sequence A006883) in that by multiplying each term in the long period primes by 2, this sequence is generated.

Crossrefs

Programs

  • PARI
    forstep(n=2, 2e3, 2, if ((setminus(Set(factor(n)[,1]), Set([2,5])) != []) && (znorder(Mod(10, n/2^valuation(n, 2)/5^valuation(n, 5))) + 1 == n/2), print1(n, ", "));); \\ Michel Marcus, Feb 24 2013

Extensions

More terms and edited by Michel Marcus, Feb 24 2013

A173491 a(n) is the least k such that the period of the decimal expansion of 1/k is A000204(n).

Original entry on oeis.org

3, 27, 101, 239, 21649, 19, 3191, 35121409, 722817036322379041, 2241, 797, 967, 1230610745978027, 3373, 60787, 509538919, 15060275578609, 5779, 37397, 423557
Offset: 1

Views

Author

Michel Lagneau, Feb 19 2010

Keywords

Comments

Smallest k such that A007732(k) = A000204(n).
For the large numbers (p > 70), the Maple program below is very slow. So we use a process of two steps: first, factor 10^p-1 using the elliptic curve method; then, for each factor q(k), k=1,2,...,r, compute the period of 1/q(k) and keep the period q(i) such that q(i) ... [unfinished sentence? - R. J. Mathar, Feb 24 2010] Compare the Maple section of A170945!

Examples

			a(1)=3 because the period of 1/3 = 0.333... is 1, and 3 is the smallest number with that period.
a(2)=27 because the period of 1/27 = 0.037037... is 3 = A000204(2), and 27 is the smallest number with that period.
a(3)=101 because the period of 1/101 = 0.00990099... is 4 = A000204(3), and 101 is the smallest number with that period.
a(4)= 239 because the period of 1/239 = 0.00418410041841... is 7 = A000204(4), and 239 is the smallest number with that period.
		

References

  • V. E. Hoggatt, Jr., Fibonacci and Lucas Numbers. Houghton, Boston, MA, 1969.
  • Thomas Koshy, "Fibonacci and Lucas Numbers with Applications", John Wiley and Sons, 2001.
  • S. Vajda, Fibonacci and Lucas numbers and the Golden Section, Ellis Horwood Ltd., Chichester, 1989.

Crossrefs

Programs

  • Maple
    T:=array(0..100); U:=array(0..100); n0:=1: n1:=3: T[1] := 1: T[2] := 3:for i from 3 to 30 do: n2:=n0+n1: T[i]:=n2: n0:=n1: n1:=n2: od:
    for q from 1 to 7 do: p0:=T[q]: indic:=0: for n from 1 to 25000 do: for p from 1 to 30 while(irem(10^p, n)<>1 or gcd(n,10)<>1 ) do: od: if irem(10^p,n) = 1 and gcd(n,10) = 1 and p=p0 and indic=0 then U[q]:=n: indic:=1: else fi: od: od:
    for n from 1 to 7 do: print( U[n]): od:
  • Mathematica
    (* This [slow] mma program gives all denominators < 50000 and disagrees with existing sequence for n = 11: a(11) = 797 instead of 29453 *) a204[n_] := a204[n] = Coefficient[Series[(2 - t )/(1 - t - t^2), {t, 0, n}], t^n] ; a7732[n_] := a7732[n] = MultiplicativeOrder[10, FixedPoint[Quotient[#, GCD[#, 10]] &, n]]; a[n_] := (k = 2; While[k++; k < 50000 && a7732[k] != a204[n] ]; k); Table[a[n], {n, 1, 15}](* Jean-François Alcover, Sep 02 2011 *)

Extensions

References to unrelated sequences removed by R. J. Mathar, Feb 24 2010
Extended with the help of Jean-François Alcover and D. S. McNeil by T. D. Noe, Sep 07 2011

A176921 Period of decimal representation of 1/n^3.

Original entry on oeis.org

1, 1, 3, 1, 1, 3, 294, 1, 81, 1, 242, 3, 1014, 294, 3, 1, 4624, 81, 6498, 1, 294, 242, 11638, 3, 1, 1014, 2187, 294, 23548, 3, 14415, 1, 726, 4624, 294, 81, 4107, 6498, 1014, 1, 8405, 294, 38829, 242, 81, 11638, 101614, 3, 100842, 1, 13872, 1014, 36517, 2187
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    DigitCycleLength[r_Rational,b_Integer?Positive]:=MultiplicativeOrder[b,FixedPoint[Quotient[ #,GCD[ #,b]]&,Denominator[r]]];Table[If[n<2,1,DigitCycleLength[1/n^3,10]],{n,5!}]

A225488 Murai Chuzen numbers.

Original entry on oeis.org

9, 45, 3, 225, 18, 15, -1, 1125, 1, 99, 495, 33, 2475, 198, 165, -1, 12375, 11, 999, 4995, 333, 24975, 1998, 1665, -1, 124875, 111, 9999, 49995, 3333, 249975, 19998, 16665, -1, 1249875, 1111, 99999, 49995, 33333, 2499975, 199998, 166665, -1, 12499875, 11111, 999999, 4999995, 333333, 24999975, 1999998, 1666665, -1, 124999875, 111111
Offset: 1

Views

Author

Jonathan Sondow, May 10 2013

Keywords

Comments

"Murai Chuzen divides 9 by 1, 2, 3, 4, 5, 6, 7, 8, 9, getting the figures 9, 45, 3, 225, 18, 15, x (not divisible), 1125, 1, -- without reference to the decimal points. Similarly he divides 99 by 1, 2, 3, 4, 5, 6, 7, 8, 9, getting the figures 99, 495, 33, 2475, 198, 165, x, 12375, 11. Next he divides 999 by 1, 2, 3, 4, 5, 6, 7, 8, 9, getting the figures 999, 4995, 333, 24975, 1998, 1665, x, 124875, 111." (Smith and Mikami, expanded and corrected)
Smith and Mikami put "x" whenever a decimal does not terminate. In the data, I put -1 instead of "x".
Murai Chuzen concludes that if 1 is divided by 9, 45, 3, 225, 18, 15, 1125, and 1, the results will have one-digit repetends; if 1 is divided by 99, 495, 33, 2475, 198, 165, 12375, and 11, the results will have two-digit repetends; if 1 is divided by 999, 4995, 333, 24975, 1998, 1665, 124875, and 111, the results will have three-digit repetends; etc.

Examples

			9/1 = 9, so a(1) = 9; 9/2 = 4.5, so a(2) = 45; 9/7 does not terminate, so a(7) = -1; 9/8 = 1.125, so a(8) = 1125; 9/9 = 1, so a(9) = 1.
99/1 = 99, so a(10) = 99; 99/2 = 49.5, so a(11) = 495.
		

References

  • Murai Chuzen, Sampo Doshi-mon (Arithmetic for the Young), 1781.

Crossrefs

A306036 a(n) is the period of the decimal expansion of 1/(100^n - 10^n - 1).

Original entry on oeis.org

44, 468, 496620, 16090340, 2499916380, 499999499999, 47368416315780, 71942445323740, 71428571357142857, 2413792682560590100, 661025543433488700, 998035336547180189380, 9826562531691739684620, 3086415088517393302531635, 33093525179856082014388489204
Offset: 1

Views

Author

Stephen Tucker, Jun 17 2018

Keywords

Comments

It appears that when Fibonacci numbers are written in base 10 diagonally (from top left to bottom right) such that each lower number is n digits farther to the right than its neighbor above, and the columns of digits are summed, the resulting total digit string recurs after a(n) digits.

Examples

			For n = 1: the Fibonacci numbers 1, 1, 2, 3, 5, 8, 13, when written in a diagonal, with each number 1 digit farther to the right than its predecessor, and the columns summed, gives the digit string 112359... . After this is extended to 44 numbers, the digit string has another occurrence of 112359. I conjecture that this is because the reciprocal of 89 has a period of 44 digits. It also demonstrates an amazing property of Fibonacci numbers.
		

Crossrefs

Cf. A007732, A021093 (1/89), A086695.

Programs

  • Mathematica
    Array[MultiplicativeOrder[10, (100^# - 10^# - 1)] &, 15] (* Michael De Vlieger, Jun 29 2018 *)
  • PARI
    a(n) = znorder(Mod(10, 100^n-10^n-1)) \\ Felix Fröhlich, Jun 18 2018

Extensions

More terms from Jon E. Schoenfield and Felix Fröhlich, Jun 18 2018

A307070 a(n) is the number of decimal places before the decimal expansion of 1/n terminates, or the period of the recurring portion of 1/n if it is recurring.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 6, 3, 1, 1, 2, 1, 6, 6, 1, 4, 16, 1, 18, 2, 6, 2, 22, 1, 2, 6, 3, 6, 28, 1, 15, 5, 2, 16, 6, 1, 3, 18, 6, 3, 5, 6, 21, 2, 1, 22, 46, 1, 42, 2, 16, 6, 13, 3, 2, 6, 18, 28, 58, 1, 60, 15, 6, 6, 6, 2, 33, 16, 22, 6, 35, 1, 8, 3, 1, 18, 6, 6, 13
Offset: 1

Views

Author

Luke W. Richards, Mar 22 2019

Keywords

Comments

If the decimal expansion of 1/n terminates, we will write it as ending with infinitely many 0's (rather than 9's). Then for any n > 1, the expansion of 1/n consists of a preamble whose length is given by A051628(n), followed by a periodic part with period length A007732(n). This sequence is defined as follows: If the only primes dividing n are 2 and 5 (see A003592), a(n) = A051628(n), otherwise a(n) = A007732(n) (and the preamble is ignored). - N. J. A. Sloane, Mar 22 2019
This sequence was discovered by a school class (aged 12-13) at Arden School, Solihull, UK.
Equally space the digits 0-9 on a circle. The digits of the decimal expansion of rational numbers can be connected on this circle to form data visualizations. This sequence is useful, cf. A007732 or A051626, for identifying the complexity of that visualization.

Examples

			1/1 is 1.0. There are no decimal digits, so a(1) = 0.
1/2 is 0.5. This is a terminating decimal. There is 1 digit, so a(2) = 1.
1/6 is 0.166666... This is a recurring decimal with a period of 1 (the initial '1' does not recur) so a(6) = 1.
1/7 is 0.142857142857... This is a recurring decimal, with a period of 6 ('142857') so a(7) = 6.
		

Crossrefs

See A114205 and A051628 for the preamble, A036275 and A051626 for the periodic part.

Programs

  • PARI
    a(n) = my (t=valuation(n,2), f=valuation(n,5), r=n/(2^t*5^f)); if (r==1, max(t,f), znorder(Mod(10, r))) \\ Rémy Sigrist, May 08 2019
  • Python
    def sequence(n):
      count = 0
      dividend = 1
      remainder = dividend % n
      remainders = [remainder]
      no_recurrence = True
      while remainder != 0:
        count += 1
        dividend = remainder * 10
        remainder = dividend % n
        if remainder in remainders:
          if no_recurrence:
            no_recurrence = False
            remainders = [remainder]
          else:
            return len(remainders)
        else:
          remainders.append(remainder)
      else:
        return count
    

Extensions

More terms from Rémy Sigrist, May 08 2019

A381578 For n > 0, for k > n, a(n) is the least k such that the pre-period and first period of the decimal expansion of n/k contains every digit of n at least as many times it is contained in n.

Original entry on oeis.org

6, 7, 8, 7, 7, 9, 8, 9, 10, 17, 17, 14, 17, 17, 17, 17, 19, 19, 21, 21, 23, 23, 29, 28, 27, 27, 28, 29, 32, 31, 34, 34, 38, 38, 38, 38, 38, 39, 46, 43, 42, 43, 46, 46, 46, 47, 49, 49, 51, 51, 53, 53, 57, 56, 57, 57, 58, 59, 61, 61, 62, 63, 65, 65, 68, 67, 68, 69
Offset: 1

Views

Author

Ctibor O. Zizka, Feb 28 2025

Keywords

Comments

What is the density of a(n) = prime in this sequence ?

Examples

			n = 1:
  1/2 = 0.500...
  1/3 = 0.33...
  1/4 = 0.2500...
  1/5 = 0.200...
  1/6 = 0.166... contains the digit 1, thus a(1) = 6.
n = 2:
  2/3 = 0.66...
  2/4 = 0.500...
  2/5 = 0.400...
  2/6 = 0.33...
  2/7 = 0.285714285714...contains the digit 2, thus a(2) = 7.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = n+1, r = Range[0, 9]}, While[! AllTrue[Count[Flatten[RealDigits[n/k][[1]]], #] & /@ r - DigitCount[n, 10, r], # >= 0 &], k++]; k]; Array[a, 100] (* Amiram Eldar, Feb 28 2025 *)
Previous Showing 41-47 of 47 results.