OFFSET
1,1
COMMENTS
9 is the only semiprime of the form prime(n+2)*prime(n+1) - prime(n)*prime(n+1).
First differences of A006094. [Reinhard Zumkeller, Mar 13 2011]
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
MATHEMATICA
Table[Prime[n + 1]*(Prime[n + 2] - Prime[n]), {n, 48}] (* Ray Chandler, Aug 17 2005 *)
#[[2]](#[[3]]-#[[1]])&/@Partition[Prime[Range[50]], 3, 1] (* Harvey P. Dale, Apr 01 2018 *)
PROG
(Python)
from sympy import prime, primerange
def aupton(nn):
alst, prevp, prev_prod = [], 2, 6
for p in primerange(3, prime(nn+2)+1):
cur_prod = prevp * p
alst.append(cur_prod - prev_prod)
prevp = p
prev_prod = cur_prod
return alst[1:]
print(aupton(48)) # Michael S. Branicky, Sep 20 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Giovanni Teofilatto, Aug 16 2005
EXTENSIONS
Edited and extended by Ray Chandler, Aug 17 2005
STATUS
approved