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.

A111071 Difference between the product of two consecutive primes and the next prime.

This page as a plain text file.
%I A111071 #25 Sep 08 2022 08:45:20
%S A111071 1,8,24,64,126,202,300,408,636,862,1106,1474,1716,1968,2432,3066,3532,
%T A111071 4016,4684,5104,5684,6468,7290,8532,9694,10296,10912,11550,12190,
%U A111071 14220,16500,17808,18894,20560,22342,23544,25424,27048,28712,30786,32208
%N A111071 Difference between the product of two consecutive primes and the next prime.
%F A111071 a(n) = prime(n)*prime(n+1)-prime(n+2) = A006094(n)-A000040(n+2) = 2*A152527(n-1).
%e A111071 a(4)= prime(4)*prime(5)-prime(6) = 7*11-13=64.
%p A111071 seq(ithprime(n)*ithprime(n+1)-ithprime(n+2), n=1..50); # _Emeric Deutsch_, Oct 10 2005
%t A111071 f[n_] := Prime[n]Prime[n + 1] - Prime[n + 2]; Table[ f[n], {n, 41}] (* _Robert G. Wilson v_, Oct 10 2005  *)
%t A111071 #[[1]]*#[[2]]-#[[3]]&/@Partition[Prime[Range[50]],3,1] (* _Harvey P. Dale_, Aug 06 2015 *)
%o A111071 (PARI) main(size)=my(n);vector(size,n,prime(n)*prime(n+1)-prime(n+2)) /* _Anders Hellström_, Jul 16 2015 */
%o A111071 (Magma) [NthPrime(n)*NthPrime(n+1)-NthPrime(n+2): n in [1..50]]; // _Vincenzo Librandi_, Jul 18 2015
%Y A111071 Cf. A000040.
%K A111071 nonn
%O A111071 1,2
%A A111071 Christopher M. Tomaszewski (cmt1288(AT)comcast.net), Oct 09 2005
%E A111071 More terms from _Robert G. Wilson v_ and _Emeric Deutsch_, Oct 10 2005