OFFSET
1,1
COMMENTS
a(22) = 2701 is the first composite term of the sequence.
MATHEMATICA
Select[Range[2, 12400], PowerMod[2, #, (#-1)#/2]==2 && !PowerMod[2, #, (#-1)#]==2 &] (* Stefano Spezia, Sep 19 2024 *)
PROG
(Magma) [k: k in [2..13333] | Modexp(2, k, (k^2-k) div 2) eq 2 and not Modexp(2, k, k^2-k) eq 2];
(PARI) isok(k)={k > 1 && Mod(2, (k-1)*k)^k == 2 + (k-1)*k/2} \\ Andrew Howroyd, Aug 29 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Aug 29 2024
STATUS
approved