OFFSET
1,2
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
LINKS
Joshua Oliver, Table of n, a(n) for n = 1..2000 (first 1000 terms from Vincenzo Librandi)
R. Fröberg, C. Gottlieb and R. Häggkvist, On numerical semigroups, Semigroup Forum, 35 (1987), 63-83 (for definition of Frobenius number).
FORMULA
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 *)
PROG
(Magma) [NthPrime(n)*NthPrime(n+1)-NthPrime(n)-NthPrime(n+1): n in [1..45]]; // Vincenzo Librandi, Dec 18 2012
(PARI) a(n)=my(p=prime(n), q=nextprime(p+1)); p*q-p-q \\ Charles R Greathouse IV, Apr 28 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Armand Turpel (armandt(AT)unforgettable.com)
STATUS
approved