The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A126278 a(n) = number of decimal digits of Pi, starting after the decimal point, that give an average value exactly equal to a whole number. 0

%I

%S 1,3,5,7,9,13,18,20,62

%N a(n) = number of decimal digits of Pi, starting after the decimal point, that give an average value exactly equal to a whole number.

%C Partial sum of a(n) digits of decimal expansion of pi equals an integer N * a(n).

%C If Pi is normal then average digit in limit = 4.5.

%C Related to drunkard's walk? How many times does the drunkard's walk cross the x-axis?

%C No more terms below 5,000,000. - _Harvey P. Dale_, Apr 07 2010

%e a(2)=3 because the first 3 decimal places of Pi, the digits are 1+4+1, has an integer average of 6/3 = 2.

%e Pi = 3.14159 26...

%e Digit sums 1, 5=1+4, 6=1+4+1, 11, 20, 22, 28...

%e Number of digits =1, 2, 3, 4, 5, 6, 7.

%e Average 1, 2.5, 2, 2.75, 4, 3.7,4...

%e Average is a whole number: 1, 2, 4, 4 ...

%e When number of digits equals a(n) = 1 3 5 7 9 13 20.

%e 1 = 1*1, compressed ... 11

%e 6 = 2*3, compressed ... 23

%e 20 = 4*5, compressed ... 45

%e 28 = 4*7, compressed ... 47

%e 36 = 4*9, compressed ... 49

%e 65 = 5*13, compressed ... 513

%e 100 = 5*20, compressed ... 520.

%t Block[{i = 30000, z = RealDigits[Pi - 3, 10, 30000][], lst = {}}, While[z != {}, If[Divisible[Total[z], i], PrependTo[lst, i]]; i--; z = Most@z;]; lst] (* J. Mulder (jasper.mulder(AT)planet.nl), Jan 25 2010 *)

%t lst=Accumulate[ Rest[ RealDigits[ N[ \[ Pi ],5000001 ] ][ [ 1 ] ] ] ]; Transpose[ Select[ Partition[ Flatten[ Table[ {n,(Take[ lst,{n} ])/n},{n,5000000} ],2 ],2 ],IntegerQ[ #[ [ 2 ] ] ]& ] ][ [ 1 ] ] (* _Harvey P. Dale_, Apr 07 2010 *)

%K base,more,nonn

%O 1,2

%A _Donald S. McDonald_, Mar 22 2007

%E Corrected and extended by J. Mulder (jasper.mulder(AT)planet.nl), Jan 25 2010

%E Edited by _Max Alekseyev_, Oct 14 2012

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

Last modified October 19 07:24 EDT 2021. Contains 348074 sequences. (Running on oeis4.)