A021023 Decimal expansion of 1/19.
0, 5, 2, 6, 3, 1, 5, 7, 8, 9, 4, 7, 3, 6, 8, 4, 2, 1, 0, 5, 2, 6, 3, 1, 5, 7, 8, 9, 4, 7, 3, 6, 8, 4, 2, 1, 0, 5, 2, 6, 3, 1, 5, 7, 8, 9, 4, 7, 3, 6, 8, 4, 2, 1, 0, 5, 2, 6, 3, 1, 5, 7, 8, 9, 4, 7, 3, 6, 8, 4, 2, 1, 0, 5, 2, 6, 3, 1, 5, 7, 8, 9, 4, 7, 3, 6, 8, 4, 2, 1, 0, 5, 2, 6, 3, 1, 5, 7, 8
Offset: 0
References
- Martin Gardner, Cyclic numbers, Mathematical Circus, Chapter 10, p. 172, of the 1992 Mathematical Association of America edition.
- GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 92.
Links
- Wikipedia, Prime reciprocal magic square
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,0,-1,1).
Programs
-
Mathematica
Prepend[First@ RealDigits[N[1/19, 120]], 0] (* Michael De Vlieger, Sep 02 2015 *) LinearRecurrence[{1,0,0,0,0,0,0,0,-1,1},{0,5,2,6,3,1,5,7,8,9},100] (* or *) PadRight[{},100,{0,5,2,6,3,1,5,7,8,9,4,7,3,6,8,4,2,1}] (* Harvey P. Dale, Jan 23 2021 *)
-
PARI
default(realprecision,2000);1/19.0 \\ Anders Hellström, Sep 02 2015
-
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 } 0 :: longDivRecip(19) // Alonso del Arte, Mar 20 2020
Formula
G.f.: -x*(x^8 + x^7 + 2*x^6 + 4*x^5 - 2*x^4 - 3*x^3 + 4*x^2 - 3*x + 5)/((x - 1)*(x + 1)*(x^2 - x + 1)*(x^6 - x^3 + 1)). - Colin Barker, Aug 15 2012
Comments