login
Positive integers n such that 13^n == 3 (mod n).
16

%I #20 Apr 10 2020 22:43:42

%S 1,2,5,166,287603,9241538,2366680105,8347156585,21682897793,

%T 6988245760865,9045859950329,10076294257985,50299408064905,

%U 254874726648713

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

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

%C Some larger terms: 1440926367749746685, 76025040962646716305439353859479569558065. - _Max Alekseyev_, Jun 29 2011

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

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

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

%Y Cf. A116609, A050259, A122780, A130422, A123061, A277554.

%Y Solutions to 13^n == k (mod n): A001022 (k=0), A015963 (k=-1), A116621 (k=1), A116622 (k=2), this sequence (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 nonn

%O 1,2

%A _Zak Seidov_, Feb 19 2006

%E Two more terms from _Ryan Propper_, Jan 09 2008

%E Terms 1,2 are prepended and a(9)-a(14) are added by _Max Alekseyev_, Jun 29 2011; Nov 24, 2017