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!)
A063982 Number of divisors of 2^n - 1 that are relatively prime to 2^m - 1 for all 0 < m < n. 9

%I #43 Apr 22 2019 15:21:57

%S 1,2,2,2,2,1,2,2,2,2,4,2,2,2,2,2,2,2,2,2,2,2,4,2,4,2,2,4,8,2,2,2,2,2,

%T 4,4,4,2,4,2,4,2,8,4,4,2,8,4,2,4,8,8,8,2,8,2,4,4,4,4,2,2,4,4,2,4,4,8,

%U 2,4,8,4,8,4,4,8,2,2,8,2,8,4,4,4,2,2,4,4,2,2,8,16,2,4,8,4,4,2,8,8

%N Number of divisors of 2^n - 1 that are relatively prime to 2^m - 1 for all 0 < m < n.

%C a(364) = 24 is the first term not a power of 2. - _Jianing Song_, Apr 29 2018

%C a(n) is the number of divisors of A064078(n). - _Jianing Song_, Apr 20 2019

%H Jianing Song, <a href="/A063982/b063982.txt">Table of n, a(n) for n = 1..500</a> (Terms 1 through 250 from Reinhard Zumkeller)

%H Sam Wagstaff, <a href="https://homes.cerias.purdue.edu/~ssw/cun/">Factorizations of 2^n-1, n odd, n<1200</a>, Cunningham Project.

%e Divisors of 2^8-1 are {1, 3, 5, 15, 17, 51, 85, 255}, but only 1 and 17 are relatively prime to 2^m - 1 for all m < 8, thus a(8)=2.

%t a = {1}; Do[ d = Divisors[2^n - 1]; l = Length[d]; c = 0; k = 1; While[ k < l + 1, If[ Union[ GCD[a, d[[k]] ]] == {1}, c++ ]; k++ ]; Print[c]; a = Union[ Flatten[ Append[a, Transpose[ FactorInteger[2^n - 1]][[ 1]] ]]], {n, 1, 100} ]

%o (Haskell)

%o a063982 n = a063982_list !! (n-1)

%o a063982_list = f [] $ tail a000225_list where

%o f us (v:vs) = (length ds) : f (v:us) vs where

%o ds = [d | d <- a027750_row v, all ((== 1). (gcd d)) us]

%o -- _Reinhard Zumkeller_, Jan 04 2013

%o (PARI) a(n) = {my(v = vector(n-1, k, 2^k-1), na = 0, nb); fordiv(2^n-1, d, nb = 0; for (k=1, n-1, if (gcd(d, v[k]) == 1, nb++, break);); if (nb == n-1, na++);); return (na);} \\ _Michel Marcus_, Apr 30 2018

%Y Cf. A064078.

%Y Cf. A027750, A000225.

%K nonn,nice

%O 1,2

%A _Vladeta Jovovic_, Sep 06 2001

%E More terms from _Robert G. Wilson v_, Sep 10 2001

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 April 25 10:33 EDT 2024. Contains 371967 sequences. (Running on oeis4.)