OFFSET
1,3
COMMENTS
Cubic analog of A070306. Always an integer.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
S. R. Finch and Pascal Sebah, Squares and Cubes Modulo n arXiv:math/0604465 [math.NT], 2006-2016 (v3).
MAPLE
with(numtheory):
a:= n-> phi(n)/3^add(`if`(irem(p, 3)=1, 1, 0), p=factorset(n)):
seq(a(n), n=1..100); # Alois P. Heinz, Feb 17 2019
MATHEMATICA
b[n_] := Count[FactorInteger[n][[All, 1]], p_ /; Mod[p, 3] == 1];
a[n_] := EulerPhi[n]/3^b[n];
Table[a[n], {n, 1, 81}] (* Jean-François Alcover, Feb 17 2019 *)
PROG
(PARI) {b(n)=my(f=factor(n)[, 1]); sum(i=1, #f, f[i]%3==1)};
{a(n)= eulerphi(n)/3^b(n)};
vector(80, n, a(n)) \\ G. C. Greubel, Feb 17 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Steven Finch, Mar 01 2006
EXTENSIONS
a(1)=1 prepended by Alois P. Heinz, Feb 17 2019
STATUS
approved