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.

Previous Showing 21-30 of 56 results. Next

A035015 Period of continued fraction for square root of n-th squarefree integer.

Original entry on oeis.org

1, 2, 1, 2, 4, 1, 2, 5, 4, 2, 1, 6, 6, 6, 4, 1, 5, 2, 8, 4, 4, 2, 1, 2, 2, 3, 2, 10, 12, 4, 2, 5, 4, 6, 7, 6, 11, 4, 1, 2, 10, 8, 6, 8, 7, 5, 6, 4, 4, 1, 2, 5, 10, 2, 5, 8, 10, 16, 4, 11, 1, 2, 12, 2, 9, 6, 15, 2, 6, 9, 6, 10, 10, 4, 1, 2, 12, 10, 3, 6, 16, 14, 9, 4, 18, 4, 4, 2, 1, 2, 9, 20, 10, 4
Offset: 2

Views

Author

David L. Treumann (alewifepurswest(AT)yahoo.com)

Keywords

Comments

Friesen proved that each value appears infinitely often. - Michel Marcus, Apr 12 2019

Examples

			a(2)=1 because 2 is the 2nd smallest squarefree integer and sqrt 2 = [ 1,2,2,2,2,... ] thus has an eventual period of 1.
		

Crossrefs

Cf. A003285, A005117 (squarefree numbers), A013943.

