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.

A289460 Number of units u in Z/nZ such that Phi(3,u) is a unit, where Phi is the cyclotomic polynomial.

Original entry on oeis.org

1, 1, 1, 2, 4, 1, 4, 4, 3, 4, 10, 2, 10, 4, 4, 8, 16, 3, 16, 8, 4, 10, 22, 4, 20, 10, 9, 8, 28, 4, 28, 16, 10, 16, 16, 6, 34, 16, 10, 16, 40, 4, 40, 20, 12, 22, 46, 8, 28, 20, 16, 20, 52, 9, 40, 16, 16, 28, 58, 8, 58, 28, 12, 32, 40, 10, 64, 32, 22, 16, 70, 12
Offset: 1

Views

Author

Keywords

Comments

The number of units u in Z/nZ such that Phi(1,u) or Phi(2,u) is a unit is given by A058026.

Crossrefs

Cf. A058026.

Programs

  • Maple
    m:=3; T:=[]: for n from 2 to 1000 do S:={}: for a from 0 to n-1 do if gcd(a,n)=1 and gcd(cyclotomic(m,a),n)=1 then S:={op(S),a}: fi: od: T:=[op(T),nops(S)]: od: print(m,T):
  • Mathematica
    Table[Count[Map[Cyclotomic[3, #] &, Select[Range@ n, CoprimeQ[#, n] &]], u_ /; CoprimeQ[u, n]], {n, 72}] (* Michael De Vlieger, Jul 11 2017 *)
  • PARI
    g(n)=sum(k=0,n-1, gcd(k,n)==1 && gcd(polcyclo(3,k),n)==1)
    a(n)=my(f=factor(n)); prod(i=1,#f~, g(f[i,1]^f[i,2])) \\ Charles R Greathouse IV, Jul 06 2017