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

A006094 Products of 2 successive primes.

Original entry on oeis.org

6, 15, 35, 77, 143, 221, 323, 437, 667, 899, 1147, 1517, 1763, 2021, 2491, 3127, 3599, 4087, 4757, 5183, 5767, 6557, 7387, 8633, 9797, 10403, 11021, 11663, 12317, 14351, 16637, 17947, 19043, 20711, 22499, 23707, 25591, 27221, 28891, 30967, 32399, 34571, 36863
Offset: 1

Views

Author

Keywords

Comments

The Huntley reference would suggest prefixing the sequence with an initial 4 - Enoch Haga. [But that would conflict with the definition! - N. J. A. Sloane, Oct 13 2009]
Sequence appears to coincide with the sequence of numbers n such that the largest prime < sqrt(n) and the smallest prime > sqrt(n) divide n. - Benoit Cloitre, Apr 04 2002
This is true: p(n) < [ sqrt(a(n)) = sqrt(p(n)*p(n+1)) ] < p(n+1) by definition. - Jon Perry, Oct 02 2013
a(n+1) = smallest number such that gcd(a(n), a(n+1)) = prime(n+1). - Alexandre Wajnberg and Ray Chandler, Oct 14 2005
Also the area of rectangles whose side lengths are consecutive primes. E.g., the consecutive primes 7,11 produce a 7 X 11 unit rectangle which has area 77 square units. - Cino Hilliard, Jul 28 2006
a(n) = A001358(A172348(n)); A046301(n) = lcm(a(n), a(n+1)); A065091(n) = gcd(a(n), a(n+1)); A066116(n+2) = a(n+1)*a(n); A109805(n) = a(n+1) - a(n). - Reinhard Zumkeller, Mar 13 2011
See A209329 for the sum of the reciprocals. - M. F. Hasler, Jan 22 2013
A078898(a(n)) = 3. - Reinhard Zumkeller, Apr 06 2015

References

  • H. E. Huntley, The Divine Proportion, A Study in Mathematical Beauty. New York: Dover, 1970. See Chapter 13, Spira Mirabilis, especially Fig. 13-5, page 173.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Subset of the squarefree semiprimes, A006881.
Subsequence of A256617 and A097889.

Programs

  • Haskell
    a006094 n = a006094_list !! (n-1)
    a006094_list = zipWith (*) a000040_list a065091_list
    -- Reinhard Zumkeller, Mar 13 2011
    
  • Haskell
    a006094_list = pr a000040_list
      where pr (n:m:tail) = n*m : pr (m:tail)
            pr _ = []
    -- Jean-François Antoniotti, Jan 08 2020
    
  • Magma
    [NthPrime(n)*NthPrime(n+1): n in [1..41]]; // Bruno Berselli, Feb 24 2011
    
  • Maple
    a:= n-> (p-> p(n)*p(n+1))(ithprime):
    seq(a(n), n=1..43);  # Alois P. Heinz, Jan 02 2021
  • Mathematica
    Table[ Prime[n] Prime[n + 1], {n, 40}] (* Robert G. Wilson v, Jan 22 2004 *)
    Times@@@Partition[Prime[Range[60]], 2, 1] (* Harvey P. Dale, Oct 15 2011 *)
  • MuPAD
    ithprime(i)*ithprime(i+1) $ i = 1..41 // Zerinvary Lajos, Feb 26 2007
    
  • PARI
    g(n) = for(x=1,n,print1(prime(x)*prime(x+1)",")) \\ Cino Hilliard, Jul 28 2006
    
  • PARI
    is(n)=my(p=precprime(sqrtint(n))); p>1 && n%p==0 && isprime(n/p) && nextprime(p+1)==n/p \\ Charles R Greathouse IV, Jun 04 2014
    
  • Python
    from sympy import prime, primerange
    def aupton(nn):
        alst, prevp = [], 2
        for p in primerange(3, prime(nn+1)+1): alst.append(prevp*p); prevp = p
        return alst
    print(aupton(43)) # Michael S. Branicky, Jun 15 2021
    
  • Python
    from sympy import prime, nextprime
    def A006094(n): return (p:=prime(n))*nextprime(p) # Chai Wah Wu, Oct 18 2024

Formula

A209329 = Sum_{n>=2} 1/a(n). - M. F. Hasler, Jan 22 2013
a(n) = A000040(n) * A000040(n+1). - Alois P. Heinz, Jan 02 2021

A013638 a(n) = prevprime(n)*nextprime(n).

Original entry on oeis.org

10, 15, 21, 35, 55, 77, 77, 77, 91, 143, 187, 221, 221, 221, 247, 323, 391, 437, 437, 437, 551, 667, 667, 667, 667, 667, 713, 899, 1073, 1147, 1147, 1147, 1147, 1147, 1271, 1517, 1517, 1517, 1591, 1763, 1927
Offset: 3

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a013638 n = a151799 n * a151800 n  -- Reinhard Zumkeller, May 22 2015
  • Maple
    [ seq(prevprime(i)*nextprime(i),i=3..70) ];
  • Mathematica
    a[n_] := NextPrime[n, -1] NextPrime[n];
    Table[a[n], {n, 3, 50}] (* Jean-François Alcover, Aug 02 2018 *)

Formula

a(n) = A151799(n)*A151800(n). - Reinhard Zumkeller, May 22 2015

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

A140135 Product of largest semiprime <= n and smallest semiprime >= n.

Original entry on oeis.org

16, 24, 36, 54, 54, 81, 100, 140, 140, 140, 196, 225, 315, 315, 315, 315, 315, 441, 484, 550, 550, 625, 676, 858, 858, 858, 858, 858, 858, 1089, 1156, 1225, 1330, 1330, 1444, 1521, 1794, 1794, 1794, 1794, 1794, 1794, 2116, 2254, 2254, 2401, 2499, 2601, 2805
Offset: 4

Views

Author

Jonathan Vos Post, May 09 2008

Keywords

Comments

This is to A030664 as semiprimes A001358 are to primes A000040. Subset of A014613.

Examples

			a(10) = 100 because the largest semiprime <= 10 is 10, the smallest semiprime >= 10 is 10 and 10*10=100.
		

Crossrefs

Programs

  • Maple
    isA001358 := proc(n) RETURN( numtheory[bigomega](n) = 2) ; end: A001358 := proc(n) option remember ; local a; if n = 1 then 4; else for a from A001358(n-1)+1 do if isA001358(a) then RETURN(a) ; fi ; od: fi ; end: prevsemiprime := proc(n) local a; for a from n to 4 by -1 do if isA001358(a) then RETURN(a) ; fi ; od: RETURN(-1) ; end: nextsemiprime := proc(n) local a; for a from n do if isA001358(a) then RETURN(a) ; fi ; od: RETURN(-1) ; end: A140135 := proc(n) prevsemiprime(n)*nextsemiprime(n) ; end: seq(A140135(n),n=4..80) ; # R. J. Mathar, May 11 2008
  • Mathematica
    ls[n_]:=Module[{i=0},While[PrimeOmega[n+i]!=2,i++];n+i]; ss[n_]:=Module[ {i=0}, While[PrimeOmega[n-i]!=2,i++];n-i]; Table[ls[n]*ss[n],{n,4,60}] (* Harvey P. Dale, Oct 18 2013 *)

Formula

a(n) = MAX{j in A001358 and j <= n} * MIN{j in A001358 and j >= n}

Extensions

More terms from R. J. Mathar, May 11 2008
Showing 1-5 of 5 results.