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-4 of 4 results.

A030663 Essentially same as A013638.

Original entry on oeis.org

1, 1, 1, 10, 15, 21, 35, 55, 77, 77, 77, 91, 143
Offset: 0

Views

Author

Keywords

A030664 Product of largest prime <= n and smallest prime >= n.

Original entry on oeis.org

1, 1, 4, 9, 15, 25, 35, 49, 77, 77, 77, 121, 143, 169, 221, 221, 221, 289, 323, 361, 437, 437, 437, 529, 667, 667, 667, 667, 667, 841, 899, 961, 1147, 1147, 1147, 1147, 1147, 1369, 1517, 1517, 1517, 1681, 1763, 1849, 2021, 2021, 2021, 2209, 2491, 2491, 2491
Offset: 0

Views

Author

Keywords

Comments

Symmetrical about zero, a(n)=a(-n) if n>1, if negative primes are recognized. - Robert G. Wilson v, Feb 28 2011
Iff n is a prime then a(n)=n^2, otherwise a(n) is a semiprime. - Robert G. Wilson v, Feb 28 2011

Crossrefs

Programs

  • Haskell
    a030664 n = a007917 n * a007918 n -- Reinhard Zumkeller, May 22 2015, Feb 24 2011
    
  • Mathematica
    f[n_] := If[Abs[n] < 2, 1, NextPrime[n + 1, -1] NextPrime[n - 1]]; Array[f, 51, 0] (* Robert G. Wilson v, Feb 28 2011 *)
  • MuPAD
    numlib::prevprime(i)*nextprime(i) $ i = 0..50 // Zerinvary Lajos, Feb 26 2007
    
  • PARI
    a(n) = if (n < 2, 1, precprime(n)*nextprime(n)); \\ Michel Marcus, Mar 21 2015

Formula

For n > 1: a(n) = A007917(n)*A007918(n). - Reinhard Zumkeller, May 22 2015

Extensions

More terms from Erich Friedman

A056140 a(n) = n^2 - previousprime(n)*nextprime(n), for n>2.

Original entry on oeis.org

-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
Offset: 3

Views

Author

Henry Bottomley, Jun 15 2000

Keywords

Comments

a(n) is never 0.

Examples

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

Crossrefs

Programs

  • Mathematica
    Table[n^2-NextPrime[n]NextPrime[n,-1],{n,3,80}] (* Harvey P. Dale, Aug 22 2011 *)
  • PARI
    a(n) = n^2 - precprime(n-1)*nextprime(n+1); \\ Michel Marcus, Mar 22 2020

Formula

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

Extensions

More terms from Harvey P. Dale, Aug 22 2011

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-4 of 4 results.