A077135 Composite numbers n whose proper (other than 1 and n) odd divisors are prime and even divisors are 1 less than a prime.
4, 6, 8, 9, 10, 12, 14, 15, 20, 21, 22, 25, 26, 33, 34, 35, 38, 39, 44, 46, 49, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 92, 93, 94, 95, 106, 111, 115, 116, 118, 119, 121, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 164, 166, 169
Offset: 1
Keywords
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..7000
Programs
-
Mathematica
fQ[n_] := Block[{d = Take[ Divisors[n], {2, -2}]}, Union[ Flatten[ PrimeQ[{Select[d, OddQ[ # ] &], Select[d, EvenQ[ # ] &] + 1}]]] == {True}]; Select[ Range[ 176], fQ[ # ] &] (* Robert G. Wilson v, Mar 31 2005 *) cnQ[n_]:=Module[{d=Most[Rest[Divisors[n]]]},AllTrue[Join[Select[ d,OddQ],Select[ d,EvenQ]+1],PrimeQ]]; Select[Range[200],CompositeQ[#] && cnQ[#]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 05 2019 *)
-
PARI
is(n)=fordiv(n,d,if(!isprime(bitor(d,1)) && d>1, return(d==n))); !isprime(n) && n>1 \\ Charles R Greathouse IV, Sep 24 2012
Extensions
Corrected and extended by Robert G. Wilson v, Mar 31 2005
Definition corrected, following an observation by Franklin T. Adams-Watters. - Charles R Greathouse IV, Sep 24 2012
Comments