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.

A354713 Number of solutions (n, D) for Pell equation n^2 - D*y^2 = 1 with fixed n.

This page as a plain text file.
%I A354713 #33 Feb 16 2025 08:34:03
%S A354713 1,2,1,2,1,3,2,3,2,2,1,2,1,3,1,6,1,4,1,2,1,3,2,3,4,2,2,2,1,4,1,4,1,4,
%T A354713 1,4,1,3,1,3,1,2,2,2,2,3,2,6,2,4,1,4,1,6,1,3,1,2,1,2,2,4,2,4,1,2,1,2,
%U A354713 1,6,1,6,2,2,2,2,1,3,3,3,3,2,1,2
%N A354713 Number of solutions (n, D) for Pell equation n^2 - D*y^2 = 1 with fixed n.
%C A354713 a(n) can be computed as the number of divisors of the square root of the largest square dividing n^2 - 1.
%C A354713 A067874 gives n with a(n) = 1.
%H A354713 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PellEquation.html">Pell Equation</a>.
%F A354713 a(n) = A000005(A000188(n^2-1)).
%e A354713 a(17) = 6 because there are 6 possible solutions to 17^2 - D*y^2 = 1: 17^2 - 2*12^2 = 1, 17^2 - 8*6^2 = 1, 17^2 - 18*4^2 = 1, 17^2 - 32*3^2 = 1, 17^2 - 72*2^2 = 1 and 17^2 - 288*1^2 = 1. D = 18 is the smallest of the 6 D values, where the (17,y) pair is minimal and hence A033314(17) = 18.
%t A354713 squarefreepart[n_] := Times @@ Power @@@ ({#[[1]], Mod[#[[2]], 2]} & /@ FactorInteger[n]);
%t A354713 a[n_] :=  Divisors[Sqrt[(n^2 - 1)/squarefreepart[n^2 - 1]]] // Length; Table[a[n], {n, 2, 85}]
%o A354713 (PARI) f(n) = sqrtint(n/core(n)) \\ A000188
%o A354713 a(n) = numdiv(f(n^2-1)); \\ _Michel Marcus_, Jun 05 2022
%Y A354713 Cf. A002349, A002350, A033314, A067874.
%K A354713 nonn
%O A354713 2,2
%A A354713 _Herbert Kociemba_, Jun 04 2022