A045584 Numbers k that divide 4^k + 3^k.
1, 7, 49, 343, 2401, 2653, 16807, 18571, 117649, 129997, 823543, 909979, 1005487, 4941601, 5764801, 6369853, 7038409, 34591207, 40353607, 44588971, 49268863, 236474833, 242138449, 282475249, 312122797, 344882041, 381079573, 1655323831, 1694969143, 1872866779, 1977326743
Offset: 1
Keywords
Crossrefs
Cf. A074605.
Programs
-
Mathematica
Select[Range[10^6], Divisible[PowerMod[3, #, #] + PowerMod[4, #, #], #] &] (* Amiram Eldar, Oct 23 2021 *)
-
PARI
isok(k) = Mod(4, k)^k + Mod(3, k)^k == 0; \\ Michel Marcus, May 16 2022
-
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 A045584_list = list(islice(A045584_gen(),10)) # Chai Wah Wu, May 16 2022
Extensions
a(28)-a(31) from Amiram Eldar, Oct 23 2021