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

A191587 Smallest prime p such that p-n is the product of exactly n distinct primes.

Original entry on oeis.org

3, 17, 73, 1789, 6011, 1616621, 2114977, 111546443, 2156564419, 742073813491, 784009188701, 3093211012526647, 1240404920534023, 3206211009211419509, 171718219950879367781, 993969333554296364281, 6899316550553351234327, 108706781456610360939660763, 29365306848773629524600829, 376147205196163170923414109869
Offset: 1

Views

Author

Michel Lagneau, Jun 07 2011

Keywords

Examples

			a(4) = 1789 because 1789 - 4 = 1785 = 3 * 5 * 7 * 17.
		

Crossrefs

Programs

  • Haskell
    a191587 n = head [p | p <- dropWhile (<= n) a000040_list,
                          a001221 (p - n) == n]
    -- Reinhard Zumkeller, Jun 24 2015
  • Maple
    A191587 := proc(n) for i from 1 do p := ithprime(i) ; if A001221(p-n) = n then return p ; end if; end do: end proc: # R. J. Mathar, Jul 01 2011
  • Mathematica
    Table[k := 2; While[Not[Length[FactorInteger[Prime[k] - n]] == n], k++ ]; Prime[k], {n, 1, 8}]
  • PARI
    A191587List(m) = local(j=1, p); for(n=1, m, p=prime(j); while(omega(p-n)!=n, p=prime(j++)); print1(p, ", "));
      default(primelimit, 2200000); A191587List(7); \\ Klaus Brockhaus, Jun 21 2011
    

Extensions

a(10)-a(16) from Donovan Johnson, Jan 14 2012
a(17)-a(20) from Robert Israel, Mar 27 2020

A345740 a(n) is the least prime p such that Omega(p + n) = n where Omega is A001222, or 0 if no such prime exists.

Original entry on oeis.org

2, 2, 5, 131, 43, 15619, 281, 6553, 503, 137771, 3061, 244140613, 8179, 22143361, 401393, 199290359, 491503, 8392333984357, 524269, 3486784381, 2097131, 226640986043, 28311529, 303745269775390601, 113246183, 9885033776809, 469762021, 176518460300597, 805306339, 77737724676061053405079339
Offset: 1

Views

Author

Zak Seidov, Jun 25 2021

Keywords

Examples

			For n=1, a(1) = 2 as 2+1 = 3 (Omega(2 + 1) = Omega(3) = 1, see A000040(1)).
For n=2, 2+2 = 4 = 2*2 (semiprime, Omega(4) = 2, see A001358(1)).
For n=3, 5+3 = 8 = 2*2*2 (triprime, Omega(8) = 3, see A014612(1)).
For n=4, 131+4 = 135 = 3*3*3*5 (Omega(135) = 4,  see A014613(16)).
		

Crossrefs

Programs

  • Mathematica
    Table[k=1;While[PrimeOmega[Prime@k+n]!=n,k++];Prime@k,{n,11}] (* Giorgos Kalogeropoulos, Jun 25 2021 *)
  • PARI
    a(n) = my(p=2); while (bigomega(p+n) != n, p = nextprime(p+1)); p; \\ Michel Marcus, Jun 26 2021
    
  • Python
    from sympy import factorint, nextprime, primerange
    def Omega(n): return sum(e for f, e in factorint(n).items())
    def a(n):
        lb = 2**n
        p = nextprime(max(lb-n, 1) - 1)
        while Omega(p+n) != n: p = nextprime(p)
        return p
    print([a(n) for n in range(1, 12)]) # Michael S. Branicky, Aug 14 2021

Formula

a(n) + n >= A053669(n)^n for n > 2 if a(n) exists. - David A. Corneth, Aug 14 2021
Showing 1-2 of 2 results.