This site is supported by donations to The OEIS Foundation.

 Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A288416 Median of (2X-n)^2 + (2Y-n)^2 where X and Y are independent random variables with B(n, 1/2) distributions. 2
 2, 4, 2, 4, 10, 8, 10, 8, 10, 16, 18, 20, 18, 20, 26, 20, 26, 20, 26, 32, 26, 32, 34, 36, 34, 36, 34, 40, 34, 40, 50, 40, 50, 52, 50, 52, 50, 52, 50, 52, 58, 64, 58, 64, 58, 68, 58, 68, 74, 68, 74, 72, 74, 72, 82, 80, 82, 80, 82, 80, 82, 80, 90, 100, 90, 100 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Interpretation: Start at the origin, and flip a pair of coins. Move right one unit if the first coin is heads, and otherwise left one unit. Then move up one unit if the second coin is heads, and otherwise down one unit. This sequence gives your median squared-distance from the origin after n pairs of coin flips. The mean of (2X-n)^2 + (2Y-n)^2 is 2n, or A005843. A continuous analog draws each move from N(0,1) rather than from {+1,-1}, so the final x- and y- coordinates are distributed as N(0,sqrt(n)). Then the final point has probability 1 - exp(-r^2/2n) of being within r of the origin, and the median squared-distance for this continuous analog is n log(4). We also observe empirically that for this discrete sequence, a(n)/n approaches log(4). LINKS EXAMPLE For n=3 the probabilities of ending up at the lattice points in [-3,3]x[-3,3] are 1/64 of: 1 0 3 0 3 0 1 0 0 0 0 0 0 0 3 0 9 0 9 0 3 0 0 0 0 0 0 0 3 0 9 0 9 0 3 0 0 0 0 0 0 0 1 0 3 0 3 0 1 So the squared-distance is 2 with probability 36/64, 10 with probability 24/64, and 18 with probability 4/64; the median squared-distance is therefore 2. MATHEMATICA Shifted[x_, n_] := (2 x - n)^2; WeightsMatrix[n_] := Table[Binomial[n, i] Binomial[n, j], {i, 0, n}, {j, 0, n}]/2^(2 n); ValuesMatrix[n_, f_] := Table[f[i, n] + f[j, n], {i, 0, n}, {j, 0, n}]; Distribution[n_, f_] := EmpiricalDistribution[Flatten[WeightsMatrix[n]] -> Flatten[ValuesMatrix[n, f]]]; NewMedian[n_, f_] := Mean[Quantile[Distribution[n, f], {1/2, 1/2 + 1/2^(2 n)}]]; Table[NewMedian[n, Shifted], {n, 66}] CROSSREFS Cf. A288347, which is similar with shifted coordinates; and also A288346. Sequence in context: A191370 A298242 A282283 * A240893 A241108 A151706 Adjacent sequences:  A288413 A288414 A288415 * A288417 A288418 A288419 KEYWORD nonn AUTHOR Matt Frank, Jun 09 2017 STATUS approved

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 December 15 00:30 EST 2019. Contains 329988 sequences. (Running on oeis4.)