login
A244673
Numbers k that divide 2^k + 4.
8
1, 2, 3, 4, 20, 260, 740, 2132, 2180, 5252, 43364, 49268, 49737, 80660, 130052, 293620, 542852, 661412, 717027, 865460, 1564180, 2185220, 2192132, 2816372, 3784916, 4377620, 4427540, 5722004, 6307652, 6919460, 8765252, 9084452, 9498260, 9723611, 11346260, 12208820, 12220132
OFFSET
1,2
LINKS
Jens Kruse Andersen, Table of n, a(n) for n = 1..100
OEIS Wiki, 2^n mod n
EXAMPLE
2^2 + 4 = 8 is divisible by 2. Thus 2 is a term of this sequence.
2^3 + 4 = 12 is divisible by 3. Thus 3 is a term of this sequence.
2^4 + 4 = 20 is divisible by 4. Thus 4 is a term of this sequence.
MAPLE
A244673:=n->`if`(type((2^n+4)/n, integer), n, NULL): seq(A244673(n), n=1..10^5); # Wesley Ivan Hurt, Jul 15 2014
Alternative:
select(n -> 4 + 2&^n mod n = 0, [$1..10^5]); # Robert Israel, Jul 15 2014
MATHEMATICA
Select[Range[1000], Mod[2^# + 4, #] == 0 &] (* Alonso del Arte, Jul 14 2014 *)
Join[{1, 2, 3}, Select[Range[1223*10^4], PowerMod[2, #, #]==#-4&]] (* Harvey P. Dale, Jan 16 2023 *)
PROG
(PARI) for(n=1, 10^8, if(Mod(2, n)^n+4==0, print1(n, ", "))) \\ Jens Kruse Andersen, Jul 15 2014
CROSSREFS
The odd terms form A115976.
Sequence in context: A331558 A347210 A012284 * A012574 A012282 A012287
KEYWORD
nonn
AUTHOR
Derek Orr, Jul 14 2014
STATUS
approved