OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = (prime(n) - 1)*(prime(n+1) - 1)/2.
EXAMPLE
a(2) = 4. Since prime(2) is 3 and prime(2+1) is 5, we are playing on a 3x5 billiard table. A ball struck from one corner will cross its own path 4 times before it strikes another corner to return along its own path.
MATHEMATICA
list = {}; For[i = 1, i < 100, i++, AppendTo[list, (Prime[i] - 1)(Prime[i + 1] - 1)/2]]; list
((First[#]-1)(Last[#]-1))/2&/@Partition[Prime[Range[50]], 2, 1] (* Harvey P. Dale, Nov 13 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Matthew Howells (mathmatt(AT)gmail.com), Nov 17 2004
STATUS
approved