OFFSET
1,2
COMMENTS
These are also numbers n such that (n^3-3^n)/(n-3) is an integer.
LINKS
Robert Israel, Table of n, a(n) for n = 1..1149
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
KEYWORD
nonn
AUTHOR
Derek Orr, May 24 2014
STATUS
approved