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.

A063949 Every number is the sum of 4 squares; these are the numbers n for which the first square can be taken to be any positive square < n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 12, 13, 14, 15, 17, 18, 20, 21, 22, 25, 26, 28, 30, 33, 34, 36, 38, 41, 42, 45, 46, 49, 50, 52, 54, 57, 58, 60, 62, 65, 66, 68, 70, 73, 74, 78, 81, 82, 84, 86, 89, 90, 94, 97, 98, 100, 102, 105, 106, 110, 114, 118, 122, 126, 129, 130
Offset: 1

Views

Author

N. J. A. Sloane, Sep 04 2001

Keywords

Comments

The only primes of this form are 2, 3, 5, 7, 13, 17, 41, 73, 89, 97, 257, 313, 353, 433.
Also, the numbers n such that for no 0 < k < sqrt(n), n-k^2 is in A004215, i.e., of the form 4^i(8j+7). The largest odd number in this sequence is a(322) = 945, cf. A063951. - M. F. Hasler, Jan 26 2018

References

  • J. H. Conway, personal communication, Aug 27, 2001.

Crossrefs

Programs

  • Mathematica
    t1 = {1, 3, 5, 7, 9, 13, 15, 17, 21, 25, 33, 41, 45, 49, 57, 65, 73, 81, 89, 97, 105, 129, 145, 153, 169, 177, 185, 201, 209, 217, 225, 257, 273, 297, 305, 313, 329, 345, 353, 385, 425, 433, 441, 481, 513, 561, 585, 609, 689, 697, 713, 817, 825, 945}; Union[{0}, t1, 4*t1, 4*Range[0, 999] + 2] (* T. D. Noe, Feb 22 2012 *)
  • PARI
    is_A063949(n)=if(bittest(n,0),is_A063951(n),n%4==2||is_A063951(n/4)||!n) \\ M. F. Hasler, Jan 26 2018
    
  • PARI
    #A063949_vec=select( is_A063949, [0..3780]) /* or: setunion(setunion(concat(0,A063951), 4*A063951),apply(t->t-2,4*[1..945])) */
    
  • PARI
    A063949(n)=if(n>1054,n*4-438,A063949_vec[n]) \\ M. F. Hasler, Jan 26 2018

Formula

Consists of 0, the 54 odd numbers in A063951, 4 times those numbers and all numbers of the form 4m+2.
a(n) = 4*(n-110) + 2 for all n > 1054. - M. F. Hasler, Jan 26 2018

A063950 Of course every number is the sum of 4 squares; these are the numbers not of the form 4m+2 such that the first square can be taken to be any positive square < n.

Original entry on oeis.org

0, 1, 3, 4, 5, 7, 9, 12, 13, 15, 17, 20, 21, 25, 28, 33, 36, 41, 45, 49, 52, 57, 60, 65, 68, 73, 81, 84, 89, 97, 100, 105, 129, 132, 145, 153, 164, 169, 177, 180, 185, 196, 201, 209, 217, 225, 228, 257, 260, 273, 292, 297, 305, 313, 324, 329, 345, 353, 356, 385, 388, 420, 425, 433, 441, 481, 513, 516, 561, 580, 585, 609, 612, 676, 689, 697, 708, 713, 740, 804, 817, 825, 836, 868, 900, 945, 1028, 1092, 1188, 1220, 1252, 1316, 1380, 1412, 1540, 1700, 1732, 1764, 1924, 2052, 2244, 2340, 2436, 2756, 2788, 2852, 3268, 3300, 3780
Offset: 1

Views

Author

N. J. A. Sloane, Sep 04 2001

Keywords

References

  • J. H. Conway, personal communication, Aug 27, 2001.

Crossrefs

