cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A213859 a(n) = 2^n mod (n+2).

Original entry on oeis.org

1, 2, 0, 3, 4, 4, 0, 2, 6, 6, 4, 7, 8, 2, 0, 9, 16, 10, 4, 2, 12, 12, 16, 8, 14, 20, 4, 15, 16, 16, 0, 2, 18, 22, 16, 19, 20, 2, 24, 21, 16, 22, 4, 38, 24, 24, 16, 32, 6, 2, 4, 27, 34, 52, 8, 2, 30, 30, 4, 31, 32, 2, 0, 8, 16, 34, 4, 2, 46, 36, 16, 37, 38, 17
Offset: 0

Views

Author

Alex Ratushnyak, Jun 22 2012

Keywords

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.

Crossrefs

Programs

  • Magma
    [Modexp(2,n,n+2): n in [0..120]]; // G. C. Greubel, Jan 11 2023
    
  • Mathematica
    Table[PowerMod[2, n, n+2], {n, 0, 100}] (* T. D. Noe, Jun 26 2012 *)
  • Python
    print([2**n % (n+2) for n in range(222)])
    
  • SageMath
    [power_mod(2,n,n+2) for n in range(121)] # G. C. Greubel, Jan 11 2023

Formula

a(n) = 2^n mod (n+2).
a(n) = A106262(2*n, n). - G. C. Greubel, Jan 11 2023