A242338 Numbers k such that k*7^k-1 is semiprime.
1, 5, 12, 21, 42, 50, 60, 242, 272
Offset: 1
Links
- Paul Leyland, Cullen and Woodall numbers and their generalization to other bases
- Paul Leyland, Factorizations of n*7^n-1
Programs
-
Magma
IsSemiprime:=func; [n: n in [2..80] | IsSemiprime(s) where s is n*7^n-1];
-
Maple
issemiprime:= proc(n) local F,t; F:= ifactors(n,easy)[2]; t:= add(f[2],f=F); if t = 1 then if type(F[1][1],integer) then return false fi elif t = 2 then return not hastype(F,name) else # t > 2 return false fi; F:= ifactors(n)[2]; return evalb(add(f[2],f=F)=2); end proc: select(n -> `if`(n::odd, isprime((n*7^n-1)/2), issemiprime(n*7^n-1)), [$1..100]); # Robert Israel, Aug 19 2014
-
Mathematica
Select[Range[80], PrimeOmega[# 7^# - 1]==2&]
-
PARI
for(n=1,100,if(bigomega(n*7^n-1)==2,print1(n,", "))) \\ Derek Orr, Aug 20 2014
Extensions
a(1) = 1 prepended and comment amended by Harvey P. Dale, Aug 12 2014
a(8) and a(9) from Robert Israel, Aug 20 2014
Comments