login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A112983 a(n) = 2^(n+1) mod n. 7
0, 0, 1, 0, 4, 2, 4, 0, 7, 8, 4, 8, 4, 8, 1, 0, 4, 2, 4, 12, 16, 8, 4, 8, 14, 8, 25, 4, 4, 8, 4, 0, 16, 8, 1, 20, 4, 8, 16, 32, 4, 2, 4, 32, 34, 8, 4, 32, 11, 48, 16, 32, 4, 2, 31, 8, 16, 8, 4, 32, 4, 8, 16, 0, 64, 62, 4, 32, 16, 18, 4, 56, 4, 8, 61, 32, 36, 50, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
LINKS
FORMULA
a(n) = A106262(2*n-1, n-2). - G. C. Greubel, Jan 11 2023
EXAMPLE
a(3) = 2^4 mod 3 = 16 mod 3 = 1.
MATHEMATICA
Table[PowerMod[2, n + 1, n], {n, 100}] (* T. D. Noe, Aug 13 2012 *)
PROG
(Python)
print([2**(n+1) % n for n in range(1, 77)])
# Alex Ratushnyak, Aug 12 2012
(Magma) [Modexp(2, n+1, n): n in [1..120]]; // G. C. Greubel, Jan 11 2023
(SageMath) [power_mod(2, n+1, n) for n in range(1, 120)] # G. C. Greubel, Jan 11 2023
CROSSREFS
Sequence in context: A248252 A117238 A197291 * A332330 A068454 A090976
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Oct 08 2005
EXTENSIONS
Name, data and offset corrected by Alex Ratushnyak, Aug 12 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 14:32 EDT 2024. Contains 371960 sequences. (Running on oeis4.)