OFFSET
4,2
COMMENTS
Every nonnegative integer seems to appear in the sequence, and every integer seems to appear in the sequence of first differences (see link).
From Robert Israel, Dec 04 2017: (Start)
a(n)=0 iff n>=8 is a power of 2.
a(n)=1 iff n=4 or n is in A033984.
a(n)=2 iff n>=4 is in A015925 and is not divisible by 4. (End)
LINKS
Robert Israel, Table of n, a(n) for n = 4..10000
Enrique Navarrete, Sequences derived from residues of 2^n (mod n)
EXAMPLE
For n=9, 2^5 = 32 == 5 mod 9.
MAPLE
MATHEMATICA
Array[Mod[2^(# - 4), #] &, 75, 4] (* Michael De Vlieger, Dec 02 2017 *)
Array[PowerMod[2, #-4, #]&, 80, 4] (* Harvey P. Dale, Dec 01 2018 *)
PROG
(PARI) a(n) = lift(Mod(2, n)^(n-4)); \\ Michel Marcus, Oct 30 2017
CROSSREFS
KEYWORD
AUTHOR
Enrique Navarrete, Oct 29 2017
EXTENSIONS
More terms from Michel Marcus, Oct 30 2017
STATUS
approved