login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Composites one larger than a prime and with exactly three distinct prime factors.
5

%I #10 Sep 21 2015 01:42:17

%S 30,42,60,84,90,102,110,114,132,138,140,150,168,174,180,182,198,228,

%T 230,234,240,252,258,264,270,282,294,308,312,318,348,350,354,360,374,

%U 380,402,410,434,440,444,450,468,480,492,504,522,558,564,572,588,594,600

%N Composites one larger than a prime and with exactly three distinct prime factors.

%H Harvey P. Dale, <a href="/A136152/b136152.txt">Table of n, a(n) for n = 1..1000</a>

%F Find primes followed by N with exactly three prime factors, without repetition.

%F Equals A008864 INTERSECT A033992. - _R. J. Mathar_, Feb 20 2008

%e a(0)=30 because 30 follows the prime 29 and has three factors 2, 3 and 5.

%p isA008864 := proc(n) if n -prevprime(n) = 1 then true ; else false ; fi ; end: isA033992 := proc(n) if nops(numtheory[factorset](n)) = 3 then true ; else false ; fi ; end: isA136152 := proc(n) isA008864(n) and isA033992(n) ; end: for n from 1 do p := ithprime(n) ; if isA136152(p+1) then print(p+1) ; fi ; od: # _R. J. Mathar_, Feb 20 2008

%t Select[Prime[Range[110]]+1,PrimeNu[#]==3&] (* _Harvey P. Dale_, Apr 08 2012 *)

%Y Cf. A136151, A136153, A136154, A136155.

%K easy,nonn

%O 1,1

%A _Enoch Haga_, Dec 16 2007

%E Edited by _R. J. Mathar_, Feb 20 2008