login
A045584
Numbers k that divide 4^k + 3^k.
2
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,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
A045584_list = list(islice(A045584_gen(), 10)) # Chai Wah Wu, May 16 2022
(PARI) isok(k) = Mod(4, k)^k + Mod(3, k)^k == 0; \\ Michel Marcus, May 16 2022
CROSSREFS
Cf. A074605.
Sequence in context: A269774 A269654 A250359 * A228439 A216130 A124536
KEYWORD
nonn
EXTENSIONS
a(28)-a(31) from Amiram Eldar, Oct 23 2021
STATUS
approved