Programs

  • Mathematica
    r[n_, x_] := Reduce[n == x^2 + y^2 + z^2 + t^2, {y, z, t}, Integers]; solQ[n_, x_] := r[n, x] =!= False; ok[0] = True; ok[n_] := And @@ (solQ[n, #] & ) /@ Range[1, Sqrt[n - 1]]; A063950 = Select[ Select[ Range[0, 4000], Mod[#, 4] != 2 &], If[ok[#], Print[#]; True, False] &](* Jean-François Alcover, May 15 2012 *)

Extensions

385 added by T. D. Noe, Apr 05 2007

A063952 Of course every number is the sum of 4 squares; for these numbers the first square can be taken to be any square < n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 9, 10, 12, 13, 14, 17, 18, 20, 21, 22, 25, 26, 30, 33, 34, 36, 38, 41, 42, 45, 46, 49, 50, 52, 54, 57, 58, 62, 65, 66, 68, 70, 73, 74, 78, 81, 82, 84, 86, 89, 90, 94, 97, 98, 100, 102, 105, 106, 110, 114, 118, 122, 126, 129, 130, 132, 134
Offset: 1

Views

Author

N. J. A. Sloane, Sep 04 2001

Keywords

References

  • J. H. Conway, personal communication, Aug 27, 2001.

Crossrefs

Programs

  • Mathematica
    t1 = {1, 3, 5, 9, 13, 17, 21, 25, 33, 41, 45, 49, 57, 65, 73, 81, 89, 97, 105, 129, 145, 153, 169, 177, 185, 201, 209, 217, 225, 257, 273, 297, 305, 313, 329, 345, 353, 385, 425, 433, 441, 481, 513, 561, 585, 609, 689, 697, 713, 817, 825, 945}; t = Union[{0}, t1, 4*t1, 4*Range[0,999] + 2] (* T. D. Noe, Feb 22 2012 *)

Formula

Consists of 0, the 52 odd numbers in A063954, 4 times those numbers and all numbers of the form 4m+2.

A063951 Every number is the sum of 4 squares; these are the odd numbers n such that the first square can be taken to be any positive square < n.

Original entry on oeis.org

1, 3, 5, 7, 9, 13, 15, 17, 21, 25, 33, 41, 45, 49, 57, 65, 73, 81, 89, 97, 105, 129, 145, 153, 169, 177, 185, 201, 209, 217, 225, 257, 273, 297, 305, 313, 329, 345, 353, 385, 425, 433, 441, 481, 513, 561, 585, 609, 689, 697, 713, 817, 825, 945
Offset: 1

Views

Author

N. J. A. Sloane, Sep 04 2001

Keywords

Comments

Odd numbers n such that for all k with 1 <= k < sqrt(n), n - k^2 is not in A004215. - Robert Israel, Jan 24 2018
The only numbers for which allowing k = 0 would make a difference are 7 and 15: These two are not in A063954.

References

  • J. H. Conway, personal communication, Aug 27, 2001.

Crossrefs

Programs

  • Maple
    isA004215:= proc(n)
      local t;
      t:= padic:-ordp(n,2);
      t::even and (n/2^t) mod 8 = 7
    end proc:
    filter:= proc(n) andmap(not(isA004215), [seq(n - k^2, k=1..floor(sqrt(n-1)))]) end proc:
    select(filter, [seq(i,i=1..1000,2)]); # Robert Israel, Jan 24 2018
  • Mathematica
    ok[n_] := Range[ Floor[ Sqrt[n] ]] == DeleteCases[ Union[ Flatten[ PowersRepresentations[n, 4, 2]]], 0, 1, 1]; A063951 = Select[ Range[1, 999, 2], ok] (* Jean-François Alcover, Sep 12 2012 *)
  • PARI
    is_A063951(n)=bittest(n,0)&&!forstep(k=sqrtint(n-1),1,-1,isA004215(n-k^2)&&return) \\ M. F. Hasler, Jan 26 2018
    
  • PARI
    A063951=select(is_A063951,[1..945]) \\ M. F. Hasler, Jan 26 2018

Formula

This A063951 = A063954 U { 7, 15 }. - M. F. Hasler, Jan 27 2018

A063953 Of course every number is the sum of 4 squares; these are the numbers not of the form 4m+2 such that the first square can be taken to be any square < n.

Original entry on oeis.org

0, 1, 3, 4, 5, 9, 12, 13, 17, 20, 21, 25, 33, 36, 41, 45, 49, 52, 57, 65, 68, 73, 81, 84, 89, 97, 100, 105, 129, 132, 145, 153, 164, 169, 177, 180, 185, 196, 201, 209, 217, 225, 228, 257, 260, 273, 292, 297, 305, 313, 324, 329, 345, 353, 356, 385, 388, 420, 425, 433, 441, 481, 513, 516, 561, 580, 585, 609, 612, 676, 689, 697, 708, 713, 740, 804, 817, 825, 836, 868, 900, 945, 1028, 1092, 1188, 1220, 1252, 1316, 1380, 1412, 1540, 1700, 1732, 1764, 1924, 2052, 2244, 2340, 2436, 2756, 2788, 2852, 3268, 3300, 3780
Offset: 0

Views

Author

N. J. A. Sloane, Sep 04 2001

Keywords

References

  • J. H. Conway, personal communication, Aug 27, 2001.

Crossrefs

Programs

  • Mathematica
    ok[n_] := And @@ (Reduce[# + x^2 + y^2 + z^2 == n, {x, y, z}, Integers] =!= False & /@ Select[ Range[n-1], IntegerQ[Sqrt[#]]& ]); Reap[ Do[ If[Mod[n, 4] != 2 && ok[n], Print[n]; Sow[n]], {n, 0, 4000}]][[2, 1]] (* Jean-François Alcover, Jun 22 2012 *)
Showing 1-5 of 5 results.