A333335 a(n) is the smallest positive number k such that n divides 4^k + k.
1, 2, 2, 4, 1, 2, 5, 8, 2, 4, 10, 8, 4, 6, 11, 16, 13, 2, 12, 4, 5, 10, 22, 8, 21, 4, 11, 48, 28, 14, 30, 32, 17, 16, 31, 20, 7, 12, 29, 24, 40, 26, 42, 68, 11, 22, 44, 32, 5, 44, 86, 4, 52, 38, 51, 48, 59, 28, 50, 44, 60, 30, 47, 64, 4, 68, 3, 16, 158, 94, 70
Offset: 1
Links
- Brazil National Olympiad, 2005, Problem 6
Programs
-
PARI
a(n) = for(k=1, oo, if(Mod(4, n)^k==-k, return(k)));
Formula
a(4^m) = 4^m for m >= 0.
Comments