OFFSET
2,8
COMMENTS
If n is an odd prime, a(n) = 0. In other words, ((1-sqrt(2))^p + (1+sqrt(2))^p - 2)) is divisible by p where p is an odd prime.
FORMULA
a(n) = (((1-sqrt(2))^n + (1+sqrt(2))^n - 2) / 4) mod n, for n > 1.
PROG
(PARI) a048379(n) = my(w=quadgen(8)); -1/2+(3/4+1/2*w)*(1+w)^n+(3/4-1/2*w)*(1-w)^n;
a(n) = a048379(n-2) % n;
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Mar 16 2016
STATUS
approved