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).

This page as a plain text file.
%I A037165 #33 Jan 27 2023 13:35:49
%S A037165 1,7,23,59,119,191,287,395,615,839,1079,1439,1679,1931,2391,3015,3479,
%T A037165 3959,4619,5039,5615,6395,7215,8447,9599,10199,10811,11447,12095,
%U A037165 14111,16379,17679,18767,20423,22199,23399,25271,26891,28551,30615,32039
%N A037165 a(n) = prime(n)*prime(n+1) - prime(n) - prime(n+1).
%C A037165 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
%H A037165 Joshua Oliver, <a href="/A037165/b037165.txt">Table of n, a(n) for n = 1..2000</a> (first 1000 terms from Vincenzo Librandi)
%H A037165 R. Fröberg, C. Gottlieb and R. Häggkvist, <a href="https://www.researchgate.net/publication/226359613_On_numerical_semigroups">On numerical semigroups</a>, Semigroup Forum, 35 (1987), 63-83 (for definition of Frobenius number).
%F A037165 a(n) = A006094(n) - A001043(n). - _Michel Marcus_, Mar 02 2019
%t A037165 f[n_] := FrobeniusNumber[{Prime[n], Prime[n + 1]}]; Array[f, 41] (* _Robert G. Wilson v_, Aug 04 2012 *)
%t A037165 Times@@#-Total[#]&/@Partition[Prime[Range[50]],2,1] (* _Harvey P. Dale_, Dec 27 2015 *)
%o A037165 (Magma) [NthPrime(n)*NthPrime(n+1)-NthPrime(n)-NthPrime(n+1): n in [1..45]]; // _Vincenzo Librandi_, Dec 18 2012
%o A037165 (PARI) a(n)=my(p=prime(n),q=nextprime(p+1)); p*q-p-q \\ _Charles R Greathouse IV_, Apr 28 2015
%Y A037165 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).
%Y A037165 Cf. A001043, A006094.
%K A037165 nonn,easy
%O A037165 1,2
%A A037165 Armand Turpel (armandt(AT)unforgettable.com)