A077136 Composite numbers n whose proper divisors (excluding 1 and n) are all of the form p or p+1, with p prime.
4, 6, 8, 9, 10, 12, 14, 15, 16, 21, 22, 24, 25, 26, 28, 33, 34, 35, 38, 39, 46, 49, 51, 55, 57, 58, 62, 65, 69, 74, 76, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 121, 122, 123, 124, 129, 133, 134, 141, 142, 143, 145, 146, 148, 155, 158, 159, 161
Offset: 1
Keywords
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A077135.
Programs
-
Mathematica
seqQ[n_] := CompositeQ[n] && AllTrue[Most @ Rest @ Divisors[n], PrimeQ[#] || PrimeQ[# - 1] &]; Select[Range[161], seqQ] (* Amiram Eldar, Dec 10 2019 *)
-
PARI
for(n=1,200,v=divisors(n):s=0:for(k=2,length(v)-1,if(isprime(v[k])||isprime(v[k]-1),s=s+1)): if(s&&s==length(v)-2,print1(n",")))
Extensions
Corrected and extended by Ralf Stephan, Mar 23 2003
Comments