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.

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).

This page as a plain text file.
%I A048941 #48 Feb 16 2025 08:32:40
%S A048941 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,
%T A048941 3040,6,46,70,12,12,74,50,6,64,26,6964,20,7,48670,96,14,14,100,36,7,
%U A048941 970,178,30,302,198,1060,8,39,126,16,16,130,97684,8,25,502,6960,34
%N 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).
%C A048941 From _Sean A. Irvine_, Jul 16 2021: (Start)
%C A048941 These values are computed by Algorithm 5.7.2 in Cohen.
%C A048941 Other methods of computation (see A346419) give different results, with the first difference at n=14.
%C A048941 (End)
%C A048941 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
%D A048941 Henri Cohen, A Course in Computational Algebraic Number Theory, Springer-Verlag, 1993.
%H A048941 Jinyuan Wang, <a href="/A048941/b048941.txt">Table of n, a(n) for n = 1..1000</a>
%H A048941 S. R. Finch, <a href="https://web.archive.org/web/20160511035657/http://www.people.fas.harvard.edu/~sfinch/csolve/clss.pdf">Class number theory</a>
%H A048941 Steven R. Finch, <a href="/A000924/a000924.pdf">Class number theory</a> [Cached copy, with permission of the author]
%H A048941 Sean A. Irvine, <a href="https://github.com/archmageirvine/joeis/blob/master/src/irvine/oeis/a048/A048941.java">Java program</a> (github)
%H A048941 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/FundamentalUnit.html">Fundamental Unit</a>.
%o A048941 (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
%Y A048941 Cf. A000037, A048942, A346419, A346420.
%K A048941 nonn
%O A048941 1,1
%A A048941 _Eric W. Weisstein_
%E A048941 Name edited by _Michel Marcus_, Jun 26 2020
%E A048941 Entry revised by _Sean A. Irvine_, Jul 13 2021