login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A087692 Number of cubes in multiplicative group modulo n. 8
1, 1, 2, 2, 4, 2, 2, 4, 2, 4, 10, 4, 4, 2, 8, 8, 16, 2, 6, 8, 4, 10, 22, 8, 20, 4, 6, 4, 28, 8, 10, 16, 20, 16, 8, 4, 12, 6, 8, 16, 40, 4, 14, 20, 8, 22, 46, 16, 14, 20, 32, 8, 52, 6, 40, 8, 12, 28, 58, 16, 20, 10, 4, 32, 16, 20, 22, 32, 44, 8, 70, 8, 24, 12, 40, 12, 20, 8, 26, 32, 18, 40 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

Cubic analog of A046073. - Steven Finch, Mar 01 2006

Multiplicative with a(3) = 2, a(3^k) = 2*3^(k-2) otherwise;

a(p^k) = (p-1)*p^(k-1)/3 if prime p == 1 mod 6; a(p^k) = (p-1)*p^(k-1) for all other primes p. - Robert Israel, Jan 04 2015

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

S. R. Finch and Pascal Sebah, Squares and Cubes Modulo n (arXiv:math.NT/0604465).

FORMULA

a(n) = phi(n) / A060839(n).

MAPLE

b:= proc(p, i)

  if p = 3 then if i=1 then 2 else 2*3^(i-2) fi

  elif p mod 6 = 1 then (p-1)*p^(i-1)/3

  else (p-1)*p^(i-1)

  fi

end proc:

seq(mul(b(f[1], f[2]), f = ifactors(n)[2]), n = 1 .. 1000); # Robert Israel, Jan 04 2015

MATHEMATICA

Map[Length, Table[Select[Range[n], CoprimeQ[#, n] && IntegerQ[PowerMod[#, 1/3, n]] &], {n, 1, 82}]] (* Geoffrey Critzer, Jan 07 2015 *)

PROG

(PARI) a(n) = my(f = factor(n)); prod(j=1, #f~, p=f[j, 1]; k=f[j, 2]; if (p == 3, if (k==1, 2, 2*3^(k-2)), if ((p % 6) == 1, ((p-1)*p^(k-1))/3, (p-1)*p^(k-1)))); \\ Michel Marcus, Jan 05 2015

CROSSREFS

Cf. A060839, A046073 (squares), A250207 (4th powers).

Sequence in context: A069177 A077659 A212595 * A093621 A242734 A309709

Adjacent sequences:  A087689 A087690 A087691 * A087693 A087694 A087695

KEYWORD

mult,nonn

AUTHOR

Yuval Dekel (dekelyuval(AT)hotmail.com), Sep 27 2003

EXTENSIONS

More terms from Steven Finch, Mar 01 2006

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 19 16:06 EST 2019. Contains 329320 sequences. (Running on oeis4.)