cp's OEIS Frontend

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.

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.

Original entry on oeis.org

1, 4, 12, 30, 60, 96, 144, 198, 308, 420, 540, 720, 840, 966, 1196, 1508, 1740, 1980, 2310, 2520, 2808, 3198, 3608, 4224, 4800, 5100, 5406, 5724, 6048, 7056, 8190, 8840, 9384, 10212, 11100, 11700, 12636, 13446, 14276, 15308, 16020, 17100, 18240, 18816
Offset: 1

Views

Author

Matthew Howells (mathmatt(AT)gmail.com), Nov 17 2004

Keywords

Examples

			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.
		

Crossrefs

Programs

  • 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 *)

Formula

a(n) = (prime(n) - 1)*(prime(n+1) - 1)/2.