cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

1, 2, 4, 5, 6, 7, 9, 11, 13, 15, 16, 27, 31, 33, 36, 55, 73, 91, 133, 241, 249, 366, 367, 491, 513, 577, 733, 757, 871, 913, 971, 991, 1233, 1333, 1576, 1711, 1927, 2071, 2346, 2593, 2731, 3307, 3391, 3529, 4005, 4591, 5113, 5371, 5409, 5671, 5793, 6567, 6801, 7465, 7591
Offset: 1

Views

Author

Derek Orr, May 22 2014

Keywords

Comments

For n > 6, equivalent to n such that n^n = 3 mod n-3. - Chai Wah Wu, Jan 19 2015

Examples

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

Crossrefs

Cf. A242787.

Programs

  • Mathematica
    Select[ Range@ 7600, Mod[ PowerMod[#, #, # - 3] - 3, # - 3] == 0 &] (* Robert G. Wilson v, Jan 21 2015 *)
  • PARI
    for(n=1,10^4,if(n!=3,s=(n^n-3)/(n-3);if(floor(s)==s,print(n))))
    
  • Python
    A242788_list = [1,2,4,5,6] + [n for n in range(7,10**6) if pow(n, n, n-3) == 3]
    # Chai Wah Wu, Jan 19 2015