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.

A050795 Numbers n such that n^2 - 1 is expressible as the sum of two nonzero squares in at least one way.

This page as a plain text file.
%I A050795 #38 Mar 07 2022 10:27:39
%S A050795 3,9,17,19,33,35,51,73,81,99,105,129,145,147,161,163,179,195,201,233,
%T A050795 243,273,289,291,297,339,361,387,393,451,465,467,483,489,513,521,577,
%U A050795 579,585,611,627,649,675,721,723,739,777,801,809,819,849,883,899,915
%N A050795 Numbers n such that n^2 - 1 is expressible as the sum of two nonzero squares in at least one way.
%C A050795 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.
%C A050795 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
%C A050795 If n is in this sequence, then so is n^(2^k), for all k >= 0. - _Altug Alkan_, Apr 13 2016
%H A050795 Chai Wah Wu, <a href="/A050795/b050795.txt">Table of n, a(n) for n = 1..10000</a>
%H A050795 E.-B. Escott, <a href="/A350978/a350978.pdf">Query 2521</a>, L'Intermédiaire des Mathématiciens, 10 (1903), 285. [Contains errors]
%H A050795 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>
%F A050795 a(n) = 2*A140612(n) + 1. - _Franklin T. Adams-Watters_, May 19 2008
%F A050795 {k : A025426(k^2-1)>0}. - _R. J. Mathar_, Mar 07 2022
%e A050795 E.g. 51^2 - 1 = 10^2 + 50^2 = 22^2 + 46^2 = 34^2 + 38^2.
%t A050795 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 *)
%t A050795 Select[Range@ 1000, Length[PowersRepresentations[#^2 - 1, 2, 2] /. {0, _} -> Nothing] > 0 &] (* _Michael De Vlieger_, Apr 13 2016 *)
%o A050795 (Python)
%o A050795 from itertools import islice, count
%o A050795 from sympy import factorint
%o A050795 def A050795_gen(startvalue=2): # generator of terms >= startvalue
%o A050795     for k in count(max(startvalue,2)):
%o A050795         if all(map(lambda d: d[0] % 4 != 3 or d[1] % 2 == 0, factorint(k**2-1).items())):
%o A050795             yield k
%o A050795 A050795_list = list(islice(A050795_gen(),20)) # _Chai Wah Wu_, Mar 07 2022
%o A050795 (PARI) select( {is_A050795(n)=#qfbsolve(Qfb(1,0,1),n^2-1,2)}, [1..999]) \\ _M. F. Hasler_, Mar 07 2022
%Y A050795 Cf. A050796, A050797, A001541, A001542, A001333.
%Y A050795 Cf. A140612, A002378.
%K A050795 nonn
%O A050795 1,1
%A A050795 _Patrick De Geest_, Sep 15 1999