OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..16699 (terms 1..169 from R. J. Mathar)
F. Richman, Primality testing with Fermat's little theorem
FORMULA
a(n) = n-th positive integer k(>1) such that 2^(k-1) = 1 (mod k) and 5^(k-1) = 1 (mod k).
EXAMPLE
a(1)=561 since 561 is the first positive integer k(>1) which satisfies 2^(k-1) = 1 (mod k) and 5^(k-1) = 1 (mod k).
MATHEMATICA
Select[Range[1, 10^5, 2], CompositeQ[#] && PowerMod[2, #-1, #] == PowerMod[5, #-1, #] == 1 &] (* Amiram Eldar, Jun 29 2019 *)
PROG
(PARI) lista(nn) = forcomposite(n=1, nn, if ((Mod(2, n)^(n-1)==1) && (Mod(5, n)^(n-1)==1), print1(n, ", ")); ); \\ Michel Marcus, Sep 08 2016
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Serhat Sevki Dincer (sevki(AT)ug.bilkent.edu.tr), May 05 2003
STATUS
approved