|
|
A021027
|
|
Decimal expansion of 1/23.
|
|
4
|
|
|
0, 4, 3, 4, 7, 8, 2, 6, 0, 8, 6, 9, 5, 6, 5, 2, 1, 7, 3, 9, 1, 3, 0, 4, 3, 4, 7, 8, 2, 6, 0, 8, 6, 9, 5, 6, 5, 2, 1, 7, 3, 9, 1, 3, 0, 4, 3, 4, 7, 8, 2, 6, 0, 8, 6, 9, 5, 6, 5, 2, 1, 7, 3, 9, 1, 3, 0, 4, 3, 4, 7, 8, 2, 6, 0, 8, 6, 9, 5, 6, 5, 2, 1, 7, 3, 9, 1, 3, 0, 4, 3, 4, 7, 8, 2, 6, 0, 8, 6
(list;
constant;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Since 23 is prime and the cycle of its reciprocal's base 10 digits is 22, 23 is a full reptend prime in base 10 (A001913). - Alonso del Arte, Mar 26 2020
|
|
LINKS
|
Index entries for linear recurrences with constant coefficients, signature (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1).
|
|
EXAMPLE
|
1/23 = 0.043478260869565217391304347826...
|
|
MATHEMATICA
|
Join[{0}, RealDigits[1/23, 10, 100][[1]]] (* Alonso del Arte, Mar 14 2020 *)
|
|
PROG
|
(Scala) def longDivRecip(n: Int, places: Int = 100): List[Int] = {
val pow10 = Math.pow(10, Math.ceil(Math.log10(Math.abs(n)))).toInt
val digits = new scala.collection.mutable.ListBuffer[Int]()
var quotient = pow10; var remainder = 0
while (digits.size < places) {
remainder = quotient % n; quotient /= n; digits += quotient
quotient = remainder * 10
}
digits.toList
}
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|