A250208 Ratio of the primitive part of 2^n-1 to the product of primitive prime factors of 2^n-1.
1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 5, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1
Keywords
Examples
a(11) = 1 since Phi_11(2) = (2^11-1)/(2-1) = 2047, and the primitive prime factors of 2^11-1 are 23 and 89, so a(11) = 2047/(23*89) = 1. a(18) = 3 since Phi_18(2) = 2^6 - 2^3 + 1 = 57, and the only primitive prime factor of 2^18-1 is 19, so a(18) = 57/19 = 3.
Links
Programs
-
Mathematica
a250208[n_] = If[n == 364, 1093, If[n == 1755, 3511, GCD[Cyclotomic[n, 2], n]]]; Table[a250208[n], {n, 0, 200}]
-
PARI
a(n) = if (n==364, 1093, if (n==1755, 3511, gcd(polcyclo(n, 2), n)));
-
PARI
isprimitive(p, n) = {for (r=1, n-1, if (((2^r-1) % p) == 0, return (0)); ); return (1); } ppf(n) = {my(pf = factor(2^n-1)[,1]); prod(k=1,#pf, if (isprimitive(pf[k], n), pf[k], 1));} a(n) = if (issquarefree(m=polcyclo(n,2)), gcd(m, n), m/ppf(n)); \\ Michel Marcus, Mar 06 2015
Comments