OFFSET
1,1
COMMENTS
Suppose there is a block A of mass n sliding left toward a stationary block B of mass 1, to the left of which is a wall. Assuming the sliding is frictionless and the collisions are elastic, a(n) is the number of collisions between A and B plus the number of collisions between B and the wall. (See Grant Sanderson links for animated examples.)
a(100^n) = A011545(n).
Since arctan(sqrt(1/n)) is approximately sqrt(1/n) for large values of n, a(n) = A121854(n) for most values of n.
Initial phase:
\ | ______________________
\ \| | |
\ | | |
\ \| | |
\ | | |
\ \| <=== | Block A |
\ | _________ | |
\ \| | | | M = n |
\ | | Block B | | |
\ \| | | | | |
\ | | M = 1 | | |
\ \| |_________| |______________________|
\ L----------------------------------------------------------
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \|
\ | ______________________
\ \| | |
\ | | |
\ \| | |
\ | | |
\ \| <=== | |
\ | _________ | |
\ \| | || |
\ | | || |
\ \| | || |
\ | | || |
\ \| |_________||______________________|
\ L----------------------------------------------------------
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \|
\ | ______________________
\ \| | |
\ | | |
\ \| | |
\ | | |
\ \| <== | |
\ | _________ | |
\ \| | | | |
\ | | | | |
\ \|<===>| | | |
\ | | | | |
\ \| |_________| |______________________|
\ L----------------------------------------------------------
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
LINKS
Peter Kagey, Table of n, a(n) for n = 1..10000
Code Golf Stack Exchange, Elastic collisions between blocks
Grant Sanderson, How Pi Connects Colliding Blocks to a Quantum Search Algorithm, Quanta Magazine (2020).
Grant Sanderson, The most unexpected answer to a counting puzzle, 3Blue1Brown video (2019)
Grant Sanderson, Why do colliding blocks compute pi?, 3Blue1Brown video (2019)
FORMULA
a(n) = ceiling(Pi/arctan(sqrt(1/n))) - 1.
MATHEMATICA
Table[Ceiling[Pi/ArcTan[Sqrt[1/n]] - 1], {n, 1, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Kagey, Jan 29 2020
STATUS
approved