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.

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

This page as a plain text file.
%I A191587 #26 Mar 27 2020 03:05:40
%S A191587 3,17,73,1789,6011,1616621,2114977,111546443,2156564419,742073813491,
%T A191587 784009188701,3093211012526647,1240404920534023,3206211009211419509,
%U A191587 171718219950879367781,993969333554296364281,6899316550553351234327,108706781456610360939660763,29365306848773629524600829,376147205196163170923414109869
%N A191587 Smallest prime p such that p-n is the product of exactly n distinct primes.
%e A191587 a(4) = 1789 because 1789 - 4 = 1785 = 3 * 5 * 7 * 17.
%p A191587 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
%t A191587 Table[k := 2; While[Not[Length[FactorInteger[Prime[k] - n]] == n], k++ ]; Prime[k], {n, 1, 8}]
%o A191587 (PARI) A191587List(m) = local(j=1, p); for(n=1, m, p=prime(j); while(omega(p-n)!=n, p=prime(j++)); print1(p, ", "));
%o A191587   default(primelimit, 2200000); A191587List(7); \\ _Klaus Brockhaus_, Jun 21 2011
%o A191587 (Haskell)
%o A191587 a191587 n = head [p | p <- dropWhile (<= n) a000040_list,
%o A191587                       a001221 (p - n) == n]
%o A191587 -- _Reinhard Zumkeller_, Jun 24 2015
%Y A191587 Cf. A097977.
%Y A191587 Cf. A000040, A001221.
%K A191587 nonn,hard
%O A191587 1,1
%A A191587 _Michel Lagneau_, Jun 07 2011
%E A191587 a(10)-a(16) from _Donovan Johnson_, Jan 14 2012
%E A191587 a(17)-a(20) from _Robert Israel_, Mar 27 2020