login
A057839
Numbers k such that k | 10^k + 8^k + 6^k + 4^k + 2^k + 1.
0
1, 31, 198089, 876881261, 2026728077
OFFSET
1,2
MATHEMATICA
Select[ Range[ 10^6 ], Mod[ PowerMod[ 10, #, # ] + PowerMod[ 8, #, # ] + PowerMod[ 6, #, # ] + PowerMod[ 4, #, # ] + PowerMod[ 2, #, # ] + 1, # ] == 0 & ]
PROG
(Python)
def afind(limit):
for k in range(1, limit+1, 2):
if (1 + sum(pow(e, k, k) for e in [2, 4, 6, 8, 10])) % k == 0:
print(k, end=", ")
afind(10**6) # Michael S. Branicky, Apr 01 2021 after Robert G. Wilson v
(PARI) is_ok(k)=(sum(j=1, 5, Mod(2*j, k)^k) + 1)==0; \\ Joerg Arndt, Apr 02 2021
CROSSREFS
Sequence in context: A351135 A107122 A059113 * A123524 A123523 A079595
KEYWORD
nonn,more
AUTHOR
Robert G. Wilson v, Nov 09 2000
EXTENSIONS
Title corrected by Sean A. Irvine, Mar 31 2021
a(4)-a(5) from Michael S. Branicky, Apr 01 2021
STATUS
approved