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.

A358821 a(n) is the largest square dividing n^2 - 1.

This page as a plain text file.
%I A358821 #50 Mar 31 2023 07:28:37
%S A358821 1,4,1,4,1,16,9,16,9,4,1,4,1,16,1,144,1,36,1,4,1,16,25,16,225,4,9,4,1,
%T A358821 64,1,64,1,36,1,36,1,16,1,16,1,4,9,4,9,16,49,400,49,100,1,36,1,144,1,
%U A358821 16,1,4,1,4,9,64,9,64,1,4,1,4,1,144,1,144,25,4
%N A358821 a(n) is the largest square dividing n^2 - 1.
%F A358821 a(n) = A008833(n^2 - 1).
%F A358821 a(n) = A008833(A005563(n-1)).
%F A358821 a(n) = A005563(n-1) / A068310(n).
%F A358821 a(n) = A005563(n-1) / A007913(A005563(n-1)).
%F A358821 a(n) = (n^2 - 1) / A068310(n).
%F A358821 a(n) = (n^2 - 1) / A007913(n^2 - 1).
%t A358821 f[p_, e_] := p^(2*Floor[e/2]); a[n_] := Times @@ (f @@@ FactorInteger[n^2 - 1]); Array[a, 100, 2] (* _Amiram Eldar_, Jan 04 2023 *)
%o A358821 (Python)
%o A358821 from sympy.ntheory.factor_ import core
%o A358821 def a(n):
%o A358821   return (n**2-1)//core(n**2-1)
%o A358821 (PARI) a(n) = (n^2-1)/core(n^2-1); \\ _Michel Marcus_, Feb 19 2023
%Y A358821 Cf. A007913, A008833, A068310, A005563.
%K A358821 nonn
%O A358821 2,2
%A A358821 _DarĂ­o Clavijo_, Jan 04 2023