OFFSET
1,1
COMMENTS
Analogous solutions exist for the sum of two identical squares z^2-1 = 2.r^2 (e.g. 99^2-1 = 2.70^2). Values of 'z' are the terms in sequence A001541, values of 'r' are the terms in sequence A001542.
Looking at a^2 + b^2 = c^2 - 1 modulo 4, we must have a and b even and c odd. Taking a = 2u, b = 2v and c = 2w - 1 and simplifying, we get u^2 + v^2 = w(w+1). - Franklin T. Adams-Watters, May 19 2008
If n is in this sequence, then so is n^(2^k), for all k >= 0. - Altug Alkan, Apr 13 2016
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
E.-B. Escott, Query 2521, L'Intermédiaire des Mathématiciens, 10 (1903), 285. [Contains errors]
FORMULA
a(n) = 2*A140612(n) + 1. - Franklin T. Adams-Watters, May 19 2008
{k : A025426(k^2-1)>0}. - R. J. Mathar, Mar 07 2022
EXAMPLE
E.g. 51^2 - 1 = 10^2 + 50^2 = 22^2 + 46^2 = 34^2 + 38^2.
MATHEMATICA
t={}; Do[i=c=1; While[i<n&&c!=0, If[IntegerQ[Sqrt[n^2-1-i^2]], c=0; AppendTo[t, n]]; i++], {n, 3, 920}]; t (* Jayanta Basu, Jun 01 2013 *)
Select[Range@ 1000, Length[PowersRepresentations[#^2 - 1, 2, 2] /. {0, _} -> Nothing] > 0 &] (* Michael De Vlieger, Apr 13 2016 *)
PROG
(Python)
from itertools import islice, count
from sympy import factorint
def A050795_gen(startvalue=2): # generator of terms >= startvalue
for k in count(max(startvalue, 2)):
if all(map(lambda d: d[0] % 4 != 3 or d[1] % 2 == 0, factorint(k**2-1).items())):
yield k
(PARI) select( {is_A050795(n)=#qfbsolve(Qfb(1, 0, 1), n^2-1, 2)}, [1..999]) \\ M. F. Hasler, Mar 07 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Patrick De Geest, Sep 15 1999
STATUS
approved