login
A063982
Number of divisors of 2^n - 1 that are relatively prime to 2^m - 1 for all 0 < m < n.
9
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, 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, 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
OFFSET
1,2
COMMENTS
a(364) = 24 is the first term not a power of 2. - Jianing Song, Apr 29 2018
a(n) is the number of divisors of A064078(n). - Jianing Song, Apr 20 2019
LINKS
Jianing Song, Table of n, a(n) for n = 1..500 (Terms 1 through 250 from Reinhard Zumkeller)
Sam Wagstaff, Factorizations of 2^n-1, n odd, n<1200, Cunningham Project.
EXAMPLE
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.
MATHEMATICA
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} ]
PROG
(Haskell)
a063982 n = a063982_list !! (n-1)
a063982_list = f [] $ tail a000225_list where
f us (v:vs) = (length ds) : f (v:us) vs where
ds = [d | d <- a027750_row v, all ((== 1). (gcd d)) us]
-- Reinhard Zumkeller, Jan 04 2013
(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
CROSSREFS
Cf. A064078.
Sequence in context: A276134 A297031 A229895 * A374900 A318882 A327160
KEYWORD
nonn,nice
AUTHOR
Vladeta Jovovic, Sep 06 2001
EXTENSIONS
More terms from Robert G. Wilson v, Sep 10 2001
STATUS
approved