login
A215935
Number of ordered pairs of primes (p, q) dividing n for which p^e = 1 mod q, where e is the exponent of p in n.
2
0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 0, 0, 1, 0, 2, 0, 1, 1, 1, 0, 3, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 1, 1, 2, 1, 1, 0, 3, 0, 1, 1, 0, 0, 2, 0, 1, 0, 2, 0, 1, 0, 1, 1, 1, 0, 3, 0, 2, 0, 1, 0, 4, 0, 1, 0, 1, 0, 2, 0, 1, 1
OFFSET
1,12
COMMENTS
If n in A056867 then a(n) = 0.
LINKS
EXAMPLE
12 is divisible by two primes, 2 and 3. The exponent of 2 is 2 and the exponent of 3 is 1. 2^2 = 1 mod 3 and 3^1 = 1 mod 2, so a(12) = 2.
MAPLE
a:= proc(n) local l; l:= ifactors(n)[2];
add(add(`if`(irem(i[1]^i[2], j[1])=1, 1, 0), i=l), j=l)
end:
seq (a(n), n=1..100); # Alois P. Heinz, Aug 28 2012
MATHEMATICA
a[n_] := With[{f = FactorInteger[n]}, Sum[ Boole[ Mod[p[[1]]^p[[2]], q[[1]]] == 1], {p, f}, {q, f}]]; Table[a[n], {n, 1, 93}] (* Jean-François Alcover, Sep 03 2012 *)
PROG
(PARI) a(n)=my(f=factor(n), k=#f~); sum(i=1, k, sum(j=1, k, i!=j && Mod(f[i, 1], f[j, 1])^f[i, 2]==1))
CROSSREFS
Sequence in context: A161520 A070097 A202523 * A270573 A096271 A285640
KEYWORD
nonn
AUTHOR
STATUS
approved