login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A056140 a(n) = n^2 - previousprime(n)*nextprime(n), for n>2. 2
-1, 1, 4, 1, -6, -13, 4, 23, 30, 1, -18, -25, 4, 35, 42, 1, -30, -37, 4, 47, -22, -91, -42, 9, 62, 117, 128, 1, -112, -123, -58, 9, 78, 149, 98, -73, 4, 83, 90, 1, -78, -85, 4, 95, -70, -187, -90, 9, 110, 213, 36, -211, -102, 9, 122, 237, 248, 1, -232, -243 (list; graph; refs; listen; history; text; internal format)
OFFSET

3,3

COMMENTS

a(n) is never 0.

LINKS

Table of n, a(n) for n=3..62.

FORMULA

a(n) = n^2-A007917(n-1)*A007918(n+1) = A000290(n)-A013638(n).

EXAMPLE

a(3)=3^2-2*5=-1, a(4)=4^2-3*5=1.

MATHEMATICA

Table[n^2-NextPrime[n]NextPrime[n, -1], {n, 3, 80}] (* Harvey P. Dale, Aug 22 2011 *)

PROG

(PARI) a(n) = n^2 - precprime(n-1)*nextprime(n+1); \\ Michel Marcus, Mar 22 2020

CROSSREFS

Cf. A056139, A056141.

Sequence in context: A083843 A094264 A298829 * A225419 A140895 A191714

Adjacent sequences:  A056137 A056138 A056139 * A056141 A056142 A056143

KEYWORD

easy,sign

AUTHOR

Henry Bottomley, Jun 15 2000

EXTENSIONS

More terms from Harvey P. Dale, Aug 22 2011

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 11 11:31 EDT 2021. Contains 342886 sequences. (Running on oeis4.)