login
Numbers m such that m + 3 divides m^m - 3.
3

%I #49 Jun 28 2024 18:31:52

%S 3,7,10,27,727,1587,9838,758206,789223,1018846,1588126,1595287,

%T 2387206,4263586,9494746,12697378,17379860,21480726,25439767,38541526,

%U 44219926,55561536,62072326,64335356,70032586,83142466,85409276

%N Numbers m such that m + 3 divides m^m - 3.

%C m such that m+3 divides (-3)^m - 3. - _Robert Israel_, Dec 14 2014

%H Chai Wah Wu, <a href="/A251862/b251862.txt">Table of n, a(n) for n = 1..96</a>

%e 3 is in this sequence because 3 + 3 = 6 divides 3^3 - 3 = 24.

%p select(t ->((-3) &^ (t) - 3) mod (t+3) = 0, [$1..10^6]); # _Robert Israel_, Dec 14 2014

%t a251862[n_] := Select[Range[n], Mod[PowerMod[#, #, # + 3] - 3, # + 3] == 0 &]; a251862[10^6] (* _Michael De Vlieger_, Dec 14 2014, after _Robert G. Wilson v_ at A252041 *)

%o (Magma) [n: n in [2..10000] | Denominator((n^n-3)/(n+3)) eq 1];

%o (PARI) isok(n) = Mod(n, n+3)^n == 3; \\ _Michel Marcus_, Dec 10 2014

%o (Sage)

%o [n for n in range(10^4) if (n + 3).divides((-3)^n - 3)] # _Peter Luschny_, Jan 17 2015

%o (Python)

%o A251862_list = [n for n in range(10**6) if pow(-3, n, n+3) == 3] # _Chai Wah Wu_, Jan 19 2015

%Y Cf. ...............Numbers n such that x divides y, where:

%Y ...x.....y......k=0.......k=1.......k=2........k=3........

%Y ..n-k..n^n-k..A000027...A087156...A242787....A242788......

%Y ..n-k..n^n+k..A000027..see below..A249751....A252041......

%Y ..n+k..n^n-k..A000027...A004275...A251603..this sequence..

%Y ..n+k..n^n+k..A000027...A004273...A213382....A242800......

%Y (For x=n-1 and y=n^n+1, the only terms are 0, 2 and 3. - _David L. Harden_, Jan 14 2015)

%K nonn

%O 1,1

%A _Juri-Stepan Gerasimov_, Dec 10 2014

%E More terms from _Michel Marcus_, Dec 10 2014