The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A247257 The number of octic characters modulo n. 7
 1, 1, 2, 2, 4, 2, 2, 4, 2, 4, 2, 4, 4, 2, 8, 8, 8, 2, 2, 8, 4, 2, 2, 8, 4, 4, 2, 4, 4, 8, 2, 16, 4, 8, 8, 4, 4, 2, 8, 16, 8, 4, 2, 4, 8, 2, 2, 16, 2, 4, 16, 8, 4, 2, 8, 8, 4, 4, 2, 16, 4, 2, 4, 16, 16, 4, 2, 16, 4, 8, 2, 8, 8, 4, 8, 4, 4, 8, 2, 32 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS Number of solutions to x^8 == 1 (mod n). - Jianing Song, Nov 10 2019 LINKS Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 S. Finch, Quartic and octic characters modulo n, arXiv:0907.4894 [math.NT], 2009. FORMULA Multiplicative with a(p^e) = p^min(e-1, 4) if p = 2, gcd(8, p-1) if p > 2. - Jianing Song, Nov 10 2019 MAPLE A247257 := proc(n)     local a, pf, p, r;     a := 1 ;     for pf in ifactors(n)[2] do         p := op(1, pf);         r := op(2, pf);         if p = 2 then             if r >= 5 then                 a := a*16 ;             else                 a := a*op(r, [1, 2, 4, 8]) ;             end if;         elif modp(p, 4) = 3 then             a := a*2;         elif modp(p, 8) = 5 then             a := a*4;         elif modp(p, 8) = 1 then             a := a*8;         else             error         end if;     end do:     a ; end proc: MATHEMATICA g[p_, e_] := Which[p==2, 2^Min[e-1, 4], Mod[p, 4]==3, 2, Mod[p, 8]==5, 4, True, 8]; a[1] = 1; a[n_] := Times @@ g @@@ FactorInteger[n]; Array[a, 80] (* Jean-François Alcover, Nov 26 2017, after Charles R Greathouse IV *) PROG (PARI) g(p, e)=if(p==2, 2^min(e-1, 4), if(p%4==3, 2, if(p%8==5, 4, 8))) a(n)=my(f=factor(n)); prod(i=1, #f~, g(f[i, 1], f[i, 2])) \\ Charles R Greathouse IV, Mar 02 2015 CROSSREFS Number of solutions to x^k == 1 (mod n): A060594 (k=2), A060839 (k=3), A073103 (k=4), A319099 (k=5), A319100 (k=6), A319101 (k=7), this sequence (k=8). Sequence in context: A278266 A088200 A073103 * A069177 A077659 A212595 Adjacent sequences:  A247254 A247255 A247256 * A247258 A247259 A247260 KEYWORD mult,nonn,easy AUTHOR R. J. Mathar, Mar 02 2015 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 25 20:01 EDT 2020. Contains 337344 sequences. (Running on oeis4.)