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

A124966 Numbers which can be expressed as the ordered sum of 3 squares in 2 or more different ways.

Original entry on oeis.org

9, 17, 18, 25, 26, 27, 29, 33, 34, 36, 38, 41, 45, 49, 50, 51, 53, 54, 57, 59, 61, 62, 65, 66, 68, 69, 72, 73, 74, 75, 77, 81, 82, 83, 85, 86, 89, 90, 94, 97, 98, 99, 100, 101, 102, 104, 105, 106, 107, 108, 109, 110, 113, 114, 116, 117, 118, 121, 122, 123, 125, 126, 129
Offset: 1

Views

Author

Artur Jasinski, Nov 14 2006

Keywords

Examples

			a(1)=9 because 9 = 3^2 + 0^2 + 0^2 or 2^2 + 2^2 + 1^2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[129], Length@PowersRepresentations[#, 3, 2] >= 2 &] (* Ray Chandler, Oct 31 2019 *)

Formula

Equals = A000027 - A094942 - A004215.

Extensions

Corrected and extended by Ray Chandler, Nov 30 2006

A124967 Numbers which can be expressed as the ordered sum of 3 squares in 3 or more different ways.

Original entry on oeis.org

41, 50, 54, 65, 66, 74, 81, 86, 89, 90, 98, 99, 101, 110, 113, 114, 117, 121, 122, 125, 126, 129, 131, 134, 137, 145, 146, 149, 150, 153, 161, 162, 164, 166, 169, 170, 171, 173, 174, 178, 179, 181, 182, 185, 186, 189, 194, 197, 198, 200, 201, 205, 206, 209
Offset: 1

Views

Author

Artur Jasinski, Nov 14 2006

Keywords

Examples

			a(1) = 41 because 41 = 4^2+4^2+3^2 or 5^2+4^2+0^2 or 6^2+2^2+1^2.
117=0^2+6^2+9^2=1^2+4^2+10^2=2^2+7^2+8^2, so 117 is in the list.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, 1, `if`(t*i^23, 3, min(3, b(n, i-1, t)+
          `if`(i^2>n, 0, b(n-i^2, i, t-1))))))
        end:
    a:= proc(n) option remember; local k;
          for k from 1 +`if`(n=1, 0, a(n-1))
          while b(k, isqrt(k), 3)<3 do od; k
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Apr 10 2013
  • Mathematica
    Select[Range[210], Length@PowersRepresentations[#, 3, 2] >= 3 &] (* Ray Chandler, Oct 31 2019 *)
  • PARI
    isA124967(n)={ local(cnt=0,z2) ; for(x=0,floor(sqrt(n)), for(y=x,floor(sqrt(n-x^2)), z2=n-x^2-y^2 ; if( z2>=y^2 && issquare(z2), cnt++ ; ) ; if(cnt >=3, return(1) ) ; ) ; ) ; return(0) ; } { for(n=1,200, if( isA124967(n), print1(n,", ") ; ) ; ) ; } (Mathar)

Extensions

Corrected and extended by Ray Chandler and R. J. Mathar, Nov 29 2006

A124968 Numbers which can be expressed as the ordered sum of 3 squares in 4 or more different ways.

Original entry on oeis.org

81, 89, 101, 125, 129, 134, 146, 149, 153, 161, 162, 170, 171, 173, 185, 189, 194, 198, 201, 206, 209, 221, 225, 230, 233, 234, 241, 242, 243, 245, 246, 249, 250, 251, 254, 257, 261, 266, 269, 270, 274, 278, 281, 285, 289, 290, 293, 294, 297, 299, 305, 306
Offset: 1

Views

Author

Artur Jasinski, Nov 14 2006

Keywords

Comments

Subset of A124967.

Examples

			a(1)=81 because 81 = 6^2 + 6^2 + 3^2 = 7^2 + 4^2 + 4^2 = 8^2 + 4^2 + 1^2 = 9^2 + 0^2 + 0^2.
161 = 1^2 + 4^2 + 12^2 = 2^2 + 6^2 + 11^2 = 4^2 + 8^2 + 9^2 = 5^2 + 6^2 + 10^2, so 161 is in the list.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[310], Length@PowersRepresentations[#, 3, 2] >= 4 &] (* Ray Chandler, Oct 31 2019 *)
  • PARI
    isA124968(n)={ local(cnt=0,z2) ; for(x=0,floor(sqrt(n)), for(y=x,floor(sqrt(n-x^2)), z2=n-x^2-y^2 ; if( z2>=y^2 && issquare(z2), cnt++ ; ) ; if(cnt >=4, return(1) ) ; ) ; ) ; return(0) ; } { for(n=1,800, if( isA124968(n), print1(n,", ") ; ) ; ) ; } \\ R. J. Mathar

Extensions

Corrected and extended by Ray Chandler and R. J. Mathar, Nov 29 2006

A124970 Smallest positive integer which can be expressed as the ordered sum of 3 squares in exactly n different ways.

Original entry on oeis.org

7, 1, 9, 41, 81, 146, 194, 306, 369, 425, 594, 689, 866, 1109, 1161, 1154, 1361, 1634, 1781, 1889, 2141, 2729, 2609, 3626, 3366, 3566, 3449, 3506, 4241, 4289, 4826, 5066, 5381, 7034, 5561, 6254, 7229, 7829, 8186, 8069, 8126, 8609, 8921, 8774, 10386, 11574, 11129
Offset: 0

Views

Author

Artur Jasinski, Nov 14 2006, Nov 20 2006

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1}, While[Length@PowersRepresentations[k, 3, 2] != n, k++]; k]; Table[f[n], {n, 0, 44}] (* Ray Chandler, Oct 31 2019 *)
  • Python
    from collections import Counter
    from itertools import count, combinations_with_replacement as mc
    def aupto(lim):
      sq = filter(lambda x: x<=lim, (i**2 for i in range(int(lim**(1/2))+2)))
      s3 = filter(lambda x: 0Michael S. Branicky, Jul 01 2021

Extensions

Extended by Ray Chandler, Nov 30 2006
a(45) and beyond from Michael S. Branicky, Jul 01 2021

A124969 Numbers which can be expressed as an ordered sum of 3 squares in 5 or more different ways.

Original entry on oeis.org

146, 153, 185, 194, 206, 209, 221, 225, 230, 234, 257, 261, 266, 269, 281, 290, 293, 297, 305, 306, 314, 321, 325, 326, 329, 338, 341, 342, 350, 353, 354, 362, 365, 369, 374, 377, 381, 386, 389, 398, 401, 402, 405, 409, 410, 413, 414, 419, 425, 426, 434
Offset: 1

Views

Author

Artur Jasinski, Nov 14 2006

Keywords

Examples

			a(1)=146 because 146=9^2+7^2+4^2 = 9^2+8^2+1^2 = 11^2+4^2+3^2 = 11^2+5^2+0^2 = 12^2+1^2+1^2
185=0^2+4^2+13^2=0^2+8^2+11^2=2^2+9^2+10^2=4^2+5^2+12^2=6^2+7^2+10^2, so 185 is in the list.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[434], Length@PowersRepresentations[#, 3, 2] >= 5 &] (* Ray Chandler, Oct 31 2019 *)
  • PARI
    isA124969(n)={ local(cnt=0,z2) ; for(x=0,floor(sqrt(n)), for(y=x,floor(sqrt(n-x^2)), z2=n-x^2-y^2 ; if( z2>=y^2 && issquare(z2), cnt++ ; ) ; if(cnt >=5, return(1) ) ; ) ; ) ; return(0) ; } { for(n=1,800, if( isA124969(n), print1(n,", ") ; ) ; ) ; } \\ R. J. Mathar, Dec 07 2006

Extensions

Corrected and extended by Ray Chandler and R. J. Mathar, Nov 29 2006
Showing 1-5 of 5 results.