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-9 of 9 results.

A350978 Appears to be an erroneous version of A050795.

Original entry on oeis.org

3, 9, 19, 31, 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
Offset: 1

Views

Author

N. J. A. Sloane, Mar 06 2022

Keywords

Extensions

Thanks to Chai Wah Wu for pointing out that something was wrong, and to David Applegate and Allan C. Wechsler for identifying the correct version of this sequence.

A050799 Values of n^2 - 1 resulting from A050795.

Original entry on oeis.org

8, 80, 288, 360, 1088, 1224, 2600, 5328, 6560, 9800, 11024, 16640, 21024, 21608, 25920, 26568, 32040, 38024, 40400, 54288, 59048, 74528, 83520, 84680, 88208, 114920, 130320, 149768, 154448, 203400, 216224, 218088, 233288, 239120, 263168
Offset: 0

Views

Author

Patrick De Geest, Sep 15 1999

Keywords

Crossrefs

Cf. A050795.

Programs

  • Mathematica
    t={}; Do[i=c=1; x=n^2-1; While[iJayanta Basu, Jun 01 2013 *)

A050796 Numbers n such that n^2 + 1 is expressible as the sum of two nonzero squares in at least one way (the trivial solution n^2 + 1 = n^2 + 1^2 is not counted).

Original entry on oeis.org

1, 7, 8, 12, 13, 17, 18, 21, 22, 23, 27, 28, 30, 31, 32, 33, 34, 37, 38, 41, 42, 43, 44, 46, 47, 48, 50, 52, 53, 55, 57, 58, 60, 62, 63, 64, 67, 68, 70, 72, 73, 75, 76, 77, 78, 80, 81, 82, 83, 86, 87, 88, 89, 91, 92, 93, 96, 97, 98, 99, 100, 102, 103, 104, 105, 106, 107
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., 41^2 + 1 = 2*29^2). Values of 'z' are the terms in sequence A002315, values of 'r' are the terms in sequence A001653.
Apart from the first term, numbers n such that (n^2)! == 0 mod (n^2 + 1)^2. - Michel Lagneau, Feb 14 2012
Numbers n such that neither n^2 + 1 nor (n^2 + 1)/2 is prime. - Charles R Greathouse IV, Feb 14 2012

Examples

			E.g., 57^2 + 1 = 15^2 + 55^2 = 21^2 + 53^2 = 35^2 + 45^2.
		

Crossrefs

