OFFSET
1,2
MATHEMATICA
Select[Range[10^6], Divisible[PowerMod[3, #, #] + PowerMod[4, #, #], #] &] (* Amiram Eldar, Oct 23 2021 *)
PROG
(Python)
from itertools import islice, count
def A045584_gen(startvalue=1): # generator of terms >= startvalue
kstart = max(startvalue, 1)
k3, k4 = 3**kstart, 4**kstart
for k in count(kstart):
if (k3+k4) % k == 0:
yield k
k3 *= 3
k4 *= 4
(PARI) isok(k) = Mod(4, k)^k + Mod(3, k)^k == 0; \\ Michel Marcus, May 16 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(28)-a(31) from Amiram Eldar, Oct 23 2021
STATUS
approved