login
A242871
Numbers n such that (n^n-3^3)/(n-3) is an integer.
3
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,2
COMMENTS
These are also numbers n such that (n^3-3^n)/(n-3) is an integer.
LINKS
EXAMPLE
(5^5-3^3)/(5-3) = 3098/2 = 1549 is an integer. Thus 5 is a member of this sequence.
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 *)
PROG
(PARI) for(n=1, 1000, if(n!=3, s=(n^n-3^3)/(n-3); if(floor(s)==s, print(n))))
CROSSREFS
Cf. A242870.
Sequence in context: A099593 A184867 A029903 * A026420 A026479 A242788
KEYWORD
nonn
AUTHOR
Derek Orr, May 24 2014
STATUS
approved