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.

Showing 1-1 of 1 results.

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

Views

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.
Showing 1-1 of 1 results.