login
A289985
Smallest positive k such that (n+1)^k + (-n)^k is divisible by a square greater than 1.
6
10, 11, 2, 55, 21, 10, 3, 10, 33, 26, 10, 21, 10, 5, 21, 10, 55, 10, 8, 2, 2, 3, 7, 78, 55, 3, 34, 2, 21, 78, 10, 68, 10, 41, 57, 10, 55, 10, 55, 21, 10
OFFSET
1,1
COMMENTS
From Robert Israel, Sep 04 2017: (Start)
If (n+1)^k + (-n)^k is divisible by p^2 then so is (m+1)^k + (-m)^k
for m == n (mod p^2), so a(m) <= k for such m.
For example, a(n) = 2 if n == 3 or 21 (mod 25).
a(24) = 78 because 25^78 + (-24)^78 is divisible by 13^2.
a(42) <= 171 because 43^171 + (-42)^171 is divisible by 19^2.
(End)
EXAMPLE
a(1) = 10 because (1+1)^10 + (-1)^10 = 1025 is divisible by 5^2.
MAPLE
A289985 := proc(n)
local k;
for k from 1 do
if not issqrfree((n+1)^k+(-n)^k) then
return k;
end if;
end do:
end proc:
for n from 1 do
printf("%d, \n", A289985(n)) ;
end do: # R. J. Mathar, Sep 04 2017
MATHEMATICA
Table[SelectFirst[Range[10^2], ! SquareFreeQ[(n + 1)^# + (-n)^#] &], {n, 23}] (* Michael De Vlieger, Sep 03 2017 *)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
EXTENSIONS
a(24)-a(41) from Giovanni Resta, Sep 04 2017
STATUS
approved