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.
%I A092205 #22 Feb 16 2025 08:32:52 %S A092205 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, %T A092205 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, %U A092205 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 %N A092205 Number of units in the imaginary quadratic field Q(sqrt(-n)). %C A092205 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 %H A092205 Nathaniel Johnston, <a href="/A092205/b092205.txt">Table of n, a(n) for n = 1..10000</a> %H A092205 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Unit.html">Unit</a> %F A092205 a(A005117(n)) = A236213(n). - _Jonathan Sondow_, Jan 29 2014 %e A092205 For n=1, the units are +/-1, +/-i, so a(1) = 4. %e A092205 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] %p A092205 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 %t A092205 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_ *) %o A092205 (PARI) a(n)=if(issquare(n),return(4));if(n%3==0&&issquare(n/3),6,2) \\ _Charles R Greathouse IV_, Oct 30 2012 %Y A092205 Cf. A092206, A000290, A033428, A236213. %K A092205 nonn,easy %O A092205 1,1 %A A092205 _Eric W. Weisstein_, Feb 24 2004