login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A129492
Composite numbers k such that 2^k mod k is a power of 2.
6
6, 9, 10, 12, 14, 15, 20, 21, 22, 24, 26, 28, 30, 33, 34, 38, 39, 40, 44, 46, 48, 51, 52, 56, 57, 58, 60, 62, 63, 65, 66, 68, 69, 72, 74, 76, 78, 80, 82, 84, 85, 86, 87, 90, 92, 93, 94, 96, 102, 106, 111, 112, 114, 116, 118, 120, 122, 123, 124, 126, 129, 132, 133, 134, 138
OFFSET
1,1
COMMENTS
Complement to composite numbers: 4, 8, 16, 18, 25, 27, 32, 35, 36, 42, 45, 49, 50, 54, 55, 64, 70, 75, 77, 81, 88, 91, 95, 98, 99, ....
LINKS
EXAMPLE
15 is a term since 2^15 mod 15 = 8.
MAPLE
filter:= proc(n) local k;
if isprime(n) then return false fi;
k:= 2 &^ n mod n;
k > 1 and k = 2^padic:-ordp(k, 2)
end proc:
select(filter, [$4..1000]); # Robert Israel, Dec 03 2019
MATHEMATICA
Select[Range@ 141, IntegerQ@ Log[2, PowerMod[2, #, # ]] &]
PROG
(Magma) [k:k in [2..150]| not IsPrime(k) and not IsZero(a) and (PrimeDivisors(a) eq [2]) where a is 2^k mod k ]; // Marius A. Burtea, Dec 04 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Robert G. Wilson v, Apr 17 2007
STATUS
approved