login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A092205 Number of units in the imaginary quadratic field Q(sqrt(-n)). 5
4, 2, 6, 4, 2, 2, 2, 2, 4, 2, 2, 6, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 6, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Sequence of n such that a(n)=2 gives A092206; a(n)=4 gives A000290; a(n)=6 gives A033428. - Marc LeBrun, Apr 12 2006
LINKS
Eric Weisstein's World of Mathematics, Unit
FORMULA
a(A005117(n)) = A236213(n). - Jonathan Sondow, Jan 29 2014
EXAMPLE
For n=1, the units are +/-1, +/-i, so a(1) = 4.
For n=3, the units are +/-1, +/-w, +/-w^2, where w is a cube root of unity, so a(3) = 6. [Corrected by Jonathan Sondow, Jan 29 2014]
MAPLE
A092205 := proc(n) if(type(sqrt(n), integer))then return 4: elif(n mod 3 = 0 and type(sqrt(n/3), integer))then return 6: else return 2: fi: end: seq(A092205(n), n=1..105); # Nathaniel Johnston, Jun 26 2011
MATHEMATICA
a[n_] := Which[ IntegerQ[ Sqrt[n] ], 4, Mod[n, 3] == 0 && IntegerQ[ Sqrt[n/3] ], 6, True, 2]; Table[a[n], {n, 1, 105}] (* Jean-François Alcover, Oct 30 2012, after Nathaniel Johnston *)
PROG
(PARI) a(n)=if(issquare(n), return(4)); if(n%3==0&&issquare(n/3), 6, 2) \\ Charles R Greathouse IV, Oct 30 2012
CROSSREFS
Sequence in context: A273667 A187109 A242599 * A272101 A059853 A136527
KEYWORD
nonn,easy
AUTHOR
Eric W. Weisstein, Feb 24 2004
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 03:30 EDT 2024. Contains 371782 sequences. (Running on oeis4.)