OFFSET
1,4
EXAMPLE
a(1) = 1 because x^0 == 0 (mod 1) is solvable where x: 0, 1, 2, 3, 4,.. A001477;
a(2) = 1 because x^0 == 0 (mod 2) is unsolvable,
x^1 == 1 (mod 2) is solvable where x: 1, 3, 5, 7, 9,.. A005408;
a(3) = 1 because x^0 == 0 (mod 3) is unsolvable,
x^1 == 1 (mod 3) is solvable where x: 1, 4, 7, 10, 13,.. A016777,
x^2 == 2 (mod 3) is unsolvable;
a(4) = 2 because x^0 == 0 (mod 4) is unsolvable,
x^1 == 1 (mod 4) is solvable where x: 1, 5, 9, 13, 16,.. A016813,
x^2 == 2 (mod 4) is unsolvable,
x^3 == 3 (mod 4) is solvable where x: 3, 7, 11, 15, 19,.. A004767.
PROG
(PARI) is(k, n) = for (i=0, n-1, if (Mod(i, n)^k == k, return(1)));
a(n) = sum(k=0, n-1, is(k, n)); \\ Michel Marcus, Aug 13 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Aug 12 2024
EXTENSIONS
More terms from Michel Marcus, Aug 13 2024
STATUS
approved