OFFSET
1,4
COMMENTS
A sequence based on the solution of the equation: 1+(1+n)*prime(n)/x-n*prime(n+1)/x=0 for x. This is an irrational rotation-like sequence: the sequence is similar to a Beatty sequence. - Roger L. Bagula, Jun 06 2002
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
EXAMPLE
n = 10: a(10) = 10*31-11*29 = 310-319 = -9;
n = 54: a(54) = 54*257-55*251 = 13878-13805 = 73;
n = 55: a(55) = 55*263-56*257 = 14465-14392 = 73; consecutive terms are often equal to each other.
MAPLE
seq(n*ithprime(n+1)-(n+1)*ithprime(n), n=1..80); # Muniru A Asiru, Jun 29 2018
MATHEMATICA
Table[(Prime[w+1]-Prime[w])*w-Prime[w], {w, 1, 1024}]
PROG
(PARI) a(n)={n*prime(n + 1) - (n + 1)*prime(n)} \\ Harry J. Smith, Aug 06 2009
(Magma) [n*NthPrime(n + 1) - (n + 1)*NthPrime(n): n in [1..75]]; // Vincenzo Librandi, Jun 29 2018
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Labos Elemer, Jul 13 2001
STATUS
approved