login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A021027 Decimal expansion of 1/23. 4

%I #12 Sep 29 2023 13:57:44

%S 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,

%T 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,

%U 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

%N Decimal expansion of 1/23.

%C 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

%H <a href="/index/Rec#order_12">Index entries for linear recurrences with constant coefficients</a>, signature (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1).

%e 1/23 = 0.043478260869565217391304347826...

%t Join[{0}, RealDigits[1/23, 10, 100][[1]]] (* _Alonso del Arte_, Mar 14 2020 *)

%o (Scala) def longDivRecip(n: Int, places: Int = 100): List[Int] = {

%o val pow10 = Math.pow(10, Math.ceil(Math.log10(Math.abs(n)))).toInt

%o val digits = new scala.collection.mutable.ListBuffer[Int]()

%o var quotient = pow10; var remainder = 0

%o while (digits.size < places) {

%o remainder = quotient % n; quotient /= n; digits += quotient

%o quotient = remainder * 10

%o }

%o digits.toList

%o }

%o 0 :: longDivRecip(23) // _Alonso del Arte_, Mar 25 2020

%Y Cf. A001913.

%K nonn,cons,easy

%O 0,2

%A _N. J. A. Sloane_.

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)