login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A046530 Number of distinct cubic residues mod n. 18
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 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

COMMENTS

Cubic analog of A000224. - S. R. Finch (Steven.Finch(AT)inria.fr), Mar 01 2006

LINKS

T. D. Noe, Table of n, a(n) for n=1..1000

S. R. Finch and Pascal Sebah, Squares and Cubes Modulo n (arXiv:math.NT/0604465).

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}] (* From Jean-François Alcover, Aug 30 2011 *)

CROSSREFS

Sequence in context: A053447 A023160 A085312 * A003558 A141419 A072451

Adjacent sequences:  A046527 A046528 A046529 * A046531 A046532 A046533

KEYWORD

nonn,mult,easy,nice

AUTHOR

David W. Wilson (davidwwilson(AT)comcast.net)

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 07:57 EST 2012. Contains 205603 sequences.