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.

A243577 Integers of the form 8k+7 that can be written as a sum of four distinct 'almost consecutive' squares.

Original entry on oeis.org

39, 71, 87, 119, 191, 255, 287, 351, 471, 567, 615, 711, 879, 1007, 1071, 1199, 1415, 1575, 1655, 1815, 2079, 2271, 2367, 2559, 2871, 3095, 3207, 3431, 3791, 4047, 4175, 4431, 4839, 5127, 5271, 5559, 6015, 6335, 6495, 6815, 7319, 7671, 7847, 8199, 8751, 9135, 9327, 9711
Offset: 1

Views

Author

Walter Kehowski, Jun 08 2014

Keywords

Comments

By Lagrange's Four Square Theorem, any integer n of the form 8k+7 (A004771) can be written as sum of no fewer than four squares. The initial terms 7,15,23,31 are the generating set for A004771 in the sense that if n = a^2 + b^2+ c^2 + d^2, then (a mod 4)^2 + (b mod 4)^2 + (c mod 4)^2 + (d mod 4)^2 is one of 7,15,23,31.
From now on assume that n is of the form 8k+7 and is a sum of distinct squares a,b,c,d, sorted.
We say that [a,b,c,d] is almost consecutive if the differences b-a, c-b, d-c are 1 or 2. The generating set for this sequence is
39, [1,2,3,5], with gap pattern 112,
71, [1,3,5,6], with gap pattern 221,
87, [2,3,5,7], with gap pattern 122,
119, [3,5,6,7], with gap pattern 211,
in the sense that adding [4*i,4*i,4*i,4*i], i >= 0, preserves the gap pattern. It should be noted that the four generators are all obtainable from [1,1,2,3] or [1,2,3,3] by addition of suitable vectors. Let's write it out:
[1,2,3,5] = [1,1,2,3] + [4,0,0,0] or
[1,2,3,5] = [1,1,2,3] + [0,4,0,0]
[1,3,5,6] = [1,1,2,3] + [0,4,4,0]
[2,3,5,7] = [1,2,3,3] + [4,0,4,0] or
[2,3,5,7] = [1,2,3,3] + [4,0,0,4]
[3,5,6,7] = [1,2,3,3] + [4,4,4,0] or
[3,5,6,7] = [1,2,3,3] + [4,4,0,4].
There are generators for other gap patterns, but the minimal gap patterns are of the most interest. - Walter Kehowski, Jul 07 2014

Examples

			For n=1, a(n) = 4*1^2 + 14*1 + 21 =  39 and  39 = 1^2 + 2^2 + 3^2 + 5^2.
For n=2, a(n) = 4*2^2 + 14*2 + 27 =  39 and  71 = 1^2 + 3^2 + 5^2 + 6^2.
For n=3, a(n) = 4*3^2 + 10*3 + 21 =  87 and  87 = 2^2 + 3^2 + 5^2 + 7^2.
For n=4, a(n) = 4*4^2 + 10*4 + 15 = 119 and 119 = 3^2 + 5^2 + 6^2 + 7^2.
		

Crossrefs

Programs

  • Maple
    A243577 := proc(n::posint)
       if n mod 4 = 1 then
          return [4*n^2+14*n+21, [n,n+1,n+2,n+4]]
       elif n mod 4 = 2 then
          return [4*n^2+14*n+27, [n-1,n+1,n+3,n+4]]
       elif n mod 4 = 3 then
          return [4*n^2+10*n+21, [n-1,n,n+2,n+4]]
       else
          return [4*n^2+10*n+15, [n-1,n+1,n+2,n+3]]
       fi;
    end:
    # Walter A. Kehowski, Jun 08 2014
  • Mathematica
    Rest@ CoefficientList[Series[-x (15 x^6 - 30 x^5 + 45 x^4 - 60 x^3 + 69 x^2 - 46 x + 39)/((x - 1)^3*(x^2 + 1)^2), {x, 0, 48}], x] (* Michael De Vlieger, Feb 19 2019 *)
    LinearRecurrence[{3,-5,7,-7,5,-3,1},{39,71,87,119,191,255,287},50] (* Harvey P. Dale, Jul 05 2021 *)
  • PARI
    Vec(-x*(15*x^6-30*x^5+45*x^4-60*x^3+69*x^2-46*x+39)/((x-1)^3*(x^2+1)^2) + O(x^100)) \\ Colin Barker, Jun 09 2014

