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 A115070 #24 Nov 30 2024 06:26:58 %S A115070 1,1,2,2,4,2,2,4,6,4,10,4,4,2,8,8,16,6,6,8,4,10,22,8,20,4,18,4,28,8, %T A115070 10,16,20,16,8,12,12,6,8,16,40,4,14,20,24,22,46,16,14,20,32,8,52,18, %U A115070 40,8,12,28,58,16,20,10,12,32,16,20,22,32,44,8,70,24,24,12,40,12,20,8,26,32,54 %N A115070 a(n) = phi(n)/3^b(n), where b(n) is #{primes p=1 mod 3 dividing n}. %C A115070 Cubic analog of A070306. Always an integer. %H A115070 Alois P. Heinz, <a href="/A115070/b115070.txt">Table of n, a(n) for n = 1..10000</a> %H A115070 Steven R. Finch and Pascal Sebah, <a href="https://arxiv.org/abs/math/0604465">Squares and Cubes Modulo n</a>, arXiv:math/0604465 [math.NT], 2006-2016. %F A115070 From _Amiram Eldar_, Nov 30 2024: (Start) %F A115070 a(n) = A000010(n)/3^A005088(n) = A000010(n)/A115069(n). %F A115070 Multiplicative with a(p^e) = (p-1)*p^(e-1)/3 if p == 1 (mod 3), and (p-1)*p^(e-1) otherwise. (End) %p A115070 with(numtheory): %p A115070 a:= n-> phi(n)/3^add(`if`(irem(p, 3)=1, 1, 0), p=factorset(n)): %p A115070 seq(a(n), n=1..100); # _Alois P. Heinz_, Feb 17 2019 %t A115070 b[n_] := Count[FactorInteger[n][[All, 1]], p_ /; Mod[p, 3] == 1]; b[1] = 0; %t A115070 a[n_] := EulerPhi[n]/3^b[n]; %t A115070 Table[a[n], {n, 1, 81}] (* _Jean-François Alcover_, Feb 17 2019 *) %t A115070 f[p_, e_] := (p - 1)*p^(e - 1)/If[Mod[p, 3] == 1, 3, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Nov 30 2024 *) %o A115070 (PARI) {b(n)=my(f=factor(n)[, 1]); sum(i=1, #f, f[i]%3==1)}; %o A115070 {a(n)= eulerphi(n)/3^b(n)}; %o A115070 vector(80, n, a(n)) \\ _G. C. Greubel_, Feb 17 2019 %o A115070 (PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, (f[i,1]-1)*f[i,1]^(f[i,2]-1)/if(f[i,1] % 3 == 1, 3,1));} \\ _Amiram Eldar_, Nov 30 2024 %Y A115070 Cf. A000010, A005088, A070306, A060839, A115069. %K A115070 nonn,mult %O A115070 1,3 %A A115070 _Steven Finch_, Mar 01 2006 %E A115070 a(1)=1 prepended by _Alois P. Heinz_, Feb 17 2019 %E A115070 Keyword mult added by _Amiram Eldar_, Nov 30 2024