This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A087692 #34 Aug 10 2023 02:22:09 %S A087692 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, %T A087692 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, %U A087692 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 %N A087692 Number of cubes in multiplicative group modulo n. %C A087692 Cubic analog of A046073. - _Steven Finch_, Mar 01 2006 %H A087692 Robert Israel, <a href="/A087692/b087692.txt">Table of n, a(n) for n = 1..10000</a> %H A087692 Steven R. Finch and Pascal Sebah, <a href="http://arXiv.org/abs/math.NT/0604465">Squares and Cubes Modulo n</a>, arXiv:math/0604465 [math.NT], 2006-2016. %F A087692 a(n) = phi(n) / A060839(n). %F A087692 Multiplicative with a(3) = 2, a(3^k) = 2*3^(k-2) otherwise; %F A087692 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 %F A087692 Sum_{k=1..n} a(k) ~ c * n^2/log(n)^(1/3), where c = (17/(36*Gamma(2/3))) * Product_{p = 3 or p prime == 2 (mod 3)} (1+1/*p)*(1-1/p)^(2/3) * Product_{p prime == 1 (mod 3)} (1+1/(3*p))*(1-1/p)^(2/3) = 0.33051128776333262024... (Finch and Sebah, 2006). - _Amiram Eldar_, Oct 18 2022 %p A087692 b:= proc(p,i) %p A087692 if p = 3 then if i=1 then 2 else 2*3^(i-2) fi %p A087692 elif p mod 6 = 1 then (p-1)*p^(i-1)/3 %p A087692 else (p-1)*p^(i-1) %p A087692 fi %p A087692 end proc: %p A087692 seq(mul(b(f[1],f[2]), f = ifactors(n)[2]), n = 1 .. 1000); # _Robert Israel_, Jan 04 2015 %t A087692 Map[Length,Table[Select[Range[n],CoprimeQ[#, n] && IntegerQ[PowerMod[#, 1/3, n]] &], {n, 1, 82}]] (* _Geoffrey Critzer_, Jan 07 2015 *) %t A087692 f[p_, e_] := (p - 1)*p^(e - 1)/If[Mod[p, 6] == 1, 3, 1]; f[3, e_] := 2*3^(e-2); f[3, 1] = 2; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Aug 10 2023 *) %o A087692 (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 %Y A087692 Cf. A000010, A060839, A046073 (squares), A250207 (4th powers). %K A087692 mult,nonn %O A087692 1,3 %A A087692 Yuval Dekel (dekelyuval(AT)hotmail.com), Sep 27 2003 %E A087692 More terms from _Steven Finch_, Mar 01 2006