login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A242788 Numbers n such that (n^n-3)/(n-3) is an integer. 5

%I #11 Jan 29 2015 10:33:05

%S 1,2,4,5,6,7,9,11,13,15,16,27,31,33,36,55,73,91,133,241,249,366,367,

%T 491,513,577,733,757,871,913,971,991,1233,1333,1576,1711,1927,2071,

%U 2346,2593,2731,3307,3391,3529,4005,4591,5113,5371,5409,5671,5793,6567,6801,7465,7591

%N Numbers n such that (n^n-3)/(n-3) is an integer.

%C For n > 6, equivalent to n such that n^n = 3 mod n-3. - _Chai Wah Wu_, Jan 19 2015

%H Chai Wah Wu, <a href="/A242788/b242788.txt">Table of n, a(n) for n = 1..4388</a>

%e (6^6-3)/(6-3) = 46653/3 = 15551 is an integer. Thus 6 is a member of this sequence.

%t Select[ Range@ 7600, Mod[ PowerMod[#, #, # - 3] - 3, # - 3] == 0 &] (* _Robert G. Wilson v_, Jan 21 2015 *)

%o (PARI) for(n=1,10^4,if(n!=3,s=(n^n-3)/(n-3);if(floor(s)==s,print(n))))

%o (Python)

%o A242788_list = [1,2,4,5,6] + [n for n in range(7,10**6) if pow(n, n, n-3) == 3]

%o # _Chai Wah Wu_, Jan 19 2015

%Y Cf. A242787.

%K nonn

%O 1,2

%A _Derek Orr_, May 22 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 5 17:15 EDT 2024. Contains 372277 sequences. (Running on oeis4.)