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.

Showing 1-2 of 2 results.

A056139 a(n) = n^2 - primefloor(n)*primeceiling(n).

Original entry on oeis.org

0, 0, 1, 0, 1, 0, -13, 4, 23, 0, 1, 0, -25, 4, 35, 0, 1, 0, -37, 4, 47, 0, -91, -42, 9, 62, 117, 0, 1, 0, -123, -58, 9, 78, 149, 0, -73, 4, 83, 0, 1, 0, -85, 4, 95, 0, -187, -90, 9, 110, 213, 0, -211, -102, 9, 122, 237, 0, 1, 0, -243, -118, 9, 138, 269, 0, -133, 4, 143, 0, 1, 0, -291, -142, 9, 162, 317, 0, -157, 4, 167, 0, -331, -162, 9
Offset: 2

Views

Author

Henry Bottomley, Jun 15 2000

Keywords

Comments

a(n)= 0 iff n is prime.

Examples

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

Crossrefs

Programs

Formula

a(n) = n^2 - A007917(n)*A007918(n) = A000290(n) - A030664(n).

Extensions

More terms from Antti Karttunen, Mar 20 2018

A056141 a(n) = primefloor(n)*primeceiling(n) - previousprime(n)*nextprime(n).

Original entry on oeis.org

-1, 0, 4, 0, -6, 0, 0, 0, 30, 0, -18, 0, 0, 0, 42, 0, -30, 0, 0, 0, -22, 0, 0, 0, 0, 0, 128, 0, -112, 0, 0, 0, 0, 0, 98, 0, 0, 0, 90, 0, -78, 0, 0, 0, -70, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 248, 0, -232, 0, 0, 0, 0, 0, 158, 0, 0, 0, 150, 0, -280, 0, 0, 0, 0, 0, 182
Offset: 3

Views

Author

Henry Bottomley, Jun 15 2000

Keywords

Examples

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

Crossrefs

Cf. A056221 (nonzero terms).

Programs

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

Formula

a(n) = A007917(n)*A007918(n) - A007917(n-1)*A007918(n+1).
a(n) = A030664(n) - A013638(n).
a(n) = A056140(n) - A056139(n).
a(n) = A056140(n) if n is prime, a(n)=0 otherwise.

Extensions

More terms from Michel Marcus, Mar 22 2020
Showing 1-2 of 2 results.