Formula

If n mod 4 = 1, then a(n) = 4*n^2 + 14*n + 21.
If n mod 4 = 2, then a(n) = 4*n^2 + 14*n + 27.
If n mod 4 = 3, then a(n) = 4*n^2 + 10*n + 21.
If n mod 4 = 0, then a(n) = 4*n^2 + 10*n + 15.
a(n) = -3*(-7 + (-i)^n+i^n) - (1-i)*((-6-6*i) + (-i)^n + i*i^n)*n + 4*n^2 where i=sqrt(-1). - Colin Barker, Jun 09 2014
G.f.: -x*(15*x^6 - 30*x^5 + 45*x^4 - 60*x^3 + 69*x^2 - 46*x + 39) / ((x-1)^3*(x^2+1)^2). - Colin Barker, Jun 09 2014

A243578 Integers n of the form 8k+7 that are sum of distinct squares of the form m, m+1, m+2, m+4, where m == 1 (mod 4).

Original entry on oeis.org

39, 191, 471, 879, 1415, 2079, 2871, 3791, 4839, 6015, 7319, 8751, 10311, 11999, 13815, 15759, 17831, 20031, 22359, 24815, 27399, 30111, 32951, 35919, 39015, 42239, 45591, 49071, 52679, 56415, 60279, 64271, 68391, 72639, 77015, 81519, 86151, 90911, 95799
Offset: 1

Views

Author

Walter Kehowski, Jun 08 2014

Keywords

Comments

If n is of the form 8k+7 such that n=a^2+b^2+c^2+d^2 with gap pattern 112, then [a,b,c,d]=[1,2,3,5]+[4*i,4*i,4*i,4*i], i>=0.

Examples

			a(5)=64*5^2-40*5+15=1415 and m=4*5-3=17, and 1415=17^2+18^2+19^2+21^2.
		

Crossrefs

Programs

  • Magma
    I:=[39,191,471]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3): n in [1..60]]; // Vincenzo Librandi, Sep 13 2015
  • Maple
    A243578 := proc(n::posint) return 64*n^3-40*n+15 end;
  • Mathematica
    LinearRecurrence[{3, -3, 1}, {39, 191, 471}, 50] (* Vincenzo Librandi, Sep 13 2015 *)
  • PARI
    Vec(-x*(3*x+13)*(5*x+3)/(x-1)^3 + O(x^100)) \\ Colin Barker, Sep 12 2015
    

Formula

a(n) = 64*n^2-40*n+15.
From Colin Barker, Sep 12 2015: (Start)
a(n) = 3*a(n-1)-3*a(n-2)+a(n-3) for n>3.
G.f.: -x*(3*x+13)*(5*x+3) / (x-1)^3.
(End)

A243579 Integers of the form 8k+7 that can be written as a sum of four distinct squares of the form m, m+2, m+4, m+5, where m == 1 (mod 4).

Original entry on oeis.org

71, 255, 567, 1007, 1575, 2271, 3095, 4047, 5127, 6335, 7671, 9135, 10727, 12447, 14295, 16271, 18375, 20607, 22967, 25455, 28071, 30815, 33687, 36687, 39815, 43071, 46455, 49967, 53607, 57375, 61271, 65295, 69447, 73727, 78135, 82671, 87335, 92127, 97047, 102095, 107271, 112575, 118007, 123567, 129255, 135071, 141015, 147087
Offset: 1

Views

Author

Walter Kehowski, Jun 08 2014

Keywords

Comments

If n is of the form 8k+7 and n = a^2+b^2+c^2+d^2 with gap pattern 221, then [a,b,c,d] = [1,3,5,6]+[4*i,4*i,4*i,4*i] for i>=0.

Examples

			a(5) = 64*5^2-8*5+15 = 1575 and m = 4*5-3 = 17 so 1575 = 17^2+19^2+21^2+22^2.
		

Crossrefs

Programs

  • Magma
    [64*n^2-8*n+15 : n in [1..50]]; // Wesley Ivan Hurt, Nov 28 2021
  • Maple
    A243579 := proc(n::posint) return 64*n^2-8*n+15 end;
  • PARI
    Vec(-x*(15*x^2+42*x+71)/(x-1)^3 + O(x^100)) \\ Colin Barker, Sep 13 2015
    

