The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A056139 a(n) = n^2 - primefloor(n)*primeceiling(n). 3
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,7
COMMENTS
a(n)= 0 iff n is prime.
LINKS
FORMULA
a(n) = n^2 - A007917(n)*A007918(n) = A000290(n) - A030664(n).
EXAMPLE
a(3)=3^2-3*3=0, a(4)=4^2-3*5=1
PROG
(PARI)
A030664(n) = if (n < 2, 1, precprime(n)*nextprime(n)); \\ From A030664
A056139(n) = (n^2 - A030664(n)); \\ Antti Karttunen, Mar 20 2018
CROSSREFS
Sequence in context: A010219 A217426 A362437 * A106293 A046734 A366253
KEYWORD
easy,sign
AUTHOR
Henry Bottomley, Jun 15 2000
EXTENSIONS
More terms from Antti Karttunen, Mar 20 2018
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 14:46 EDT 2024. Contains 372533 sequences. (Running on oeis4.)