A364683 a(n) is the least k such that 1 + 2^k + 3^k is divisible by n, or -1 if there is no such k.
0, 1, 0, 3, -1, 1, 2, -1, 3, -1, 9, 3, -1, 2, -1, -1, 9, 3, -1, -1, -1, 9, 5, -1, -1, -1, 9, -1, -1, -1, 16, -1, 9, 9, -1, 3, 12, -1, -1, -1, 18, -1, -1, 9, -1, 5, -1, -1, 4, -1, 9, -1, -1, 9, -1, -1, -1, -1, -1, -1, -1, 16, -1, -1, -1, 9, -1, 9, 5, -1, -1, -1, 19, 12, -1, -1, -1, -1, 33, -1, 27
Offset: 1
Examples
a(7) = 2 because 1 + 2^2 + 3^2 = 14 is divisible by 7 while 1 + 2^0 + 3^0 = 3 and 1 + 2^1 + 3^1 = 6 are not.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A001550.
Programs
-
Maple
f:= proc(n) local k; for k from 0 to numtheory:-phi(n) + max(padic:-ordp(n,2), padic:-ordp(n,3)) do if 1 + 2&^k + 3&^k mod n = 0 then return k fi od; -1 end proc: map(f, [$1..100]);
Comments