OFFSET
1,5
COMMENTS
Least nonnegative k such that (2^n+k)/n is an integer.
If n is a power of 2, a(n) = 0; otherwise a(n) = n - A015910(n). - Robert Israel, Apr 08 2015
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = -(2^n) mod n. - Robert Israel, Apr 08 2015
MAPLE
seq(-2&^n mod n, n = 1 .. 100); # Robert Israel, Apr 08 2015
PROG
(Python)
def A082493(n): return (-pow(2, n, n))%n # Chai Wah Wu, Aug 24 2023
CROSSREFS
KEYWORD
AUTHOR
Vladeta Jovovic, Apr 28 2003
STATUS
approved