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.

Previous Showing 11-20 of 22 results. Next

A061214 Product of composite numbers between the n-th and (n+1)st primes.

Original entry on oeis.org

1, 4, 6, 720, 12, 3360, 18, 9240, 11793600, 30, 45239040, 59280, 42, 91080, 311875200, 549853920, 60, 1072431360, 328440, 72, 2533330800, 531360, 4701090240, 60072730099200, 970200, 102, 1157520, 108, 1367520, 1063186156509747740870400000, 2146560, 43191973440
Offset: 1

Views

Author

Amarnath Murthy, Apr 21 2001

Keywords

Examples

			a(4) = 8 * 9 * 10 = 720. 7 is the fourth prime and 11 is the fifth prime. a(5) = 12 as 11 and 13 both are primes.
		

Crossrefs

Cf. A046933 and A054265 (number and sum of these composites).

Programs

  • Haskell
    a061214 n = a061214_list !! (n-1)
    a061214_list = f a000040_list where
       f (p:ps'@(p':ps)) = (product [p+1..p'-1]) : f ps'
    -- Reinhard Zumkeller, Jun 22 2011
    
  • Maple
    A061214 := proc(n)
        local k ;
        product(k,k=ithprime(n)+1..ithprime(n+1)-1) ;
    end proc: # R. J. Mathar, Apr 23 2013
  • Mathematica
    Table[Times@@Range[Prime[n]+1,Prime[n+1]-1],{n,30}] (* Harvey P. Dale, Jun 14 2011 *)
    Times@@Range[#[[1]]+1,#[[2]]-1]&/@Partition[Prime[Range[40]],2,1] (* Harvey P. Dale, Apr 23 2022 *)
  • PARI
    { n=0; q=2; forprime (p=3, prime(2001), a=1; for (i=q + 1, p - 1, a*=i); q=p; write("b061214.txt", n++, " ", a) ) } \\ Harry J. Smith, Jul 19 2009
    
  • PARI
    v=primes(100);for(i=1,#v-1,v[i]=prod(j=v[i]+1,v[i+1]-1,j));vecextract(v,"1..-2") \\ Charles R Greathouse IV, Feb 27 2012
    
  • Python
    from math import prod
    from sympy import prime
    def A061214(n): return prod(i for i in range(prime(n)+1,prime(n+1))) # Chai Wah Wu, Jul 10 2022

Formula

A006530(a(n)) = A052248(n) for n > 1. - Reinhard Zumkeller, Jun 22 2011

Extensions

More terms from James Sellers, Apr 24 2001
Better definition from T. D. Noe, Jan 21 2008

A052297 Number of distinct prime factors of all composite numbers between n-th and (n+1)st primes.

Original entry on oeis.org

0, 1, 2, 3, 2, 4, 2, 5, 5, 3, 6, 5, 3, 5, 6, 7, 3, 7, 6, 2, 8, 4, 8, 9, 5, 3, 6, 2, 6, 14, 5, 8, 3, 11, 3, 9, 7, 6, 8, 8, 3, 13, 2, 6, 3, 14, 15, 5, 3, 7, 9, 3, 11, 8, 9, 9, 3, 9, 6, 3, 13, 16, 7, 3, 6, 16, 8, 13, 3, 6, 9, 10, 9, 9, 6, 8, 11, 6, 12, 14, 4, 14, 2, 10, 7, 8, 11, 6, 4, 6, 16, 10, 6, 13
Offset: 1

Views

Author

Labos Elemer, Feb 09 2000

Keywords

Comments

From Lei Zhou, Mar 18 2014: (Start)
This is also the number of primes such that the (n+1)-th prime (mod i-th prime) is smaller than the (n+1)-th prime (mod n-th prime) for 1 <= i < n.
Proof: We denote the n-th prime number as P_n. Suppose P_(n+1) mod P_i = k; we can write P_(n+1) = m*P_i + k. Setting l = P_(n+1) - P_n, the composite numbers between P_n and P_(n+1) will be consecutively m*P_i + C, where C = k-l+1, k-l+2, ..., k-1. If k < l, there must be a value at which C equals zero since k-1 > 0 and k-l+1 <= 0, so P_i is a factor of a composite number between P_n and P_(n+1). If k >= l, all C values are greater than zero, thus P_i cannot be a factor of a composite number between P_n and P_(n+1). (End)

Examples

			n=30, p(30)=113, the next prime is 127. Between them are 13 composites: {114, 115, ..., 126}. Factorizing all and collecting prime factors, the set {2,3,5,7,11,13,17,19,23,29,31,41,59,61} is obtained, consisting of 14 primes, so a(30)=14.
		

Crossrefs

Programs

  • Mathematica
    Length[Union[Flatten[Table[Transpose[FactorInteger[n]][[1]],{n, First[#]+ 1, Last[#]-1}]]]]&/@Partition[Prime[Range[100]],2,1] (* Harvey P. Dale, Jan 19 2012 *)

A059788 a(n) = largest prime < 2*prime(n).

Original entry on oeis.org

3, 5, 7, 13, 19, 23, 31, 37, 43, 53, 61, 73, 79, 83, 89, 103, 113, 113, 131, 139, 139, 157, 163, 173, 193, 199, 199, 211, 211, 223, 251, 257, 271, 277, 293, 293, 313, 317, 331, 337, 353, 359, 379, 383, 389, 397, 421, 443, 449, 457, 463, 467, 479, 499, 509, 523
Offset: 1

Views

Author

Labos Elemer, Feb 22 2001

Keywords

Comments

Also, smallest member of the first pair of consecutive primes such that between them is a composite number divisible by the n-th prime. - Amarnath Murthy, Sep 25 2002
Except for its initial term, A006992 is a subsequence based on iteration of n -> A151799(2n). The range of this sequence is a subset of A065091. - M. F. Hasler, May 08 2016

Examples

			n=18: p(18)=61, so a(18) is the largest prime below 2*61=122, which is 113.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    A059788 := proc(n)
        prevprime(2*ithprime(n)) ;
    end proc:
    seq(A059788(n),n=1..50) ; # R. J. Mathar, May 08 2016
  • Mathematica
    a[n_] := Prime[PrimePi[2Prime[n]]]
    NextPrime[2*Prime[Range[100]], -1] (* Zak Seidov, May 08 2016 *)
  • PARI
    a(n) = precprime(2*prime(n)); \\ Michel Marcus, May 08 2016

Formula

a(n) = A007917(A100484(n)). - R. J. Mathar, May 08 2016

A080192 Complement of A080191 relative to A000040. Prime p is a term iff there is no prime between 2*p and 2*q, where q is the next prime after p.

Original entry on oeis.org

59, 71, 101, 107, 149, 263, 311, 347, 461, 499, 521, 569, 673, 757, 821, 823, 857, 881, 883, 907, 967, 977, 1009, 1061, 1091, 1093, 1151, 1213, 1279, 1283, 1297, 1301, 1319, 1433, 1487, 1489, 1493, 1549, 1571, 1597, 1619, 1667, 1697, 1721, 1787, 1871, 1873
Offset: 1

Views

Author

Klaus Brockhaus, Feb 10 2003

Keywords

Comments

From Peter Munn, Oct 19 2017: (Start)
This is also a list of the leaf node labels in the tree of primes described in A290183.
For k > 0, the earliest run of k adjacent primes in this sequence starts with the least prime greater than A215238(k+1)/2. Thus we see that A215238(3) = 1637 corresponds to 821 followed by 823 being the first run of 2 adjacent primes in this sequence.
(End)
From Peter Munn, Nov 02 2017: (Start)
If p is in A005384 (a Sophie Germain prime), 2p+1 is therefore a prime, so p cannot be in this sequence. Similarly, any prime p in A023204 has a corresponding prime 2p+3, which (if p>2) likewise implies its absence (and if p=2 it is in A005384).
If p is the lesser of twin primes it is in this sequence if it is neither Sophie Germain nor in A023204.
Conjecture: a(n)/A000040(n) is asymptotic to 3. Reason: I expect the distribution of terms in A102820 to converge to a geometric distribution with mean value 2.
(End)

Examples

			59 is a term since 113 is the prime preceding 2*59, 127 is the next prime and 61 is the largest of all prime factors of 114, ..., 122 = 2*61, ..., 126.
		

Crossrefs

A080191 is the complement of this sequence relative to A000040.
Sequences with related analysis: A005384, A023204, A052248, A102820, A215238, A290183.
Sequences with similar definitions: A195270, A195271, A195325, A195377.

Programs

  • Mathematica
    Select[Prime[Range[300]],NextPrime[2#]>2NextPrime[#]&] (* Harvey P. Dale, Jul 07 2011 *)
  • NARS2000
    ¯1↓b/⍨(1⌽a)<1πa←2×b←¯2π⍳1E4 ⍝ Michael Turniansky, Dec 29 2020
  • PARI
    {forprime(k=2,1873,p=precprime(2*k); q=nextprime(p+1); m=0; for(j=p+1,q-1,f=factor(j); a=f[matsize(f)[1],1]; if(m
    				
  • PARI
    isok(p) = isprime(p) && (primepi(2*p) == primepi(2*nextprime(p+1)));
    forprime(p=2, 2000, if (isok(p), print1(p, ", "))) \\ Michel Marcus, Sep 22 2017
    
  • PARI
    first(n) = my(res = vector(n), i = 0); {n==0&&return([]); forprime(p = 2, , if(nextprime(2*p) > 2*nextprime(p + 1), i++; res[i] = p; if(i == n, return(res))))} \\ David A. Corneth, Oct 25 2017
    

Formula

For all k, prime(k) = A000040(k) is a term if and only if A102820(k) = 0. - Peter Munn, Oct 24 2017

A136801 Largest prime factor of the composites in the n-th prime gap larger than 2.

Original entry on oeis.org

5, 7, 11, 13, 17, 19, 23, 17, 29, 31, 23, 37, 41, 43, 47, 11, 53, 37, 61, 43, 67, 73, 31, 79, 83, 43, 89, 61, 97, 103, 109, 113, 29, 79, 83, 127, 131, 89, 137, 139, 97, 151, 103, 157, 163, 167, 173, 13, 179, 181, 53, 47, 191, 193, 197, 199, 101, 139, 211, 109, 17, 223
Offset: 1

Views

Author

Enoch Haga, Jan 24 2008

Keywords

Comments

The largest prime factor of numbers in the interval [A136798(n),A136799(n)].
The sequence is obtained from A052248 by removing terms from composites in prime gaps of size 2.

Examples

			a(1)=5 because the composites in the run from 8, 9, 10 contain prime factors 2, 3, and 5, with 5 being the largest at N=10.
		

Crossrefs

Programs

  • Maple
    A006530 := proc(n) max( op(numtheory[factorset](n))) ; end:
    A136798 := proc(n) local a; if n = 1 then 8; else a := nextprime( procname(n-1))+1 ; while nextprime(a)-a <=2 do a := nextprime(a)+1 ; od; RETURN(a) ; fi; end:
    A136801 := proc(n) local a,i; i := A136798(n) ; a := A006530( i) ; while not isprime(i+1) do i := i+1 ; a := max(a, A006530(i)) ; od: a ; end:
    seq(A136801(n),n=1..20) ; # R. J. Mathar, May 27 2009

Extensions

Edited by R. J. Mathar, May 27 2009

A080191 Primes p such that p is the largest of all prime factors of the numbers between the prime preceding 2*p and the next prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 61, 67, 73, 79, 83, 89, 97, 103, 109, 113, 127, 131, 137, 139, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 269, 271, 277, 281, 283, 293, 307, 313
Offset: 1

Views

Author

Klaus Brockhaus, Feb 10 2003

Keywords

Comments

Complement of A080192 relative to A000040.
From Flávio V. Fernandes, May 26 2021: (Start)
Equivalently, primes p such that p is the largest of all prime factors of the numbers in the interval [2*p, nextprime(2*p)-1].
For any prime p, if p is not the largest of all prime factors of the numbers in that interval (i.e., if p is not a term of this sequence), then the largest of all prime factors of the numbers in that interval will be a prime q that occurs in the number 2*q.
For all n, the largest prime < 2*a(n) is a term of A059788. (End)

Examples

			5 is a term since 7 is the prime preceding 2*5, 11 is the next prime and 5 is the largest of all prime factors of 8, 9 and 10.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[300], PrimeQ[#] && NextPrime[2*#] < 2 * NextPrime[#] &] (* Amiram Eldar, Feb 07 2020 *)
  • PARI
    {forprime(k=2,317,p=precprime(2*k); q=nextprime(p+1); m=0; for(j=p+1,q-1,f=factor(j); a=f[matsize(f)[1],1]; if(m
    				

Formula

f(precprime(2*p)) = p, where f is the mapping defined by A052248.

A052298 Maximal number of distinct prime factors of any composite number between n-th and (n+1)-st primes.

Original entry on oeis.org

0, 1, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2, 2, 2, 3, 3, 3, 2, 3, 2, 3, 3, 2, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 2, 3, 3, 4, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 4, 3, 2, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 2, 3, 4, 3, 3, 4, 3, 3, 3, 4, 3, 3
Offset: 1

Views

Author

Labos Elemer, Feb 09 2000

Keywords

Examples

			For n = 46, prime(46) = 199, next prime is 211. In between, the number of prime factors for {200,201,...,210} is {2,2,2,2,3,2,2,2,2,2,4} of which the maximum is 4, which arises at 210. So a(46) = 4. [Corrected by _Sean A. Irvine_, Nov 04 2021]
		

Crossrefs

Programs

  • Mathematica
    Join[{0}, Max[PrimeNu[Range[First[#]+1, Last[#]-1]]]&/@Partition[ Prime[ Range[ 2, 110]], 2, 1]] (* Harvey P. Dale, Sep 26 2014 *)

Extensions

Missing a(1)=0 inserted by Sean A. Irvine, Nov 04 2021

A052299 Minimal number of distinct prime factors of any composite number between n-th and (n+1)-st primes.

Original entry on oeis.org

1, 2, 1, 2, 1, 2, 2, 1, 3, 1, 2, 3, 2, 1, 2, 3, 1, 2, 2, 2, 1, 2, 2, 2, 3, 2, 2, 2, 1, 1, 2, 3, 2, 3, 2, 2, 2, 1, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 3, 1, 1, 2, 2, 3, 2, 2, 3, 1, 2, 2, 3, 2, 2, 2, 1, 3, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 1, 3, 1, 2, 2, 2, 2, 4, 2, 2
Offset: 2

Views

Author

Labos Elemer, Feb 09 2000

Keywords

Examples

			For n = 81: prime(81) = 419, prime(82) = 421. The intermediate range of composites includes only 420 = 4*3*5*7 having 4 distinct prime factors, so a(81) = 4.
		

Crossrefs

Programs

  • Mathematica
    Min[PrimeNu[Range[#[[1]]+1,#[[2]]-1]]]&/@Partition[Prime[ Range[ 2,110]],2,1] (* Harvey P. Dale, Mar 31 2012 *)

Extensions

Offset corrected by Sean A. Irvine, Nov 04 2021

A069898 Smallest of the largest prime divisors of all the composite numbers between prime(n) and prime(n+1).

Original entry on oeis.org

2, 3, 2, 3, 2, 3, 5, 3, 5, 2, 5, 7, 5, 3, 3, 5, 2, 7, 3, 5, 3, 7, 3, 5, 17, 7, 3, 7, 5, 2, 5, 23, 3, 5, 11, 3, 11, 7, 7, 5, 7, 3, 7, 11, 5, 3, 5, 19, 11, 13, 5, 3, 2, 13, 11, 5, 11, 7, 47, 3, 5, 11, 13, 7, 3, 7, 7, 29, 7, 17, 5, 23, 5, 19, 3, 7, 5, 5, 13, 7, 13, 3, 23, 7, 7, 5, 17, 11, 29, 13, 3, 7
Offset: 2

Views

Author

Labos Elemer, Apr 10 2002

Keywords

Examples

			n=128: prime(128) = 719, prime(129) = 727, d = 8; composites between the 2 primes:{720,721,722,723,724,725,726}; factor-sets: (2,3,5),(7,103),(2,19),(3,241),(2,3,181),(5,29),(2,3,11), least factors:{2,7,2,3,2,5,2};  Min and Max = {2,7}; largest factors:{5,103,241,181,29,11}; Min and Max = {5,241}; max-of-least = A052180(128) = 7, max-of-largest = A052248(128) = 241, a(128) = min-of-largest = a(128) = 5.
		

Crossrefs

Programs

  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]]; lf[x_] := Length[FactorInteger[x]]; ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}]; ep[x_] := Table[Part[ffi[x], 2*w], {w, 1, lf[x]}]; mif[x_] := Min[ba[x]]; maf[x_] := Max[ba[x]]; Table[Min[Table[maf[w], {w, Prime[n]+1, Prime[n+1]-1}]], {n, 1, 128}]
  • PARI
    lista(plim) = {my(pmin, prev = 3); forprime(p = 5, plim, pmin = p; for(k = prev+1, p-1, pmin = min(pmin, vecmax(factor(k)[, 1]))); print1(pmin, ", "); prev = p);} \\ Amiram Eldar, Oct 24 2024

A116992 Number of primes < (highest prime dividing any composite between the n-th and (n+1)th prime) that are coprime to every composite between the n-th and (n+1)th prime.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 3, 1, 4, 1, 3, 0, 4, 3, 0, 4, 9, 6, 6, 0, 4, 10, 0, 6, 4, 9, 11, 6, 10, 0, 2, 15, 17, 6, 16, 0, 5, 0, 19, 2, 13, 14, 25, 5, 3, 13, 0, 12, 23, 23, 15, 0, 24, 28, 12, 12, 20, 20, 3, 31, 22, 31, 27, 7, 0, 32, 32, 7, 6, 37, 36, 34, 40, 14, 20, 0, 33, 0, 19, 0, 40
Offset: 1

Views

Author

Leroy Quet, Apr 02 2006

Keywords

Examples

			Between the 12th prime and the 13th prime are the composites 38, 39 and 40.
Dividing these composites are the primes 2, 3, 5, 13 and 19. There are three primes < 19 and coprime to the composites between 37 and 41: 7, 11 and 17. So a(12) = 3.
		

Crossrefs

Cf. A052248.

Programs

  • PARI
    a(n) = {p = prime(n); q = prime(n+1); vp = []; for (x=p+1, q-1, f = factor(x); for (i=1, #f~, vp = Set(concat(vp, f[i, 1])));); if (#vp == 0, return (0)); nb = 0; forprime (pp=2, precprime(vecmax(vp)-1), ok = 1; for (x=p+1, q-1, if (gcd(x, pp) != 1, ok = 0; break;);); if (ok, nb++);); nb;} \\ Michel Marcus, Mar 01 2015

Extensions

Corrected and extended by Diana L. Mecum, Jul 19 2008
Previous Showing 11-20 of 22 results. Next