A087893 Number of numbers m satisfying 1 < m < n such that m^2 == m (mod n).
0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 2, 0, 2, 2, 0, 0, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 2, 0, 6, 0, 0, 2, 2, 2, 2, 0, 2, 2, 2, 0, 6, 0, 2, 2, 2, 0, 2, 0, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 6, 0, 2, 2, 0, 2, 6, 0, 2, 2, 6, 0, 2, 0, 2, 2, 2, 2, 6, 0, 2, 0, 2, 0, 6, 2, 2, 2, 2, 0, 6, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 0, 6, 0, 2, 6
Offset: 1
Keywords
References
- C. R. J. Singleton, "Prime Function Problem": Solution to Problem 2355, Journal of Recreational Mathematics, Vol. 29(3) pp. 232-234, 1998.
Links
- G. C. Greubel, Table of n, a(n) for n = 1..5000
Programs
-
Mathematica
Join[{0}, Table[2^(PrimeNu[n]) - 2, {n, 2, 50}]] (* or *) Table[2*Module[{c = PrimeNu[n]}, (c (c - 1))/2], {n, 1, 20}] (* G. C. Greubel, May 20 2017 *)
-
PARI
concat([0], for(n=2, 50, print1( 2^(omega(n)) - 2, ", "))) \\ G. C. Greubel, May 20 2017
Formula
a(n) = 2^omega(n) - 2 (for n > 1).
Comments