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.

A228849 Number of distinct 12th powers modulo n.

Original entry on oeis.org

1, 2, 2, 2, 2, 4, 2, 2, 2, 4, 6, 4, 2, 4, 4, 2, 5, 4, 4, 4, 4, 12, 12, 4, 6, 4, 4, 4, 8, 8, 6, 3, 12, 10, 4, 4, 4, 8, 4, 4, 11, 8, 8, 12, 4, 24, 24, 4, 8, 12, 10, 4, 14, 8, 12, 4, 8, 16, 30, 8, 6, 12, 4, 5, 4, 24, 12, 10, 24, 8, 36, 4, 7, 8, 12, 8, 12, 8, 14, 4, 10
Offset: 1

Views

Author

Arkadiusz Wesolowski, Sep 05 2013

Keywords

Crossrefs

Cf. A000224 (squares), A046530 (cubic residues), A052273 (4th powers), A052274 (5th powers), A052275 (6th powers), A085310 (7th powers), A085311 (8th powers), A085312 (9th powers), A085313 (10th powers), A085314 (11th powers).

Programs

  • Magma
    [#Set([k^12 mod n : k in [1..n]]) : n in [1..81]];
    
  • Maple
    A228849 := proc(n)
        {seq(i^12 mod n, i=0..n-1)} ;
        nops(%) ;
    end proc: # R. J. Mathar, Sep 21 2017
  • Mathematica
    a[n_] := Table[PowerMod[i, 12, n], {i, 0, n - 1}] // Union // Length;
    Array[a, 100] (* Jean-François Alcover, Mar 24 2020 *)
  • PARI
    a(n)=my(f=factor(n)); prod(i=1, #f[, 1], my(k=f[i, 1]^f[i, 2]); #vecsort(vector(k, i, i^12%k), , 8)) \\ Charles R Greathouse IV, Sep 05 2013