cp's OEIS Frontend

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.

Showing 1-1 of 1 results.

A115070 a(n) = phi(n)/3^b(n), where b(n) is #{primes p=1 mod 3 dividing n}.

Original entry on oeis.org

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, 10, 16, 20, 16, 8, 12, 12, 6, 8, 16, 40, 4, 14, 20, 24, 22, 46, 16, 14, 20, 32, 8, 52, 18, 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
Offset: 1

Views

Author

Steven Finch, Mar 01 2006

Keywords

Comments

Cubic analog of A070306. Always an integer.

Crossrefs

Programs

  • 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]; b[1] = 0;
    a[n_] := EulerPhi[n]/3^b[n];
    Table[a[n], {n, 1, 81}] (* Jean-François Alcover, Feb 17 2019 *)
    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 *)
  • 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
    
  • 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

Formula

From Amiram Eldar, Nov 30 2024: (Start)
a(n) = A000010(n)/3^A005088(n) = A000010(n)/A115069(n).
Multiplicative with a(p^e) = (p-1)*p^(e-1)/3 if p == 1 (mod 3), and (p-1)*p^(e-1) otherwise. (End)

Extensions

a(1)=1 prepended by Alois P. Heinz, Feb 17 2019
Keyword mult added by Amiram Eldar, Nov 30 2024
Showing 1-1 of 1 results.