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!)
A242870 Numbers n such that (n^n-2^2)/(n-2) is an integer. 3
1, 3, 4, 6, 8, 14, 20, 22, 38, 44, 56, 62, 86, 102, 110, 128, 158, 164, 182, 222, 254, 296, 302, 326, 344, 380, 422, 470, 488, 502, 542, 590, 622, 662, 686, 758, 782, 822, 884, 902, 974, 1028, 1094, 1102, 1136, 1262, 1316, 1334, 1406, 1460, 1502, 1622, 1766, 1808 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) is even for all n > 2. 1 and 3 are members of this sequence because (n^n-2^2)/(n-2) becomes (2^2-n^n) and (n^n-2^2), respectively, which are both integers.
Given the term (n^n-k^k)/(n-k) (here, k=2), whenever k = 2^m for some m, there are significantly fewer data values within a given range of numbers. See A242871 for k=3.
These are also numbers n such that (2^n-n^2)/(n-2) is an integer.
LINKS
EXAMPLE
(4^4-2^2)/(4-2) = 252/2 = 126 is an integer. Thus, 4 is a member of this sequence.
MAPLE
filter:= proc(n) (n&^n - 4) mod (n-2) = 0 end proc;
select(filter, [1, $3..1000]); # Robert Israel, May 25 2014
MATHEMATICA
Join[{1}, Select[Range[3, 2000], IntegerQ[(#^#-4)/(#-2)]&]] (* Harvey P. Dale, Apr 24 2016 *)
PROG
(PARI) for(n=1, 2500, if(n!=2, s=(n^n-2^2)/(n-2); if(floor(s)==s, print(n))))
CROSSREFS
Cf. A242871.
Sequence in context: A004713 A050475 A340770 * A025073 A325432 A204659
KEYWORD
nonn
AUTHOR
Derek Orr, May 24 2014
STATUS
approved

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 March 2 09:28 EST 2024. Contains 370461 sequences. (Running on oeis4.)