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.

A037165 a(n) = prime(n)*prime(n+1) - prime(n) - prime(n+1).

Original entry on oeis.org

1, 7, 23, 59, 119, 191, 287, 395, 615, 839, 1079, 1439, 1679, 1931, 2391, 3015, 3479, 3959, 4619, 5039, 5615, 6395, 7215, 8447, 9599, 10199, 10811, 11447, 12095, 14111, 16379, 17679, 18767, 20423, 22199, 23399, 25271, 26891, 28551, 30615, 32039
Offset: 1

Views

Author

Armand Turpel (armandt(AT)unforgettable.com)

Keywords

Comments

a(n) is also the Frobenius number of the numerical semigroup generated by prime(n) and prime(n+1). - Victoria A Sapko (vsapko(AT)math.unl.edu), Feb 21 2001

Crossrefs

Frobenius numbers for k successive primes: this sequence (k=2), A138989 (k=3), A138990 (k=4), A138991 (k=5), A138992 (k=6), A138993 (k=7), A138994 (k=8).

Programs

  • Magma
    [NthPrime(n)*NthPrime(n+1)-NthPrime(n)-NthPrime(n+1): n in [1..45]]; // Vincenzo Librandi, Dec 18 2012
    
  • Mathematica
    f[n_] := FrobeniusNumber[{Prime[n], Prime[n + 1]}]; Array[f, 41] (* Robert G. Wilson v, Aug 04 2012 *)
    Times@@#-Total[#]&/@Partition[Prime[Range[50]],2,1] (* Harvey P. Dale, Dec 27 2015 *)
  • PARI
    a(n)=my(p=prime(n),q=nextprime(p+1)); p*q-p-q \\ Charles R Greathouse IV, Apr 28 2015

Formula

a(n) = A006094(n) - A001043(n). - Michel Marcus, Mar 02 2019