login
a(n) is the smallest positive number k such that n divides 5^k + k.
4

%I #27 Feb 07 2026 05:47:21

%S 1,1,1,3,5,1,6,3,2,5,6,7,12,11,20,3,4,13,18,15,37,61,22,19,25,21,2,11,

%T 6,25,30,3,61,7,15,31,4,53,14,35,18,37,42,79,20,29,25,19,6,25,7,31,52,

%U 31,10,11,79,139,58,55,60,123,38,3,125,61,52,7,49,15

%N a(n) is the smallest positive number k such that n divides 5^k + k.

%C For any positive integer n, if k = a(n) + n*m*A007736(n) and m >= 0 then 5^k + k is divisible by n.

%H Robert Israel, <a href="/A333336/b333336.txt">Table of n, a(n) for n = 1..10000</a>

%H Brazil National Olympiad, 2005, <a href="https://artofproblemsolving.com/community/c6h57713">Problem 6</a>

%F a(5^m) = 5^m for m >= 0.

%p f:= proc(n) local k;

%p for k from 1 do if 5 &^ k + k mod n = 0 then return k fi od

%p end proc:

%p map(f, [$1..100]); # _Robert Israel_, Feb 05 2026

%o (PARI) a(n) = for(k=1, oo, if(Mod(5, n)^k==-k, return(k)));

%Y Cf. A007736, A104745, A247248, A333334, A333335, A333341.

%K nonn,easy

%O 1,4

%A _Jinyuan Wang_, Apr 14 2020