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.

Showing 1-4 of 4 results.

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

Original entry on oeis.org

3, 9, 17, 19, 33, 35, 51, 73, 81, 99, 105, 129, 145, 147, 161, 163, 179, 195, 201, 233, 243, 273, 289, 291, 297, 339, 361, 387, 393, 451, 465, 467, 483, 489, 513, 521, 577, 579, 585, 611, 627, 649, 675, 721, 723, 739, 777, 801, 809, 819, 849, 883, 899, 915
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1999

Keywords

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

Examples

			E.g. 51^2 - 1 = 10^2 + 50^2 = 22^2 + 46^2 = 34^2 + 38^2.
		

Crossrefs

Programs

  • Mathematica
    t={}; Do[i=c=1; While[iJayanta Basu, Jun 01 2013 *)
    Select[Range@ 1000, Length[PowersRepresentations[#^2 - 1, 2, 2] /. {0, } -> Nothing] > 0 &] (* _Michael De Vlieger, Apr 13 2016 *)
  • PARI
    select( {is_A050795(n)=#qfbsolve(Qfb(1,0,1),n^2-1,2)}, [1..999]) \\ M. F. Hasler, Mar 07 2022
  • 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
    A050795_list = list(islice(A050795_gen(),20)) # Chai Wah Wu, Mar 07 2022
    

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

A050798 Numbers n such that m = n^2 + 1 is expressible as the sum of two nonzero squares in exactly two ways.

Original entry on oeis.org

1, 7, 8, 12, 13, 17, 21, 22, 23, 27, 28, 30, 31, 33, 34, 37, 41, 42, 44, 46, 48, 50, 52, 53, 55, 58, 60, 62, 63, 64, 67, 75, 76, 77, 78, 80, 81, 86, 87, 88, 89, 91, 92, 96, 97, 100, 102, 103, 104, 105, 106, 108, 109, 111, 113, 114, 115, 119, 125, 127, 129, 135, 136
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1999

Keywords

Comments

Of course m = n^2 + 1 is the sum of two squares, by definition. Here there should be just one other way to write m as a different sum of two squares.
Let p and q be primes of the form 1+4k. Then n^2+1 must be pq or 2pq. - T. D. Noe, May 27 2008

Examples

			E.g., 111^2 + 1 = 21^2 + 109^2 only.
		

Crossrefs

Programs

  • Mathematica
    ok[1] = True; ok[n_] := Length[ {ToRules[ Reduce[ 1 < x <= y && n^2 + 1 == x^2 + y^2, {x, y}, Integers] ] } ] == 1; Select[ Range[136], ok] (* Jean-François Alcover, Feb 16 2012 *)

Extensions

Better definition from T. D. Noe, May 27 2008

A274567 Least number k such that k^2-1 is the sum of two nonzero squares in exactly n ways.

Original entry on oeis.org

3, 81, 51, 291, 1251, 339, 62499, 1971, 5201, 5001, 175781251, 7299
Offset: 1

Views

Author

Altug Alkan, Jun 28 2016

Keywords

Comments

a(11) > 25*10^5 if it exists. - Chai Wah Wu, Jul 23 2020
From David A. Corneth, Jul 23 2020: (Start)
a(13) <= 17578125001, a(17) <= 610351562499. (End)

Examples

			a(2) = 81 because 81^2 - 1 = 28^2 + 76^2 = 44^2 + 68^2.
		

Crossrefs

Extensions

a(10) from Chai Wah Wu, Jul 22 2020

A274590 Numbers n such that n^2 - 1 is the average of two nonzero squares in exactly one way.

Original entry on oeis.org

9, 19, 33, 35, 73, 99, 145, 161, 163, 195, 243, 393, 483, 513, 577, 721, 723, 1153, 1763, 2177, 2305, 2593, 4803, 5185, 5833, 6273, 6963, 7057, 7395, 8713, 9523, 9603, 10083, 12483, 13923, 14113, 15875, 17425, 17673, 19043, 19601, 20737, 26243
Offset: 1

Views

Author

Altug Alkan, Jun 29 2016

Keywords

Comments

In other words, numbers n such that n^2 - 1 is the sum of two nonzero distinct squares in exactly one way. This explains why there are many common terms between this sequence and A050797.

Examples

			9 is a term because 9^2 - 1 = (4^2 + 12^2) / 2.
		

Crossrefs

Cf. A050797.
Showing 1-4 of 4 results.