Formula

a(n) = 64*n^2-8*n+15.
From Colin Barker, Sep 13 2015: (Start)
a(n) = 3*a(n-1)-3*a(n-2)+a(n-3) for n>3.
G.f.: x*(15*x^2+42*x+71) / (1-x)^3. (End)

A243580 Integers of the form 8k + 7 that can be written as a sum of four distinct squares of the form m, m + 1, m + 3, m + 5, where m == 2 (mod 4).

Original entry on oeis.org

87, 287, 615, 1071, 1655, 2367, 3207, 4175, 5271, 6495, 7847, 9327, 10935, 12671, 14535, 16527, 18647, 20895, 23271, 25775, 28407, 31167, 34055, 37071, 40215, 43487, 46887, 50415, 54071, 57855, 61767, 65807, 69975, 74271, 78695, 83247, 87927, 92735, 97671, 102735, 107927, 113247, 118695, 124271, 129975, 135807, 141767, 147855
Offset: 1

Views

Author

Walter Kehowski, Jun 08 2014

Keywords

Comments

If n is of the form 8k + 7 and n = a^2 + b^2 + c^2 + d^2 where [a, b, c, d] has gap pattern 122, then [a, b, c, d] = [2, 3, 5, 7] + [4*i, 4*i, 4*i, 4*i], i >= 0.

Examples

			a(5) = 64*n^2 + 8*5 + 15 = 1655 and m = 4*5 - 2 = 18 so 1655 = 18^2 + 19^2 + 21^2 + 23^2.
		

Crossrefs

Programs

  • Maple
    A243580 := proc(n::posint) return 64*n^2+8*n+15 end;
  • Mathematica
    Table[64n^2 + 8n + 15, {n, 50}] (* Alonso del Arte, Jun 08 2014 *)
    LinearRecurrence[{3,-3,1},{87,287,615},50] (* Harvey P. Dale, Mar 27 2019 *)
  • PARI
    Vec(-x*(15*x^2+26*x+87)/(x-1)^3 + O(x^100)) \\ Colin Barker, Sep 13 2015

Formula

a(n) = 64*n^2 + 8*n + 15.
From Colin Barker, Sep 13 2015: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>3.
G.f.: -x*(15*x^2+26*x+87) / (x-1)^3. (End)

A243581 Integers of the form 8k + 7 that can be written as a sum of four distinct squares of the form m, m + 2, m + 3, m + 4, where m == 2 (mod 4).

Original entry on oeis.org

119, 351, 711, 1199, 1815, 2559, 3431, 4431, 5559, 6815, 8199, 9711, 11351, 13119, 15015, 17039, 19191, 21471, 23879, 26415, 29079, 31871, 34791, 37839, 41015, 44319, 47751, 51311, 54999, 58815, 62759, 66831, 71031, 75359, 79815
Offset: 1

Views

Author

Walter Kehowski, Jun 08 2014

Keywords

Comments

If n is of the form 8k + 7 and n = a^2 + b^2 + c^2 + d^2 where [a, b, c, d] has gap pattern 122, then [a, b, c, d] = [3, 5, 6, 7] + [4*i, 4*i, 4*i, 4*i], i >= 0.

Examples

			a(5) = 64*5^2 + 40*5 + 15 = 1815 and 4*5 - 1 = 19 so 1815 = 19^2 + 21^2 + 22^2 + 23^2.
		

Crossrefs

Programs

  • Magma
    [ 64*n^2 + 40*n + 15 : n in [1..50] ]; // Wesley Ivan Hurt, Jun 11 2014
  • Maple
    A243581 := proc(n::posint) return 64*n^2+40*n+15 end;
  • Mathematica
    Table[64n^2 + 40n + 15, {n, 50}] (* Alonso del Arte, Jun 08 2014 *)
    LinearRecurrence[{3,-3,1},{119,351,711},50] (* Harvey P. Dale, Jul 23 2014 *)
  • PARI
    Vec(-x*(15*x^2-6*x+119)/(x-1)^3 + O(x^100)) \\ Colin Barker, Jun 09 2014
    

Formula

a(n) = 64*n^2 + 40*n + 15.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Colin Barker, Jun 09 2014
G.f.: -x*(15*x^2-6*x+119) / (x-1)^3. - Colin Barker, Jun 09 2014
Showing 1-5 of 5 results.