cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A252660 Numbers k such that 7^k - k is a semiprime.

This page as a plain text file.
%I A252660 #14 Sep 08 2022 08:46:10
%S A252660 1,20,26,32,54,162,204
%N A252660 Numbers k such that 7^k - k is a semiprime.
%C A252660 From _Robert Israel_, Sep 02 2016: (Start)
%C A252660 Odd k is in the sequence iff (7^k-k)/2 is prime.
%C A252660 If k == 1 (mod 3) then k is in the sequence iff (7^k-k)/3 is prime.
%C A252660 708 is in the sequence but is not necessarily a(7). (End)
%C A252660 a(8) >= 384. - _Daniel Suteu_, Aug 05 2019
%e A252660 1 is in this sequence because 7^1-1 = 2*3 is semiprime.
%e A252660 20 is in this sequence because 7^20-20 = 1511201*52800564781 and these two factors are prime.
%p A252660 Res:= NULL:
%p A252660 for n from 1 to 100 do
%p A252660       F:= ifactors(7^n-n,easy)[2];
%p A252660     if add(t[2],t=F) >= 3 or (hastype(F,symbol) and add(t[2],t=F) >= 2)
%p A252660        then flag:= false
%p A252660     elif add(t[2],t=F) = 2 and not hastype(F,symbol) then flag:= true
%p A252660     else
%p A252660       flag:= evalb(numtheory:-bigomega(7^n-n)=2)
%p A252660     fi;
%p A252660   if flag then  Res:= Res, n fi
%p A252660 od:
%p A252660 Res; # _Robert Israel_, Sep 02 2016
%t A252660 Select[Range[80], PrimeOmega[7^# - #]==2 &]
%o A252660 (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];
%Y A252660 Cf. similar sequences listed in A252656.
%K A252660 nonn,more
%O A252660 1,2
%A A252660 _Vincenzo Librandi_, Dec 21 2014
%E A252660 a(6) from _Robert Israel_, Sep 02 2016
%E A252660 a(7) from _Daniel Suteu_, Aug 05 2019