login
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
1, 3, 5, 7, 9, 13, 18, 20, 62
OFFSET
1,2
COMMENTS
Partial sum of a(n) digits of decimal expansion of pi equals an integer N * a(n).
If Pi is normal then average digit in limit = 4.5.
Related to drunkard's walk? How many times does the drunkard's walk cross the x-axis?
No more terms below 5,000,000. - Harvey P. Dale, Apr 07 2010
EXAMPLE
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.
Pi = 3.14159 26...
Digit sums 1, 5=1+4, 6=1+4+1, 11, 20, 22, 28...
Number of digits =1, 2, 3, 4, 5, 6, 7.
Average 1, 2.5, 2, 2.75, 4, 3.7,4...
Average is a whole number: 1, 2, 4, 4 ...
When number of digits equals a(n) = 1 3 5 7 9 13 20.
1 = 1*1, compressed ... 11
6 = 2*3, compressed ... 23
20 = 4*5, compressed ... 45
28 = 4*7, compressed ... 47
36 = 4*9, compressed ... 49
65 = 5*13, compressed ... 513
100 = 5*20, compressed ... 520.
MATHEMATICA
Block[{i = 30000, z = RealDigits[Pi - 3, 10, 30000][[1]], 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 *)
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 *)
CROSSREFS
Sequence in context: A200975 A370452 A058871 * A121259 A211139 A089228
KEYWORD
base,more,nonn
AUTHOR
Donald S. McDonald, Mar 22 2007
EXTENSIONS
Corrected and extended by J. Mulder (jasper.mulder(AT)planet.nl), Jan 25 2010
Edited by Max Alekseyev, Oct 14 2012
STATUS
approved