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-10 of 11 results. Next

A000224 Number of squares mod n.

Original entry on oeis.org

1, 2, 2, 2, 3, 4, 4, 3, 4, 6, 6, 4, 7, 8, 6, 4, 9, 8, 10, 6, 8, 12, 12, 6, 11, 14, 11, 8, 15, 12, 16, 7, 12, 18, 12, 8, 19, 20, 14, 9, 21, 16, 22, 12, 12, 24, 24, 8, 22, 22, 18, 14, 27, 22, 18, 12, 20, 30, 30, 12, 31, 32, 16, 12, 21, 24, 34, 18, 24, 24, 36, 12
Offset: 1

Views

Author

Keywords

Comments

For any n > 2, there are quadratic nonresidues mod n, so a(n) < n. - Charles R Greathouse IV, Oct 28 2022
Conjecture: n^2 == 1 (mod a(n)*(a(n)-1)) if and only if n is an odd prime. - Thomas Ordowski, Apr 13 2025
This conjecture holds at least up to n = 10^8. - Michel Marcus, Apr 13 2025

Examples

			The sequence of squares (A000290) modulo 10 reads 0, 1, 4, 9, 6, 5, 6, 9, 4, 1, 0, 1, 4, 9, 6, 5, 6, 9, 4, 1,... and this reduced sequence contains a(10) = 6 different values, {0,1,4,5,6,9}. - _R. J. Mathar_, Oct 10 2014
		

Crossrefs

Cf. A095972, 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), A228849 (12th powers).

