OFFSET
2,1
COMMENTS
In other words, squarefree part of n^2-1.
Least m for which x^2 - m*y^2 = 1 has a solution with x = n.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 2..10000
FORMULA
a(n) = A007913(n^2-1).
a(n) = A005563(n-1) / A008833(n^2 - 1). - Reinhard Zumkeller, Nov 26 2011; corrected by Georg Fischer, Dec 10 2022
EXAMPLE
MATHEMATICA
a[n_] := Times@@(#[[1]] ^ Mod[ #[[2]], 2]&/@FactorInteger[n^2-1])
Table[(n^2-1)/Max[Select[Divisors[n^2-1], IntegerQ[Sqrt[#]]&]], {n, 2, 60}] (* Harvey P. Dale, Dec 08 2019 *)
PROG
(PARI) a(n) = core(n*n - 1); \\ David Wasserman, Mar 07 2005
(Haskell)
a068310 n = f 1 $ a027746_row (n^2 - 1) where
f y [] = y
f y [p] = y*p
f y (p:ps'@(p':ps)) | p == p' = f y ps
| otherwise = f (y*p) ps'
-- Reinhard Zumkeller, Nov 26 2011
CROSSREFS
KEYWORD
easy,nice,nonn
AUTHOR
Lekraj Beedassy, Feb 25 2002
EXTENSIONS
Edited by Dean Hickerson, Mar 19 2002
Entry revised by N. J. A. Sloane, Apr 27 2007
STATUS
approved