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.

User: Itamar Zamir

Itamar Zamir's wiki page.

Itamar Zamir has authored 3 sequences.

A369841 n-th digit of the decimal expansion of 1/n, with the digit to the left of the decimal point counted as the first digit.

Original entry on oeis.org

1, 5, 3, 0, 0, 6, 7, 0, 1, 0, 9, 3, 3, 5, 6, 0, 7, 5, 1, 0, 4, 5, 3, 6, 0, 5, 3, 5, 1, 3, 9, 0, 3, 5, 5, 7, 7, 5, 2, 0, 9, 0, 3, 2, 2, 5, 7, 3, 8, 0, 1, 9, 3, 1, 1, 1, 1, 5, 1, 6, 9, 5, 1, 0, 3, 5, 7, 4, 1, 4, 9, 8, 3, 5, 3, 3, 9, 2, 1, 0, 7, 5, 3, 0, 7, 5, 1, 6, 1, 1, 9, 0, 1, 5, 5, 6, 7, 6, 1, 0
Offset: 1

Author

Itamar Zamir, Feb 03 2024

Keywords

Comments

The digits seem to occur with unequal frequency. In the limit as n increases, it seems that the digits, sorted in decreasing order of frequency of occurrence, are 0,5,1,3,7,9,2,6,8,4.

Examples

			a(2) = 5 since 1/2 = 0.5 and the 2nd digit of "0.5" (including the 0) is 5.
a(7) = 7 since 1/7 = 0.142857142857... and its 7th digit is 7.
From _Jon E. Schoenfield_, Feb 03 2024: (Start)
In each row of the following table, the n-th digit is surrounded by spaces:
.
   n         1/n         a(n)
  --  -----------------  ----
   1   1 .0000000000...    1
   2  0. 5 000000000...    5
   3  0.3 3 33333333...    3
   4  0.25 0 0000000...    0
   5  0.200 0 000000...    0
   6  0.1666 6 66666...    6
   7  0.14284 7 1428...    7
   8  0.125000 0 000...    0
   9  0.1111111 1 11...    1
  10  0.10000000 0 0...    0
(End)
		

Crossrefs

Cf. A061480.

Programs

  • Mathematica
    Table[Mod[Floor[10^(n-1)/n],10],{n,100}] (* James C. McMahon, Feb 04 2024 *)
  • Python
    def a(n): return (10**(n-1)//n)%10
    print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Feb 03 2024

Formula

a(n) = floor((10^(n-1))/n) mod 10.

A362840 a(n) is the smallest number x between 1 and n-1 for which the number 1/x achieves the longest cycle of repeating digits in its expansion in base n.

Original entry on oeis.org

2, 3, 3, 5, 5, 5, 7, 7, 9, 7, 11, 9, 13, 11, 11, 11, 13, 17, 19, 19, 17, 17, 23, 23, 25, 23, 19, 23, 29, 29, 23, 31, 29, 23, 29, 23, 37, 29, 19, 37, 31, 31, 17, 43, 41, 43, 47, 37, 47, 47, 41, 49, 53, 53, 47, 53, 49, 47, 59, 47, 61, 59, 59, 47, 61, 61, 67, 59, 61, 59
Offset: 3

Author

Itamar Zamir, May 05 2023

Keywords

Comments

Terminating expansions, in any base, are considered to have a cycle period of length 0.
It appears by observation that all terms in the sequence are either primes or powers of primes.

Examples

			a(3)=2 since in base 3, 1/2 is represented by 0.111... with a cycle of 1 repeating digit, which is the longest cycle among 1/x for x = 1..2.
a(10)=7 since in base 10, 1/7 is represented by 0.142857... with a cycle of 6 repeating digits, which is the longest cycle among 1/x for x = 1..9.
		

Crossrefs

Cf. A362865 (corresponding cycle lengths).
Cf. A051626.

A362865 a(n) is the length of the longest possible cycle of repeating digits in the digits expansion of 1/x, in base n, among all numbers x between 1 and n-1.

Original entry on oeis.org

1, 1, 2, 1, 4, 4, 3, 6, 6, 6, 10, 6, 12, 5, 10, 10, 12, 16, 18, 18, 16, 16, 11, 11, 20, 22, 18, 22, 28, 28, 22, 30, 14, 11, 28, 22, 36, 28, 18, 36, 30, 30, 16, 42, 40, 42, 23, 36, 23, 46, 40, 42, 52, 52, 46, 52, 42, 46, 58, 46, 60, 29, 58, 46, 60, 60, 66, 58, 60
Offset: 3

Author

Itamar Zamir, May 06 2023

Keywords

Comments

This longest cycle may be attained by multiple values of x, among which x = A362840(n) is the smallest.

Examples

			a(10)=6 since in base 10, the longest possible cycle of recurrent digits for 1/x is of length 6, which appears for 1/7 = 0.142857...
		

Crossrefs

Cf. A362840.
Cf. A051626.