Programs

  • Haskell
    a000224 n = product $ zipWith f (a027748_row n) (a124010_row n) where
       f 2 e = 2 ^ e `div` 6 + 2
       f p e = p ^ (e + 1) `div` (2 * p + 2) + 1
    -- Reinhard Zumkeller, Aug 01 2012
    
  • Maple
    A000224 := proc(m)
        {seq( modp(b^2,m),b=0..m-1) };
        nops(%) ;
    end proc: # Emeric Deutsch
    # 2nd implementation
    A000224 := proc(n)
        local a,ifs,f,p,e,c ;
        a := 1 ;
        ifs := ifactors(n)[2] ;
        for f in ifs do
            p := op(1,f) ;
            e := op(2,f) ;
            if p = 2 then
                if type(e,'odd') then
                    a := a*(2^(e-1)+5)/3 ;
                else
                    a := a*(2^(e-1)+4)/3 ;
                end if;
            else
                if type(e,'odd') then
                    c := 2*p+1 ;
                else
                    c := p+2 ;
                end if;
                a := a*(p^(e+1)+c)/2/(p+1) ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Oct 10 2014
  • Mathematica
    Length[Union[#]]& /@ Table[Mod[k^2, n], {n, 65}, {k, n}] (* Jean-François Alcover, Aug 30 2011 *)
    a[2] = 2; a[n_] := a[n] = Switch[fi = FactorInteger[n], {{, 1}}, (fi[[1, 1]] + 1)/2, {{2, }}, 3/2 + 2^fi[[1, 2]]/6 + (-1)^(fi[[1, 2]]+1)/6, {{, }}, {p, k} = fi[[1]]; 3/4 + (p-1)*(-1)^(k+1)/(4*(p+1)) + p^(k+1)/(2*(p+1)), , Times @@ Table[ a[Power @@ f], {f, fi}]]; Table[a[n], {n, 1, 100}] (* _Jean-François Alcover, Mar 09 2015 *)
  • PARI
    a(n) = local(v,i); v = vector(n,i,0); for(i=0, floor(n/2),v[i^2%n+1] = 1); sum(i=1,n,v[i]) \\ Franklin T. Adams-Watters, Nov 05 2006
    
  • PARI
    a(n)=my(f=factor(n));prod(i=1,#f[,1],if(f[i,1]==2,2^f[1,2]\6+2,f[i,1]^(f[i,2]+1)\(2*f[i,1]+2)+1)) \\ Charles R Greathouse IV, Jul 15 2011
    
  • Python
    from math import prod
    from sympy import factorint
    def A000224(n): return prod((p**(e+1)//((p+1)*(q:=1+(p==2)))>>1)+q for p, e in factorint(n).items()) # Chai Wah Wu, Oct 07 2024

Formula

a(n) = A105612(n) + 1.
Multiplicative with a(p^e) = floor(p^e/6) + 2 if p = 2; floor(p^(e+1)/(2p + 2)) + 1 if p > 2. - David W. Wilson, Aug 01 2001
a(2^n) = A023105(n). a(3^n) = A039300(n). a(5^n) = A039302(n). a(7^n) = A039304(n). - R. J. Mathar, Sep 28 2017
Sum_{k=1..n} a(k) ~ c * n^2/sqrt(log(n)), where c = (17/(32*sqrt(Pi))) * Product_{p prime} (1 - (p^2+2)/(2*(p^2+1)*(p+1))) * (1-1/p)^(-1/2) = 0.37672933209687137604... (Finch and Sebah, 2006). - Amiram Eldar, Oct 18 2022
If p is an odd prime, then a(p) = (p + 1)/2. - Thomas Ordowski, Apr 09 2025

A046530 Number of distinct cubic residues mod n.

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 3, 5, 3, 10, 11, 9, 5, 6, 15, 10, 17, 6, 7, 15, 9, 22, 23, 15, 21, 10, 7, 9, 29, 30, 11, 19, 33, 34, 15, 9, 13, 14, 15, 25, 41, 18, 15, 33, 15, 46, 47, 30, 15, 42, 51, 15, 53, 14, 55, 15, 21, 58, 59, 45, 21, 22, 9, 37, 25, 66, 23, 51, 69, 30, 71, 15, 25, 26, 63
Offset: 1

Views

Author

Keywords

Comments

In other words, number of distinct cubes mod n. - N. J. A. Sloane, Oct 05 2024
Cubic analog of A000224. - Steven Finch, Mar 01 2006
A074243 contains values of n such that a(n) = n. - Dmitri Kamenetsky, Nov 03 2012

Crossrefs

For number of k-th power residues mod n, see A000224 (k=2), A052273 (k=4), A052274 (k=5), A052275 (k=6), A085310 (k=7), A085311 (k=8), A085312 (k=9), A085313 (k=10), A085314 (k=12), A228849 (k=13).

Programs

  • Haskell
    import Data.List (nub)
    a046530 n = length $ nub $ map (`mod` n) $
                               take (fromInteger n) $ tail a000578_list
    -- Reinhard Zumkeller, Aug 01 2012
    
  • Maple
    A046530 := proc(n)
            local a,pf ;
            a := 1 ;
            if n = 1 then
                    return 1;
            end if;
            for i in  ifactors(n)[2] do
                    p := op(1,i) ;
                    e := op(2,i) ;
                    if p = 3 then
                            if e mod 3 = 0 then
                                    a := a*(3^(e+1)+10)/13 ;
                            elif e mod 3 = 1 then
                                    a := a*(3^(e+1)+30)/13 ;
                            else
                                    a := a*(3^(e+1)+12)/13 ;
                            end if;
                    elif p mod 3 = 2 then
                            if e mod 3 = 0 then
                                    a := a*(p^(e+2)+p+1)/(p^2+p+1) ;
                            elif e mod 3 = 1 then
                                    a := a*(p^(e+2)+p^2+p)/(p^2+p+1) ;
                            else
                                    a := a*(p^(e+2)+p^2+1)/(p^2+p+1) ;
                            end if;
                    else
                            if e mod 3 = 0 then
                                    a := a*(p^(e+2)+2*p^2+3*p+3)/3/(p^2+p+1) ;
                            elif e mod 3 = 1 then
                                    a := a*(p^(e+2)+3*p^2+3*p+2)/3/(p^2+p+1) ;
                            else
                                    a := a*(p^(e+2)+3*p^2+2*p+3)/3/(p^2+p+1) ;
                            end if;
                    end if;
            end do:
            a ;
    end proc:
    seq(A046530(n),n=1..40) ; # R. J. Mathar, Nov 01 2011
  • Mathematica
    Length[Union[#]]& /@ Table[Mod[k^3, n], {n, 75}, {k, n}] (* Jean-François Alcover, Aug 30 2011 *)
    Length[Union[#]]&/@Table[PowerMod[k,3,n],{n,80},{k,n}] (* Harvey P. Dale, Aug 12 2015 *)
  • PARI
    g(p,e)=if(p==3,(3^(e+1)+if(e%3==1,30,if(e%3,12,10)))/13, if(p%3==2, (p^(e+2)+if(e%3==1,p^2+p,if(e%3,p^2+1,p+1)))/(p^2+p+1),(p^(e+2)+if(e%3==1,3*p^2+3*p+2, if(e%3,3*p^2+2*p+3,2*p^2+3*p+3)))/3/(p^2+p+1)))
    a(n)=my(f=factor(n));prod(i=1,#f[,1],g(f[i,1],f[i,2])) \\ Charles R Greathouse IV, Jan 03 2013
    
  • PARI
    a(n)={my(f=factor(n)); prod(i=1, #f~, my(p=f[i,1], e=f[i,2]); 1 + sum(i=0, (e-1)\3, if(p%3==1 || (p==3&&3*iAndrew Howroyd, Jul 17 2018

Formula

a(n) = n - A257301(n). - Stanislav Sykora, Apr 21 2015
a(2^n) = A046630(n). a(3^n) = A046631(n). a(5^n) = A046633(n). a(7^n) = A046635(n). - R. J. Mathar, Sep 28 2017
Multiplicative with a(p^e) = 1 + Sum_{i=0..floor((e-1)/3)} (p - 1)*p^(e-3*i-1)/k where k = 3 if (p = 3 and 3*i + 1 = e) or (p mod 3 = 1) otherwise k = 1. - Andrew Howroyd, Jul 17 2018
Sum_{k=1..n} a(k) ~ c * n^2/log(n)^(1/3), where c = (6/(13*Gamma(2/3))) * (2/3)^(-1/3) * Product_{p prime == 2 (mod 3)} (1 - (p^2+1)/((p^2+p+1)*(p^2-p+1)*(p+1))) * (1-1/p)^(-1/3) * Product_{p prime == 1 (mod 3)} (1 - (2*p^4+3*p^2+3)/(3*(p^2+p+1)*(p^2-p+1)*(p+1))) * (1-1/p)^(-1/3) = 0.48487418844474389597... (Finch and Sebah, 2006). - Amiram Eldar, Oct 18 2022

A052273 Number of distinct 4th powers mod n.

Original entry on oeis.org

1, 2, 2, 2, 2, 4, 4, 2, 4, 4, 6, 4, 4, 8, 4, 2, 5, 8, 10, 4, 8, 12, 12, 4, 6, 8, 10, 8, 8, 8, 16, 4, 12, 10, 8, 8, 10, 20, 8, 4, 11, 16, 22, 12, 8, 24, 24, 4, 22, 12, 10, 8, 14, 20, 12, 8, 20, 16, 30, 8, 16, 32, 16, 6, 8, 24, 34, 10, 24, 16, 36, 8, 19, 20, 12, 20
Offset: 1

Views

Author

N. J. A. Sloane, Feb 05 2000

Keywords

Comments

This sequence is multiplicative [Li]. - Leon P Smith, Apr 16 2005

Crossrefs

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

Programs

  • Maple
    A052273 := proc(n,k) local i; nops({seq(i^k mod n,i=0..n-1)}); end; # number of k-th powers mod n
  • Mathematica
    a[n_] := Table[PowerMod[i, 4, 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^4%k),,8)) \\ Charles R Greathouse IV, May 26 2013
    
  • PARI
    \\ general formula for k-th powers, see Seraj link
    h(p,e,k=4)=my(a=(p-1)/gcd(k,p-1),b=if(k%2+p%2,0,valuation(k,p)+1)+p%2*valuation(k,p),g=(e-1)%k+1,G=p^g,B=p^(b+1),K=p^k,E=p^e); a*(K/B*(E-G)/(K-1)+ceil(G/B))+1
    a(n,f=factor(n),k=4)=prod(i=1,#f~, h(f[i,1],f[i,2],k)) \\ Charles R Greathouse IV, Nov 09 2022
    
  • Python
    from math import prod
    from sympy import factorint
    def A052273(n): return prod(1+(p**e//15+bool(e&3) if p==2 else (p-1)*p**(e+3)//((4 if p&3==1 else 2)*(p**4-1))) for p, e in factorint(n).items()) # Chai Wah Wu, Apr 09 2025

Formula

Conjecture: a(2^e) = 1 + floor(2^e/(2^4-1)) if e == 0 (mod 4). a(2^e) = 2 + floor(2^e/(2^4-1)) if e == {1,2,3} mod 4. - R. J. Mathar, Oct 22 2017
Conjecture: a(p^e) = 1 + floor((p-1)*p^(e+3)/(gcd(p-1,4)*(p^4-1))) for odd primes p. - R. J. Mathar, Oct 22 2017
From Samer Seraj, Nov 09 2022: (Start)
The above conjectures are correct, and a unified form is:
a(p^m) = alpha*((p^3 / p^beta)*((p^m - p^gamma)/(p^4 -1)) + ceiling((p^gamma)/(p^(beta+1)))) + 1, where p is any prime, m is any positive integer, alpha = (p-1)/gcd(4,p-1), beta = 3 if p = 2 or beta = 0 if p is odd, and gamma = 4 if 4|m or gamma = (m mod 4) otherwise. (End)

A052274 Number of distinct 5th powers mod n.

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 7, 5, 7, 10, 3, 9, 13, 14, 15, 9, 17, 14, 19, 15, 21, 6, 23, 15, 5, 26, 19, 21, 29, 30, 7, 17, 9, 34, 35, 21, 37, 38, 39, 25, 9, 42, 43, 9, 35, 46, 47, 27, 43, 10, 51, 39, 53, 38, 15, 35, 57, 58, 59, 45, 13, 14, 49, 34, 65, 18, 67, 51, 69, 70
Offset: 1

Views

Author

N. J. A. Sloane, Feb 05 2000

Keywords

Comments

This sequence is multiplicative. - Leon P Smith, Apr 16 2005

Crossrefs

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

Programs

  • Maple
    A052274 := proc(m)
        {seq( modp(b^5,m),b=0..m-1) };
        nops(%) ;
    end proc:
    seq(A052274(m),m=1..100) ; # R. J. Mathar, Sep 22 2017
  • Mathematica
    With[{nn=100},Table[Length[Union[PowerMod[Range[nn],5,n]]],{n,nn}]] (* Harvey P. Dale, Mar 19 2016 *)
  • 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^5%k), , 8)) \\ Charles R Greathouse IV, Sep 05 2013

Formula

Conjecture: a(5^e) = 1+floor[(5-1)*5^(e+3)/(5^5-1)] if e == {0,2,3,4} (mod 5). a(5^e) = 5+floor[(5-1)*5^(e+3)/(5^5-1)] if e==1 (mod 5). - R. J. Mathar, Oct 22 2017
Conjecture: a(p^e) = 1+floor[(p-1)*p^(e+4)/{gcd(p-1,5)*(p^5-1)}] for primes p<>5 - R. J. Mathar, Oct 22 2017

A052275 Number of distinct 6th powers mod n.

Original entry on oeis.org

1, 2, 2, 2, 3, 4, 2, 2, 2, 6, 6, 4, 3, 4, 6, 3, 9, 4, 4, 6, 4, 12, 12, 4, 11, 6, 4, 4, 15, 12, 6, 5, 12, 18, 6, 4, 7, 8, 6, 6, 21, 8, 8, 12, 6, 24, 24, 6, 8, 22, 18, 6, 27, 8, 18, 4, 8, 30, 30, 12, 11, 12, 4, 9, 9, 24, 12, 18, 24, 12, 36, 4, 13, 14, 22, 8, 12, 12
Offset: 1

Views

Author

N. J. A. Sloane, Feb 05 2000

Keywords

Comments

This sequence is multiplicative [Li]. - Leon P Smith, Apr 16 2005
Same as the number of distinct elements that are both squares and cubes mod n. - Steven Finch, Mar 01 2006

Crossrefs

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

Programs

  • Maple
    A052275 := proc(m)
        {seq( modp(b^6,m),b=0..m-1) };
        nops(%) ;
    end proc:
    seq(A052275(m),m=1..100) ; # R. J. Mathar, Sep 22 2017
  • Mathematica
    Length[Union[#]]&/@Table[PowerMod[k,6,n],{n,100},{k,n}] (* Zak Seidov, Feb 17 2013 *)
  • 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^6%k), , 8)) \\ Charles R Greathouse IV, Sep 05 2013

Formula

Conjecture: a(2^n) = 1,2,2,2,3,5,9,18,... with g.f. ( 1-2*x^2-2*x^3-x^4-x^5-2*x^6 ) / ( (x-1)*(2*x-1)*(1+x)*(1+x+x^2)*(x^2-x+1) ). - R. J. Mathar, Sep 28 2017
Conjecture: a(3^n) = 1,2,2,4,10,28,82,.... with g.f. ( 1-x-4*x^2-2*x^3-2*x^4-2*x^5-3*x^6 ) / ( (x-1)*(3*x-1)*(1+x)*(x^2-x+1)*(1+x+x^2) ). - R. J. Mathar, Sep 28 2017

A085310 Number of distinct 7th powers modulo n.

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 7, 5, 7, 10, 11, 9, 13, 14, 15, 9, 17, 14, 19, 15, 21, 22, 23, 15, 21, 26, 19, 21, 5, 30, 31, 17, 33, 34, 35, 21, 37, 38, 39, 25, 41, 42, 7, 33, 35, 46, 47, 27, 7, 42, 51, 39, 53, 38, 55, 35, 57, 10, 59, 45, 61, 62, 49, 33, 65, 66, 67, 51, 69, 70, 11, 35, 73, 74
Offset: 1

Views

Author

Labos Elemer, Jun 27 2003

Keywords

Comments

Compare with enigmatic similarity of analogous odd-th power counts to A055653.
This sequence is multiplicative [Li]. - Leon P Smith, Apr 16 2005

Crossrefs

Cf. A000224[k=2], A046530[k=3], A052273[k=4], A052274[k=5], A052275[k=6], A085311[k=8], A085312[k=9], A085313[k=10], A085314[k=11], A228849[k=12], A055653.

Programs

  • Maple
    A085310 := proc(m)
        {seq( modp(b^7,m),b=0..m-1) };
        nops(%) ;
    end proc:
    seq(A085310(m),m=1..100) ; # R. J. Mathar, Sep 22 2017
  • Mathematica
    a[n_] := Table[PowerMod[i, 7, 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^7%k), , 8)) \\ Charles R Greathouse IV, Sep 05 2013

A085311 Number of distinct 8th powers modulo n.

Original entry on oeis.org

1, 2, 2, 2, 2, 4, 4, 2, 4, 4, 6, 4, 4, 8, 4, 2, 3, 8, 10, 4, 8, 12, 12, 4, 6, 8, 10, 8, 8, 8, 16, 2, 12, 6, 8, 8, 10, 20, 8, 4, 6, 16, 22, 12, 8, 24, 24, 4, 22, 12, 6, 8, 14, 20, 12, 8, 20, 16, 30, 8, 16, 32, 16, 3, 8, 24, 34, 6, 24, 16, 36, 8, 10, 20, 12, 20, 24, 16, 40, 4, 28, 12, 42, 16, 6
Offset: 1

Views

Author

Labos Elemer, Jun 27 2003

Keywords

Comments

This sequence is multiplicative. - Leon P Smith, Apr 16 2005

Crossrefs

Cf. A000224[k=2], A046530[k=3], A052273[k=4], A052274[k=5], A052275[k=6], A085310[k=7], A085312[k=9], A085313[k=10], A085314[k=11], A228849[k=12], A055653.

Programs

  • Maple
    A085311 := proc(m)
        {seq( modp(b^8,m),b=0..m-1) };
        nops(%) ;
    end proc:
    seq(A085311(m),m=1..100) ; # R. J. Mathar, Sep 22 2017
  • Mathematica
    a[n_] := Table[PowerMod[i, 8, 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^8%k), , 8)) \\ Charles R Greathouse IV, Sep 05 2013

A085312 Number of distinct 9th powers modulo n.

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 3, 5, 3, 10, 11, 9, 5, 6, 15, 9, 17, 6, 3, 15, 9, 22, 23, 15, 21, 10, 3, 9, 29, 30, 11, 17, 33, 34, 15, 9, 5, 6, 15, 25, 41, 18, 15, 33, 15, 46, 47, 27, 15, 42, 51, 15, 53, 6, 55, 15, 9, 58, 59, 45, 21, 22, 9, 33, 25, 66, 23, 51, 69, 30, 71, 15, 9, 10, 63, 9, 33, 30, 27
Offset: 1

Views

Author

Labos Elemer, Jun 27 2003

Keywords

Comments

Compare with enigmatic similarity of analogous odd-th power counts to A055653.
This sequence is multiplicative [Li]. - Leon P Smith, Apr 16 2005

Crossrefs

Cf. A000224[k=2], A046530[k=3], A052273[k=4], A052274[k=5], A052275[k=6], A085310[k=7], A085311[k=8], A085313[k=10], A085314[k=11], A228849[k=12], A055653.

Programs

  • Maple
    A085312 := proc(m)
        {seq( modp(b^9,m),b=0..m-1) };
        nops(%) ;
    end proc:
    seq(A085312(m),m=1..100) ; # R. J. Mathar, Sep 22 2017
  • Mathematica
    a[n_] := Table[PowerMod[i, 9, n], {i, 0, n - 1}] // Union // Length;
    Array[a, 100] (* Jean-François Alcover, Mar 25 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^9%k), , 8)) \\ Charles R Greathouse IV, Sep 05 2013

A085314 Number of distinct 11th powers modulo n.

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 7, 5, 7, 10, 11, 9, 13, 14, 15, 9, 17, 14, 19, 15, 21, 22, 3, 15, 21, 26, 19, 21, 29, 30, 31, 17, 33, 34, 35, 21, 37, 38, 39, 25, 41, 42, 43, 33, 35, 6, 47, 27, 43, 42, 51, 39, 53, 38, 55, 35, 57, 58, 59, 45, 61, 62, 49, 33, 65, 66, 7, 51, 9, 70, 71, 35, 73, 74, 63
Offset: 1

Views

Author

Labos Elemer, Jun 27 2003

Keywords

Comments

Compare with enigmatic similarity of this and analogous odd-th power counts to A055653.
This sequence is multiplicative [Li]. - Leon P Smith, Apr 16 2005

Crossrefs

Cf. A000224[k=2], A046530[k=3], A052273[k=4], A052274[k=5], A052275[k=6], A085310[k=7], A085311[k=8], A085312[k=9], A085313[k=10], A228849[k=12], A055653.

Programs

  • Maple
    A085314 := proc(m)
        {seq( modp(b^11,m),b=0..m-1) };
        nops(%) ;
    end proc:
    seq(A085314(m),m=1..100) ; # R. J. Mathar, Sep 22 2017
  • Mathematica
    a[n_] := Table[PowerMod[i, 11, n], {i, 0, n - 1}] // Union // Length;
    Array[a, 100] (* Jean-François Alcover, Mar 25 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^11%k), , 8)) \\ Charles R Greathouse IV, Sep 05 2013

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
Showing 1-10 of 11 results. Next