OFFSET
1,1
COMMENTS
Numbers k such that 3^k == 3 (mod k) and k is divisible by the square of a Mirimanoff prime (or base-3 Wieferich prime), A014127.
A non-coprime pseudoprime in base b is a number k such that b^k == b (mod k) and that gcd(b, k) > 1, and the non-coprime pseudoprime in base 3 (726, 1053426, 6498426, ...) that are not squarefree are listed in A306450 while the others terms in this sequence (121, 3751, 4961, ...) are listed in A244065. So this sequence is the union of A244065 and A306450.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..1000
EXAMPLE
121 is a term because 3^120 == (3^5)^24 == 1 (mod 121) and 121 = 11^2.
Although 3^725 = 243 rather than 1 mod 726, we see that nevertheless 3^726 = 3 mod 726, and since 726 = 2 * 3 * 11^2, 726 is in the sequence. - Alonso del Arte, Mar 16 2019
MATHEMATICA
Select[Range[5000], PowerMod[3, #, #] == 3 && MoebiusMu[#] == 0 &] (* Alonso del Arte, Mar 16 2019 *)
PROG
(PARI) forcomposite(n=1, 10^7, if(Mod(3, n)^n==3 && !issquarefree(n), print1(n, ", ")))
CROSSREFS
KEYWORD
nonn
AUTHOR
Jianing Song, Feb 17 2019
STATUS
approved