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.

A021023 Decimal expansion of 1/19.

This page as a plain text file.
%I A021023 #43 Jul 08 2025 07:57:41
%S A021023 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,
%T A021023 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,
%U A021023 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
%N A021023 Decimal expansion of 1/19.
%C A021023 The 18-digit cycle 1, 0, 5, 2, 6, 3, 1, 5, 7, 8, 9, 4, 7, 3, 6, 8, 4, 2 in this sequence and the others based on nineteenths gives the successive digits of the smallest integer which is doubled, quadrupled and octupled when the last three digits in turn are moved from the right hand end to the left hand end. For example, 842105263157894736 is eight times 105263157894736842. - _Ian Duff_, Jan 07 2009, Jan 12 2009
%C A021023 The magic square that uses the decimals of 1/19 is fully magic. 383 has the same property (see A021387). For other such primes see A072359. - _Michel Marcus_, Sep 02 2015
%C A021023 Since 19 is prime and the cycle of its reciprocal's base 10 digits is 19 - 1 long, 19 is a full reptend prime (A001913). - _Alonso del Arte_, Mar 21 2020
%D A021023 Martin Gardner, Cyclic numbers, Mathematical Circus, Chapter 10, p. 172, of the 1992 Mathematical Association of America edition.
%D A021023 GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 92.
%H A021023 Wikipedia, <a href="https://en.wikipedia.org/wiki/Prime_reciprocal_magic_square">Prime reciprocal magic square</a>
%H A021023 <a href="/index/Rec#order_10">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,0,0,-1,1).
%F A021023 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
%t A021023 Prepend[First@ RealDigits[N[1/19, 120]], 0] (* _Michael De Vlieger_, Sep 02 2015 *)
%t A021023 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 *)
%o A021023 (PARI) default(realprecision,2000);1/19.0 \\ _Anders Hellström_, Sep 02 2015
%o A021023 (Scala) def longDivRecip(n: Int, places: Int = 100): List[Int] = {
%o A021023   val pow10 = Math.pow(10, Math.ceil(Math.log10(Math.abs(n)))).toInt
%o A021023   val digits = new scala.collection.mutable.ListBuffer[Int]()
%o A021023   var quotient = pow10; var remainder = 0
%o A021023   while (digits.size < places) {
%o A021023     remainder = quotient % n; quotient /= n; digits += quotient
%o A021023     quotient = remainder * 10
%o A021023   }
%o A021023   digits.toList
%o A021023 }
%o A021023 0 :: longDivRecip(19) // _Alonso del Arte_, Mar 20 2020
%Y A021023 Cf. A021387, A072359.
%K A021023 nonn,cons,easy
%O A021023 0,2
%A A021023 _N. J. A. Sloane_