OFFSET
0,2
COMMENTS
Conjectures:
1. Indices of zeros: 2^(x+2)-2, x >= 0.
2. There are infinitely many n's such that a(n)=n.
3. Every integer k >= 0 appears in a(n) at least once.
4. Every k >= 0 appears in a(n) infinitely many times.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..10000
FORMULA
a(n) = 2^n mod (n+2).
a(n) = A106262(2*n, n). - G. C. Greubel, Jan 11 2023
MATHEMATICA
Table[PowerMod[2, n, n+2], {n, 0, 100}] (* T. D. Noe, Jun 26 2012 *)
PROG
(Python)
print([2**n % (n+2) for n in range(222)])
(Magma) [Modexp(2, n, n+2): n in [0..120]]; // G. C. Greubel, Jan 11 2023
(SageMath) [power_mod(2, n, n+2) for n in range(121)] # G. C. Greubel, Jan 11 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, Jun 22 2012
STATUS
approved