OFFSET
2,4
LINKS
Michael De Vlieger, Table of n, a(n) for n = 2..10000
EXAMPLE
From Michael De Vlieger, Dec 09 2018: (Start)
a(2) = 0 since 2^2 mod PrimePi(2) = 4 mod 1 = 0.
a(5) = 2 since 2^5 mod PrimePi(5) = 32 mod 3 = 2. (End)
MATHEMATICA
Array[Mod[2^#, PrimePi@ #] &, 95, 2] (* Michael De Vlieger, Dec 09 2018 *)
Table[PowerMod[2, n, PrimePi[n]], {n, 2, 100}] (* Harvey P. Dale, Aug 30 2021 *)
PROG
(PARI) for(n=2, 100, print1(lift(Mod(2^n, primepi(n))), ", ")) \\ G. C. Greubel, Dec 10 2018
(Magma) [2^n mod #PrimesUpTo(n): n in [2..100]]; // G. C. Greubel, Dec 10 2018
(Sage) [mod(2^n, prime_pi(n)) for n in (2..100)] # G. C. Greubel, Dec 10 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Aug 12 2002
STATUS
approved