OFFSET
1,2
COMMENTS
From Robert Israel, Sep 02 2016: (Start)
Odd k is in the sequence iff (7^k-k)/2 is prime.
If k == 1 (mod 3) then k is in the sequence iff (7^k-k)/3 is prime.
708 is in the sequence but is not necessarily a(7). (End)
a(8) >= 384. - Daniel Suteu, Aug 05 2019
EXAMPLE
1 is in this sequence because 7^1-1 = 2*3 is semiprime.
20 is in this sequence because 7^20-20 = 1511201*52800564781 and these two factors are prime.
MAPLE
Res:= NULL:
for n from 1 to 100 do
F:= ifactors(7^n-n, easy)[2];
if add(t[2], t=F) >= 3 or (hastype(F, symbol) and add(t[2], t=F) >= 2)
then flag:= false
elif add(t[2], t=F) = 2 and not hastype(F, symbol) then flag:= true
else
flag:= evalb(numtheory:-bigomega(7^n-n)=2)
fi;
if flag then Res:= Res, n fi
od:
Res; # Robert Israel, Sep 02 2016
MATHEMATICA
Select[Range[80], PrimeOmega[7^# - #]==2 &]
PROG
(Magma) IsSemiprime:=func<i | &+[d[2]: d in Factorization(i)] eq 2>; [m: m in [1..80] | IsSemiprime(s) where s is 7^m-m];
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Vincenzo Librandi, Dec 21 2014
EXTENSIONS
a(6) from Robert Israel, Sep 02 2016
a(7) from Daniel Suteu, Aug 05 2019
STATUS
approved