A056645 Numbers n such that n | 3^n + 2^n + 1^n.
1, 2, 3, 9, 14, 27, 81, 98, 99, 153, 243, 621, 686, 729, 1199, 2187, 4018, 4802, 5049, 6561, 8019, 12393, 19683, 20541, 31509, 33614, 59049, 70389, 82377, 113974, 150903, 177147, 226557, 235298, 299619, 308014, 340443, 408969, 423929, 531441
Offset: 1
Keywords
Crossrefs
Cf. A001550.
Programs
-
Mathematica
Do[ If[ Mod[ PowerMod[ 3, n, n ] + PowerMod[ 2, n, n ] + 1, n ] == 0, Print[ n ] ], {n, 1, 10^6} ]