login
Positive integers n such that 13^n == 4 (mod n).
14

%I #20 Apr 10 2020 22:10:25

%S 1,3,51,129,125869,158287,1723647,1839003,90808797,3661886147,

%T 7368982721,130424652229,1616928424359,4003183891851,66657658685869

%N Positive integers n such that 13^n == 4 (mod n).

%C No other terms below 10^15. - _Max Alekseyev_, Nov 26 2017

%C Some larger terms: 84058689739550643018360088224267, 11083544368708558891212925543084197628431243723. - _Max Alekseyev_, Jun 26 2011

%t Join[{1, 3}, Select[Range[1, 5000], Mod[13^#, #] == 4 &]] (* _G. C. Greubel_, Nov 19 2017 *)

%t Join[{1, 3}, Select[Range[2000000], PowerMod[13, #, #] == 4 &]] (* _Robert Price_, Apr 10 2020 *)

%o (PARI) isok(n) = Mod(13, n)^n == 4; \\ _Michel Marcus_, Nov 19 2017

%Y Solutions to 13^n == k (mod n): A001022 (k=0), A015963(k=-1), A116621 (k=1), A116622 (k=2), A116629(k=3), this sequence (k=4), A116611 (k=5), A116631 (k=6), A116632 (k=7), A295532 (k=8), A116636 (k=9), A116620(k=10), A116638 (k=11), A116639 (k=15)

%Y Cf. A116609, A015921, A125949.

%K more,nonn

%O 1,2

%A _Zak Seidov_, Feb 19 2006

%E More terms from _Ryan Propper_, Jan 09 2008

%E Terms 1,3 prepended and a(12)-a(15) added by _Max Alekseyev_, Jun 26 2011, Nov 26 2017