Programs

  • Mathematica
    t={1}; Do[i=c=2; While[iJayanta Basu, Jun 01 2013 *)
  • PARI
    is(n)=!isprime((n^2+1)/if(n%2,2,1)) \\ Charles R Greathouse IV, Feb 14 2012

A140612 Integers k such that both k and k+1 are the sum of 2 squares.

Original entry on oeis.org

0, 1, 4, 8, 9, 16, 17, 25, 36, 40, 49, 52, 64, 72, 73, 80, 81, 89, 97, 100, 116, 121, 136, 144, 145, 148, 169, 180, 193, 196, 225, 232, 233, 241, 244, 256, 260, 288, 289, 292, 305, 313, 324, 337, 360, 361, 369, 388, 400, 404, 409, 424, 441, 449, 457
Offset: 1

Views

Author

Keywords

Comments

Equivalently, nonnegative k such that k*(k+1) is the sum of two squares.
Also, nonnegative k such that k*(k+1)/2 is the sum of two squares. This follows easily from the "sum of two squares theorem": x is the sum of two (nonnegative) squares iff its prime factorization does not contain p^e where p == 3 (mod 4) and e is odd. - Robert Israel, Mar 26 2018
Trivially, sequence includes all positive squares.

Examples

			40 = 6^2 + 2^2, 41 = 5^2 + 4^2, so 40 is in the sequence.
		

Crossrefs

Programs

  • Magma
    [k:k in [0..460]| forall{k+a: a in [0,1]|NormEquation(1, k+a) eq true}]; // Marius A. Burtea, Oct 08 2019
    
  • Mathematica
    (*M6*) A1 = {}; Do[If[SquaresR[2, n (n + 1)/2] > 0, AppendTo[A1, n]], {n, 0, 1500}]; A1
    Join[{0}, Flatten[Position[Accumulate[Range[500]], ?(SquaresR[2, #]> 0&)]]] (* _Harvey P. Dale, Jun 07 2015 *)
    SequencePosition[Table[If[SquaresR[2,n]>0,1,0],{n,0,500}],{1,1}] [[All,1]]-1 (* Harvey P. Dale, Jul 28 2021 *)
  • Python
    from itertools import count, islice, starmap
    from sympy import factorint
    def A140612_gen(startvalue=0): # generator of terms >= startvalue
        for k in count(max(startvalue,0)):
            if all(starmap(lambda d, e: e % 2 == 0 or d % 4 != 3, factorint(k*(k+1)).items())):
                yield k
    A140612_list = list(islice(A140612_gen(),20)) # Chai Wah Wu, Mar 07 2022

Extensions

a(1)=0 prepended and edited by Max Alekseyev, Oct 08 2019

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

Original entry on oeis.org

3, 9, 17, 19, 33, 35, 73, 145, 161, 163, 195, 243, 393, 483, 513, 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, 20737
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1999

Keywords

Comments

If the definition were changed from "nonzero squares" to "nonnegative squares", there would be just one additional term, 1. - T. D. Noe, May 27 2008

Examples

			E.g. 393^2 - 1 = 28^2 + 392^2 only.
		

Crossrefs

Programs

  • Mathematica
    twoSquaresQ[ n_] := (r = Reduce [0 < a <= b && n^2 - 1 == a^2 + b^2, {a, b}, Integers]; Head[r] === And); Select[ Range[21000], twoSquaresQ] (* Jean-François Alcover, Oct 10 2011 *)

Extensions

More terms from James Sellers

A082982 Numbers k such that k, k+1 and k+2 are sums of 2 squares.

Original entry on oeis.org

0, 8, 16, 72, 80, 144, 232, 288, 360, 520, 576, 584, 800, 808, 1088, 1096, 1152, 1224, 1312, 1600, 1664, 1744, 1800, 1872, 1960, 2248, 2304, 2312, 2384, 2592, 2600, 2824, 3328, 3392, 3528, 3600, 4112, 4176, 4328, 4624, 5120, 5184, 5328, 5408, 5904, 6056
Offset: 1

Views

Author

Xavier Xarles (xarles(AT)mat.uab.es), May 28 2003

Keywords

Comments

All terms are multiples of 8, cf. A304441. - M. F. Hasler, May 13 2018

Examples

			80 is here because 80=4^2+8^2, 81=0^2+9^2 and 82=1^2+9^2.
		

Crossrefs

Programs

  • PARI
    issumsq(n) = {ok = 0; for (i=0, ceil(sqrt(n/2)), if (issquare(n - i^2), return (1));); return (0);}
    isok(n) = issumsq(n) && issumsq(n+1) && issumsq(n+2) \\ Michel Marcus, Jun 30 2013
    
  • PARI
    is_A082982(n)={n%8==0&&is_A001481(n\8)&&is_A001481(n\2+1)&&is_A001481(n+1)} \\ using is_A001481 is much faster than the issumsq() above. - M. F. Hasler, May 13 2018

Formula

a(n) = 8*A304441(n). - M. F. Hasler, May 13 2018

Extensions

More terms from Michel Marcus, Jun 30 2013

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

A159935 Least integer such that a(n)^2 - n is the sum of two nonzero squares.

Original entry on oeis.org

5, 3, 2, 4, 3, 5, 4, 3, 4, 7, 6, 4, 5, 9, 4, 5, 6, 5, 6, 6, 5, 11, 12, 5, 7, 15, 6, 8, 6, 7, 8, 6, 7, 13, 6, 8, 7, 21, 8, 7, 9, 7, 10, 12, 7, 15, 8, 7, 10, 9, 10, 8, 9, 11, 8, 9, 8, 17, 30, 8, 10, 9, 8, 9, 9, 13, 10, 18, 9, 11, 12, 9, 12, 9, 10, 10, 9, 15, 16, 9, 10, 11, 10, 10, 11, 21, 12, 10, 15
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • PARI
    issum2sq(n) = local(fm, hf); hf=0;fm=factor(n);for(i=1,matsize(fm)[1],if(fm[i,1]==2,if(fm[i,2]%2,hf=1),if(fm[i,1]%4==1,hf=1,if(fm[i, 2]%2,return(0)))));hf
    minsum2sq(n) = local(k); k=1;while(!issum2sq(k^2-n),k++);k
    /* Note: the issum2sq function depends on PARI returning -1 as a factor for negative n. */

A096079 Near hypotenuse numbers, i.e., n such that n^2 -+ 1 = a^2 + b^2, with a, b > 1.

Original entry on oeis.org

3, 7, 8, 9, 12, 13, 17, 18, 19, 21, 22, 23, 27, 28, 30, 31, 32, 33, 34, 35, 37, 38, 41, 42, 43, 44, 46, 47, 48, 50, 51, 52, 53, 55, 57, 58, 60, 62, 63, 64, 67, 68, 70, 72, 73, 75, 76, 77, 78, 80, 81, 82, 83, 86, 87, 88, 89, 91, 92, 93, 96, 97, 98, 99, 100, 102, 103, 104, 105
Offset: 1

Views

Author

Lekraj Beedassy, Jul 21 2004

Keywords

Comments

When a=b, entries are those of A001333. - Lekraj Beedassy, Aug 06 2004

Examples

			8 and 9 are in the sequence because we have 8^2 + 1 = 4^2 + 7^2; 9^2 - 1 = 4^2 + 8^2.
		

Crossrefs

Union of A050795 and A050796. - Franklin T. Adams-Watters, Apr 26 2009

Extensions

Extended by Ray Chandler, Jul 29 2004
Showing 1-9 of 9 results.