This site is supported by donations to The OEIS Foundation.

2^n-2 mod(n)

From OeisWiki
Jump to: navigation, search

[1]

0, 0, 0, 2, 0, 2, 0, 6, 6, 2, 0, 2, 0, 2, 6, 14, 0, 8, 14, 6, 2, 0, 14, 5, 2, 24, 14, 0, 2, 0, 30, 6, 2, 16, 26, 0, 2, 6, 14, 0, 20, 0, 14, 15, 2, 0, 14, 28, 22, 6, 14, 0, 26, 41, 30, 6, 2, 0, 14, 0, 2, 6, 62, 30, 62, 0, 14, 6, 42, 0, 62, 0, 2, 66, 14, 16, 62, 0, 14, 78, 2, 0, 62, 30, 2, 6, 78, 0, 62, 35, 14, 6, 2, 11, 62, 0, 16, 15, ...

This equation is a part of Fermat's little theorem with the test of 2.

The output will show all primes A000040 and pseudoprimes A001567 as 0.

Some values happen to be odd and/or prime. I cannot explain why this is and I'm curious about them.