[go: up one dir, main page]

login
A073797
a(n) = 2^n mod pi(n).
4
0, 0, 0, 2, 1, 0, 0, 0, 0, 3, 1, 2, 4, 2, 4, 4, 1, 0, 0, 0, 0, 5, 1, 2, 4, 8, 7, 2, 4, 2, 4, 8, 5, 10, 9, 8, 4, 8, 4, 6, 12, 2, 4, 8, 2, 8, 1, 2, 4, 8, 1, 0, 0, 0, 0, 0, 0, 8, 16, 2, 4, 8, 16, 14, 10, 3, 6, 12, 5, 8, 16, 2, 4, 8, 16, 11, 1, 6, 12, 2, 4, 18, 13, 3, 6, 12, 1, 8, 16, 8, 16, 8, 16, 8, 16
OFFSET
2,4
LINKS
FORMULA
a(n) = A000079(n) mod A000720(n).
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