This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A099407 #8 Nov 26 2015 11:25:43 %S A099407 1,4,12,30,60,96,144,198,308,420,540,720,840,966,1196,1508,1740,1980, %T A099407 2310,2520,2808,3198,3608,4224,4800,5100,5406,5724,6048,7056,8190, %U A099407 8840,9384,10212,11100,11700,12636,13446,14276,15308,16020,17100,18240,18816 %N A099407 Number of points of self-intersection of the path of a billiard ball traveling at a 45-degree angle on a prime(n) X prime(n+1) billiard table. Also equal to 1/2 the number of the lattice points lying within a prime(n) X prime(n+1) rectangle. %H A099407 Harvey P. Dale, <a href="/A099407/b099407.txt">Table of n, a(n) for n = 1..1000</a> %F A099407 a(n) = (prime(n) - 1)*(prime(n+1) - 1)/2. %e A099407 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. %t A099407 list = {}; For[i = 1, i < 100, i++, AppendTo[list, (Prime[i] - 1)(Prime[i + 1] - 1)/2]]; list %t A099407 ((First[#]-1)(Last[#]-1))/2&/@Partition[Prime[Range[50]],2,1] (* _Harvey P. Dale_, Nov 13 2013 *) %Y A099407 Cf. A083553, A087427. %K A099407 nonn %O A099407 1,2 %A A099407 Matthew Howells (mathmatt(AT)gmail.com), Nov 17 2004