Programs

  • Maple
    sqf:= select(numtheory:-issqrfree,[$2..1000]):
    map(n->nops(numtheory:-cfrac(sqrt(n),'periodic','quotients')[2]),sqf); # Robert Israel, Dec 21 2014
  • Mathematica
    Length[ContinuedFraction[Sqrt[#]][[2]]]&/@Select[ Range[ 2,200], SquareFreeQ] (* Harvey P. Dale, Jul 17 2011 *)

Formula

a(n) = A003285(A005117(n)). - Michel Marcus, Dec 29 2014

Extensions

Corrected and extended by James Sellers

A048941 a(n) is twice the coefficient of 1 in the fundamental unit of Q(sqrt(A000037(n))) where A000037 lists the nonsquare numbers (Version 1).

Original entry on oeis.org

2, 4, 1, 10, 16, 2, 6, 20, 4, 3, 30, 8, 8, 34, 340, 4, 5, 394, 48, 10, 10, 52, 16, 5, 22, 3040, 6, 46, 70, 12, 12, 74, 50, 6, 64, 26, 6964, 20, 7, 48670, 96, 14, 14, 100, 36, 7, 970, 178, 30, 302, 198, 1060, 8, 39, 126, 16, 16, 130, 97684, 8, 25, 502, 6960, 34
Offset: 1

Views

Author

Keywords

Comments

From Sean A. Irvine, Jul 16 2021: (Start)
These values are computed by Algorithm 5.7.2 in Cohen.
Other methods of computation (see A346419) give different results, with the first difference at n=14.
(End)
a(n) is the smallest positive integer x satisfying the Pell equation x^2 - D*y^2 = +-4, where D = A000037(n). - Jinyuan Wang, Sep 08 2021

References

  • Henri Cohen, A Course in Computational Algebraic Number Theory, Springer-Verlag, 1993.

Crossrefs

Programs

  • PARI
    a(n) = my(A, D=n+(1+sqrtint(4*n))\2, d=sqrtint(D), p, q, t, u1, u2, v1, v2); if(d%2==D%2, p=d, p=d-1); u1=-p; u2=2; v1=1; v2=0; q=2; while(v2==0 || q!=t, A=(p+d)\q; t=p; p=A*q-p; if(t==p && v2!=0, return((u2^2+D*v2^2)/q), t=A*u2+u1; u1=u2; u2=t; t=A*v2+v1; v1=v2; v2=t; t=q; q=(D-p^2)/q)); (u1*u2+D*v1*v2)/q; \\ Jinyuan Wang, Sep 08 2021

Extensions

Name edited by Michel Marcus, Jun 26 2020
Entry revised by Sean A. Irvine, Jul 13 2021

A053370 Write fundamental unit for real quadratic field of discriminant n as x + y*omega; sequence gives values of x for n == 1 mod 4.

Original entry on oeis.org

0, 1, 3, 2, 2, 19, 5, 27, 3, 131, 17, 7, 11, 943, 4, 4, 447, 13, 5035, 9, 37, 118, 703, 15371, 79, 1595, 87, 11, 28, 98, 10847, 6, 6, 57731, 604, 63, 1637147, 13, 478763, 20, 43331, 34, 3583111, 7, 7, 21639, 36, 66436843, 8011739, 872, 15, 5699, 77
Offset: 0

Views

Author

N. J. A. Sloane, Jan 06 2000

Keywords

Comments

Entries are indexed by values of n from A039955.

References

  • R. A. Mollin, Quadratics, CRC Press, 1996, Tables B1-B3.

Crossrefs

A053375 Write fundamental unit for real quadratic field of discriminant n as x + y*omega; sequence gives values of y for n == 3 mod 4.

Original entry on oeis.org

1, 3, 3, 1, 39, 5, 273, 1, 4, 531, 7, 7, 12, 69, 5967, 413, 9, 9, 3, 165, 4, 22419, 93, 28, 105, 11, 11, 419775, 927, 6578829, 1, 140634693, 20, 105, 5019135, 13, 313191, 36, 123, 650783, 1, 1153080099, 4, 19162705353, 3, 5, 15, 15, 5, 3
Offset: 0

Views

Author

N. J. A. Sloane, Jan 06 2000

Keywords

Comments

Entries are indexed by values of n from A039957.

References

  • R. A. Mollin, Quadratics, CRC Press, 1996, Tables B1-B3.

Crossrefs

Programs

A003246 Discriminants of real quadratic norm-Euclidean fields (a finite sequence).

Original entry on oeis.org

5, 8, 12, 13, 17, 21, 24, 28, 29, 33, 37, 41, 44, 57, 73, 76
Offset: 1

Views

Author

Keywords

Comments

Euclidean fields that are not norm-Euclidean, such as Q(sqrt(14)) and Q(sqrt(69)), are not included. Actually, assuming GCH, a real quadratic field is Euclidean if and only if it is a PID (equivalently, if and only if it is a UFD). - Jianing Song, Jun 09 2022

References

  • W. J. LeVeque, Topics in Number Theory. Addison-Wesley, Reading, MA, 2 vols., 1956, Vol. 2, p. 57.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • H. M. Stark, An Introduction to Number Theory. Markham, Chicago, 1970, p. 294.

Crossrefs

Programs

Formula

Equals A037449(A003174) as a set, not composition of functions (values are sorted by size; it turns out that a(n) is different from A037449(A003174(n)) for all n=1,...,16). - M. F. Hasler, Jan 26 2014

A006641 Class number of forms with discriminant -A003657(n), or equivalently class number of imaginary quadratic field with discriminant -A003657(n).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 3, 2, 3, 2, 4, 2, 1, 5, 2, 2, 4, 4, 3, 1, 4, 7, 5, 3, 4, 6, 2, 2, 8, 5, 6, 3, 8, 2, 6, 10, 4, 2, 5, 5, 4, 4, 3, 10, 2, 7, 6, 4, 10, 1, 8, 11, 4, 5, 8, 4, 2, 13, 4, 9, 4, 3, 6, 14, 4, 7, 5, 4, 12, 2
Offset: 1

Views

Author

Keywords

References

  • D. A. Buell, Binary Quadratic Forms. Springer-Verlag, NY, 1989, pp. 224-241.
  • H. Cohen, Course in Computational Alg. No. Theory, Springer, 1993, p. 514.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A003657.

Programs

  • Mathematica
    FundamentalDiscriminantQ[n_Integer] := n != 1 && (Mod[n, 4] == 1 || !Unequal[ Mod[n, 16], 8, 12]) && SquareFreeQ[n/2^IntegerExponent[n, 2]] (* via Eric W. Weisstein *);
    NumberFieldClassNumber@ Sqrt@ # & /@ Select[-Range@ 300, FundamentalDiscriminantQ]
  • PARI
    for(n=1, 300, if(isfundamental(-n), print1(quadclassunit(-n).no, ", "))) \\ Andrew Howroyd, Jul 23 2018
    
  • Sage
    [1] + [QuadraticField(-n, 'a').class_number() for n in (0..200) if is_fundamental_discriminant(-n) and not is_square(n)] # G. C. Greubel, Mar 01 2019

A014000 First coordinate of fundamental unit of real quadratic field with discriminant A003658(n), n >= 2.

Original entry on oeis.org

0, 1, 2, 1, 3, 2, 5, 8, 2, 19, 5, 3, 27, 10, 3, 15, 131, 4, 17, 7, 11, 943, 170, 4, 4, 197, 447, 24, 13, 5035, 9, 5, 37, 118, 703, 11, 1520, 15371, 79, 35, 1595, 6, 87, 11, 28, 37, 25, 98, 10847, 6, 13, 3482, 6, 57731, 604, 24335, 63, 48, 1637147, 13, 478763
Offset: 2

Views

Author

Eric Rains (rains(AT)caltech.edu)

Keywords

Comments

Taken from Cohen's table on pages 515-519. The table is indexed by the discriminant d = d(K) = A003658(n) of the real quadratic fields K. The fundamental unit is given as a pair of coordinates (a,b) = (A014000(n), A014046(n)) expressed in terms of the canonical integral basis (1,w) where w = (1+sqrt(d))/2 if d == 1 (mod 4), w = sqrt(d)/2 if d == 0 (mod 4).
The norm of this fundamental unit is A014077(n). The class number h(K) is A003652(n). - N. J. A. Sloane, Jun 14 2013

Examples

			Here is the start of Cohen's list of fundamental units: [0, 1], [1, 1], [2, 1], [1, 1], [3, 2], [2, 1], [5, 2], [8, 3], [2, 1], [19, 8], [5, 2], [3, 1], [27, 10], [10, 3], [3, 1], [15, 4], [131, 40],[4, 1], [17, 5], [7, 2], [11, 3], [943, 250], [170, 39], [4, 1], [4, 1], [197, 42], [447, 106], [24, 5], [13, 3], [5035, 1138], [9, 2], [5, 1], [37, 8], [118, 25], [703, 146], [11, 2], [1520, 273], [15371, 2968], [79, 15], [35, 6], [1595, 298], [6, 1], [87, 16], [11, 2], [28, 5], [37, 6], [25, 4], [98, 17], [10847, 1856], [6, 1], [13, 2], [3482, 531], [6, 1], [57731, 9384], [604, 97], [24335, 3588], [63, 10], [48, 7], [1637147, 253970], [13, 2], [478763, 72664], ... [_N. J. A. Sloane_, Jun 14 2013]
		

References

  • H. Cohen, A Course in Computational Algebraic Number Theory, Springer, 1993, pp. 515-519.

Crossrefs

Extensions

Edited by N. J. A. Sloane, Jun 14 2013
Offset corrected by Jianing Song, Mar 31 2019

A033197 Discriminants of quadratic number fields Q(sqrt -n) for n squarefree.

Original entry on oeis.org

-4, -8, -3, -20, -24, -7, -40, -11, -52, -56, -15, -68, -19, -84, -88, -23, -104, -116, -120, -31, -132, -136, -35, -148, -152, -39, -164, -168, -43, -184, -47, -51, -212, -55, -228, -232, -59, -244, -248, -260, -264, -67, -276, -280, -71, -292, -296, -308, -312, -79, -328, -83, -340, -344, -87, -356
Offset: 1

Views

Author

Keywords

References

  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989, p. 103.

Crossrefs

Values of n run through A005117. See A000924 for class numbers of these fields.

Programs

  • Mathematica
    max = 56; j = 1; Do[ If[ SquareFreeQ[n], v[j] = n; j = j+1], {n, 1, 2*max}]; Do[ a[n] = -v[n]*If[Mod[v[n], 4] == 3, 1, 4], {n, 1, j-1}]; Table[a[n], {n, 1, max}] (* Jean-François Alcover, Oct 18 2011, after PARI *)
  • PARI
    bnd = 1000; L = vector(bnd); j = 1; for (i=1,bnd, if(issquarefree(i),L[j]=i:j=j+1)); M = vector(j-1); for (i=1,j-1,M[i]=if((L[i]%4==3),-L[i],-4*L[i])); M

Formula

For n squarefree and negative, a(n) = n if n == 1 (mod 4), otherwise a(n) = 4n.

A107997 Squarefree integers m congruent to 5 modulo 8 such that the minimal solution of the Pell equation x^2 - m*y^2 = +-4 has both x and y odd.

Original entry on oeis.org

5, 13, 21, 29, 53, 61, 69, 77, 85, 93, 109, 133, 149, 157, 165, 173, 181, 205, 213, 221, 229, 237, 253, 277, 285, 293, 301, 309, 317, 341, 357, 365, 397, 413, 421, 429, 437, 445, 453, 461, 469, 493, 501, 509, 517, 533, 541, 565, 581, 589, 597, 613, 629, 645
Offset: 1

Views

Author

Steven Finch, Jun 13 2005

Keywords

Comments

Squarefree integers m for which the fundamental unit of Q(sqrt(m)) is of the form (u + v*sqrt(m))/2, where u and v are both odd.

References

  • E. L. Ince, Cycles of Reduced Ideals in Quadratic Fields, British Association Mathematical Tables, Vol. IV, London, 1934.
  • H. C. Williams, Eisenstein's problem and continued fractions, Utilitas Math. 37 (1990) 145-157.

Crossrefs

Cf. A107998.

Programs

  • Mathematica
    fQ[n_] := Block[{nffu = NumberFieldFundamentalUnits@ Sqrt@ n}, SquareFreeQ@ n && Denominator[ nffu[[1, 2, 2]]] > 1]; Select[ 8Range@ 81 - 3, fQ] (* Robert G. Wilson v, Dec 22 2014 *)

A003643 Number of genera of Q(sqrt(-n)), n squarefree.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 2, 1, 2, 2, 2, 2, 1, 4, 2, 1, 2, 2, 4, 1, 4, 2, 2, 2, 2, 2, 2, 4, 1, 2, 1, 2, 2, 2, 4, 2, 1, 2, 2, 4, 4, 1, 4, 4, 1, 2, 2, 4, 4, 1, 2, 1, 4, 2, 2, 2, 2, 4, 2, 2, 2, 2, 4, 1, 8, 2, 1, 2, 4, 2, 2, 4, 2, 2, 2, 2, 2, 1, 4, 4, 1, 4, 2, 2, 4, 1, 4, 2, 2, 4, 2, 2, 1, 4, 2, 2, 2, 2, 4, 1, 8, 2, 1, 4, 2
Offset: 1

Views

Author

Keywords

References

  • D. A. Buell, Binary Quadratic Forms. Springer-Verlag, NY, 1989, pp. 224-241.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    Function[If[Mod[#, 4] == 1, 2^PrimeOmega[#], 2^(PrimeOmega[#] - 1)]] /@ Select[Range[200], SquareFreeQ] (* Jean-François Alcover, Sep 04 2019 *)
  • PARI
    for(n=1, 200, if(issquarefree(n), print1(2^(omega(n*if((-n)%4>1, 4, 1)) - 1), ", "))) \\ Andrew Howroyd, Jul 24 2018

Formula

a(n) = 2^(omega(A033197(n)) - 1). - Andrew Howroyd, Jul 24 2018
Let k = A005117(n) be the n-th squarefree number, then a(n) = 2^omega(k) if k == 1 (mod 4) and 2^(omega(k) - 1) otherwise. - Jianing Song, Jul 25 2018
Previous Showing 21-30 of 56 results. Next