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.

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

Original entry on oeis.org

1, 2, 4, 5, 6, 7, 9, 11, 12, 15, 19, 21, 23, 27, 30, 35, 39, 42, 43, 45, 51, 57, 63, 67, 75, 81, 83, 87, 99, 103, 111, 120, 123, 129, 131, 147, 159, 163, 171, 183, 195, 203, 219, 223, 237, 243, 255, 259, 275, 291, 297, 303, 315, 323, 331, 339, 345, 354, 363, 381, 387
Offset: 1

Views

Author

Derek Orr, May 24 2014

Keywords

Comments

These are also numbers n such that (n^3-3^n)/(n-3) is an integer.

Examples

			(5^5-3^3)/(5-3) = 3098/2 = 1549 is an integer. Thus 5 is a member of this sequence.
		

Crossrefs

Cf. A242870.

Programs

  • Maple
    filter:= proc(n) (n^n - 27) mod (n-3) = 0 end proc:
    select(filter, [1,2,$4..1000]); # Robert Israel, May 25 2014
  • Mathematica
    Join[{1,2},Select[Range[4,400],IntegerQ[(#^#-27)/(#-3)]&]] (* Harvey P. Dale, Dec 17 2014 *)
  • PARI
    for(n=1,1000,if(n!=3,s=(n^n-3^3)/(n-3);if(floor(s)==s,print(n))))