%I #12 Jul 22 2024 17:20:51
%S 2,13,109,433,757,3889,8209,17497,52489,58321,70957,1190701,1705861,
%T 2598157,6627097,13463173,57395629,23245229341,79320757897,
%U 1069604540569,1631815099669,5774114968057,8635817966221,23765922477217,43781455818469
%N Primes p such that the multiplicative order of 3 modulo p is a power of 3.
%C Prime factors of numbers of the form 3^3^i - 1: p divides 3^3^i - 1 if and only if the multiplicative order of 3 modulo p is a power of 3 not exceeding 3^i.
%e 13 is a term since the multiplicative order of 3 modulo 13 is 3 = 3^1, which means that 13 is a factor of 3^3^1 - 1.
%e 109 is a term since the multiplicative order of 3 modulo 109 is 27 = 3^3, which means that 109 is a factor of 3^3^3 - 1.
%o (PARI) isA367648(n) = isprime(n) && (n!=3) && isprimepower(3*znorder(Mod(3,n)))
%Y Subsequence of A367265.
%Y Cf. A367649 (ord(3,p) being 2 times a power of 3, prime factors of numbers of the form 3^3^i + 1), A023394 (ord(2,p) being a power of 2, prime factors of numbers of the form 2^2^i - 1 (or of the form 2^2^i + 1)).
%K nonn,hard
%O 1,1
%A _Jianing Song_, Nov 25 2023
%E a(18)-a(19) from _Michel Marcus_, Nov 27 2023
%E a(20)-a(25) from _Max Alekseyev_, Jul 22 2024