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.

A060882 a(n) = n-th primorial (A002110) minus next prime.

Original entry on oeis.org

-1, -1, 1, 23, 199, 2297, 30013, 510491, 9699667, 223092841, 6469693199, 200560490093, 7420738134769, 304250263527167, 13082761331669983, 614889782588491357, 32589158477190044671, 1922760350154212639009
Offset: 0

Views

Author

N. J. A. Sloane, May 05 2001

Keywords

Comments

It is well-known and easy to prove (see Honsbeger) that a(n) > 0 for n > 1. - N. J. A. Sloane, Jul 05 2009
Terms are pairwise coprime with very high probability. I didn't find terms which are pairwise noncoprime, although it may be a case of the "strong law of small numbers." - Daniel Forgues, Apr 23 2012

References

  • R. Honsberger, Mathematical Diamonds, MAA, 2003, see p. 79. [Added by N. J. A. Sloane, Jul 05 2009]

Crossrefs

Programs

  • Maple
    pp:=n->mul(ithprime(i),i=1..n);
    [seq(pp(n)-ithprime(n+1),n=1..20)];
  • Mathematica
    Join[{-1},With[{nn=20},#[[1]]-#[[2]]&/@Thread[{FoldList[Times,1, Prime[ Range[nn]]],Prime[Range[nn+1]]}]]] (* Harvey P. Dale, May 10 2013 *)
  • PARI
    { n=-1; m=1; forprime (p=2, prime(101), write("b060882.txt", n++, " ", m - p); m*=p; ) } \\ Harry J. Smith, Jul 13 2009
    
  • Python
    from sympy import prime, primorial
    def A060882(n): return primorial(n)-prime(n+1) if n else -1 # Chai Wah Wu, Feb 25 2023

A360510 a(n) = Product_{i=2..n} p(i) - p(n+1)^2, where p(i) is the i-th prime.

Original entry on oeis.org

-8, -22, -34, -16, 986, 14726, 254894, 4849316, 111545594, 3234845654, 100280243696, 3710369065724, 152125131761756, 6541380665832806, 307444891294242896, 16294579238595018884, 961380175077106315814, 58644190679703485487146, 3929160775540133527934504, 278970415063349480483702366
Offset: 1

Views

Author

N. J. A. Sloane, Feb 24 2023

Keywords

Comments

It is known that a(n) >= 0 for n >= 5.
Remember an empty product equals 1 by convention.
See A064819 for another version.

References

  • S. W. Golomb, Elementary Problem E3137, Amer. Math. Monthly, Proposed 93 (1986), p. 215; Solution and Editorial Comments, 94 (1987), 883-884.

Crossrefs

Programs

  • Mathematica
    FoldList[Times, 1, Most[#]] - #^2 & [Prime[Range[2, 25]]] (* Paolo Xausa, Nov 06 2024 *)
  • Python
    from sympy import prime, primorial
    def A360510(n): return (primorial(n)>>1)-prime(n+1)**2 # Chai Wah Wu, Feb 24 2023

A360511 a(n) = Product_{i=1..n} p(i) - p(n+1)^3, where p(i) is the i-th prime.

Original entry on oeis.org

-25, -119, -313, -1121, 113, 25117, 503651, 9687523, 223068481, 6469663439, 200560439477, 7420738065889, 304250263447703, 13082761331566207, 614889782588342533, 32589158477189839351, 1922760350154212412089, 117288381359406970682507, 7858321551080267055521179, 557940830126698960967026373
Offset: 1

Views

Author

N. J. A. Sloane, Feb 24 2023

Keywords

Comments

It is known that a(n) >= 0 for n >= 5.

References

  • S. W. Golomb, Elementary Problem E3137, Amer. Math. Monthly, Proposed 93 (1986), p. 215; Solution and Editorial Comments, 94 (1987), 883-884.

Crossrefs

Programs

  • Mathematica
    FoldList[Times, Most[#]] - Rest[#]^3 & [Prime[Range[25]]] (* Paolo Xausa, Nov 06 2024 *)
  • Python
    from sympy import prime, primorial
    def A360511(n): return primorial(n)-prime(n+1)**3 # Chai Wah Wu, Feb 24 2023

A382834 Smallest number k > P(n) - prime(n+1)^2 which is coprime to P(n), where P(n)= A002110(n) are the primorials.

Original entry on oeis.org

-5, -17, -17, 97, 2143, 29747, 510151, 9699167, 223092031, 6469692277, 200560488763, 7420738133141, 304250263525363, 13082761331667823, 614889782588488607, 32589158477190041261, 1922760350154212635351, 117288381359406970978787, 7858321551080267055874051
Offset: 1

Views

Author

Jakub Buczak, Apr 06 2025

Keywords

Comments

The difference d = P(n) - k is also coprime to P(n), and satisfies d < prime(n+1)^2, which means it must be prime since composite d would have at least one prime factor <= prime(n).
There is always at least one prime strictly between prime(n) and prime(n+1)^2, consequently d is the largest prime < prime(n+1)^2, and so a(n) = A002110(n) - A054270(n+1).
There are no negative terms after a(3).

Examples

			a(4) = 97, since 2*3*5*7 - 11^2 = 89, the smallest number coprime to 2*3*5*7 greater than 89 is 97.
a(2) = -17, since 2*3 - 5^2 = -19, the smallest number x>-19 coprime here is thus -17, and its difference d = 30 -(-17) = 47 is the largest prime < 7^2.
		

Crossrefs

Programs

  • PARI
    a(n) = my(P=vecprod(primes(n)), k=P-prime(n+1)^2+1); while (gcd(k,P)!=1, k++); k; \\ Michel Marcus, Apr 07 2025
Showing 1-4 of 4 results.