login
Positive integers n such that 13^n == 2 (mod n).
17

%I #34 Apr 10 2020 21:43:08

%S 1,11,140711,863101,1856455,115602923,566411084209,706836043419179

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

%C No other terms below 10^16. - _Max Alekseyev_, Nov 02 2018

%t Select[Range[1, 500000], Mod[13^#, #] == 2 &] (* _G. C. Greubel_, Nov 19 2017 *)

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

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

%Y Cf. A116609.

%Y Solutions to b^n == 2 (mod n): A015919 (b=2), A276671 (b=3), A130421 (b=4), A124246 (b=5), A277401 (b=7), this sequence (b=13), A333269 (b=17).

%Y Solutions to 13^n == k (mod n): A015963 (k=-1), A116621 (k=1), this sequence (k=2), A116629 (k=3), A116630 (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).

%K more,nonn

%O 1,2

%A _Zak Seidov_, Feb 19 2006

%E One more term from _Ryan Propper_, Jun 11 2006

%E Term a(1)=1 is prepended and a(7)-a(8) are added by _Max Alekseyev_, Jun 29 2011