login
Numbers m that divide 2^k + 1 for some nonnegative k.
12

%I #81 Sep 24 2020 07:01:12

%S 1,2,3,5,9,11,13,17,19,25,27,29,33,37,41,43,53,57,59,61,65,67,81,83,

%T 97,99,101,107,109,113,121,125,129,131,137,139,145,149,157,163,169,

%U 171,173,177,179,181,185,193,197,201,205,209,211,227,229,241,243,249,251,257,265

%N Numbers m that divide 2^k + 1 for some nonnegative k.

%C Since for some a < n, 2^a == 1 (mod n) (a consequence of Euler's Theorem), searching up to k=n is sufficient to determine whether an integer is in the sequence. - _Michael B. Porter_, Dec 06 2009

%C A195470(a(n)) > 0; A195610(n) gives the smallest k such that a(n) divides 2^k + 1. - _Reinhard Zumkeller_, Sep 21 2011

%C This sequence is the subset of odd integers > 1 as (2*n - 1) in A179480, such that the corresponding entry in A179480 is odd. Example: A179480(14) = 5, odd, with (2*14 - 1) = 27; and 5 is a term of this sequence. A014659 (odd and does not divide (2^k + 1) for any k >= 1) represents the subset of odd terms >1 corresponding to A179480 entries that are even. - _Gary W. Adamson_, Aug 20 2012

%C All prime factors of a(n) are in A091317. Sequence has asymptotic density 0. - _Robert Israel_, Aug 12 2014

%C This sequence, for m>2, is those m for which, for some e, (m-1)(2^e-1)/m is a term of A253608. Moreover, e(n) is 2*A195610(n) when m is a(n). - _Donald M Davis_, Jan 12 2018

%C From _Wolfdieter Lang_, Aug 22 2020: (Start)

%C Without a(2) = 2 this is the complement of A014659 relative to the odd positive integers A005408.

%C For the least nonnegative integer k(n) with 2^k(n) + 1 == d(n)*a(n), for n >= 1, see k(n) = A195610(n) and d(n) = A337220(n).

%C Starting with a(3) = 3 these numbers are the odd moduli, named 2*n+1 in the definition of A003558, for which the minus signs applies (see A332433(m) for the signs applying for A003558(m)). (End)

%H T. D. Noe, <a href="/A014657/b014657.txt">Table of n, a(n) for n = 1..1000</a>

%H P. Moree, Appendix to V. Pless et al., <a href="http://dx.doi.org/10.1006/ffta.1996.0172">Cyclic Self-Dual Z_4 Codes</a>, Finite Fields Applic., vol. 3 pp. 48-69, 1997.

%p select(t -> [msolve(2^x+1,t)] <> [], [2*i+1 $ i=1..1000]); # _Robert Israel_, Aug 12 2014

%t ok[n_] := Module[{k=0}, While[k<=n && Mod[2^k + 1, n] > 0, k++]; k<n]; Select[Range[265], ok] (* _Jean-François Alcover_, Apr 06 2011, after PARI prog *)

%t okQ[n_] := Module[{k = MultiplicativeOrder[2, n]}, EvenQ[k] && Mod[2^(k/2) + 1, n] == 0]; Join[{1, 2}, Select[Range[3, 265, 2], okQ]] (* _T. D. Noe_, Apr 06 2011 *)

%o (PARI) isA014657(n) = {local(r);r=0;for(k=0,n,if(Mod(2^k+1,n)==Mod(0,n),r=1));r} \\ _Michael B. Porter_, Dec 06 2009

%o (Haskell)

%o import Data.List (findIndices)

%o a014657 n = a014657_list !! (n-1)

%o a014657_list = map (+ 1) $ findIndices (> 0) $ map a195470 [1..]

%o -- _Reinhard Zumkeller_, Sep 21 2011

%Y Besides initial terms 1 and 2, a subsequence of A296243. Their set difference is given by A296244.

%Y Cf. A000051, A003558, A005408, A014659, A014661, A091317, A179480, A195470, A195610, A332433, A337220.

%K nonn,nice

%O 1,2

%A _N. J. A. Sloane_

%E More terms from _Henry Bottomley_, May 19 2000

%E Extended and corrected by _David W. Wilson_, May 01 2001