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.

Previous Showing 21-30 of 105 results. Next

A211520 Number of ordered triples (w,x,y) with all terms in {1,...,n} and w + 4y = 2x.

Original entry on oeis.org

0, 0, 0, 1, 2, 3, 5, 7, 10, 12, 16, 19, 24, 27, 33, 37, 44, 48, 56, 61, 70, 75, 85, 91, 102, 108, 120, 127, 140, 147, 161, 169, 184, 192, 208, 217, 234, 243, 261, 271, 290, 300, 320, 331, 352, 363, 385, 397, 420, 432, 456, 469, 494, 507, 533, 547, 574
Offset: 0

Views

Author

Clark Kimberling, Apr 14 2012

Keywords

Comments

For a guide to related sequences, see A211422.

Crossrefs

Programs

  • Haskell
    a211520 n = a211520_list !! n
    a211520_list = 0 : 0 : 0 : scanl1 (+) a178804_list
    -- Reinhard Zumkeller, Nov 15 2014
    
  • Maple
    seq(floor((n-1)^2/4)-floor((n-1)/4)*floor((n+1)/4), n=0..60); # Ridouane Oudra, Nov 21 2024
  • Mathematica
    t[n_] := t[n] = Flatten[Table[w - 2 x + 4 y, {w, 1, n}, {x, 1, n}, {y, 1, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 0, 70}]  (* this sequence *)
    FindLinearRecurrence[t]
    LinearRecurrence[{1,1,-1,1,-1,-1,1},{0,0,0,1,2,3,5},57] (* Ray Chandler, Aug 02 2015 *)
  • PARI
    { my(x='x+O('x^66)); concat([0,0,0],Vec( x^3*(1+x+x^3) / ( (1-x)^3*(1+x)^2*(1+x^2) ) ) ) } \\ Joerg Arndt, Apr 02 2017

Formula

a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) - a(n-5) - a(n-6) + a(n-7).
a(n) - a(n-1) = A178804(n-2). - Reinhard Zumkeller, Nov 15 2014
a(n) = (6*n^2-10*n+3+(2*n-7)*(-1)^n-4*(-1)^((2*n-3-(-1)^n)/4))/32. - Luce ETIENNE, Dec 31 2015
a(n) = Sum_{k=1..floor(n/2)} floor((n-k)/2). - Wesley Ivan Hurt, Apr 01 2017
G.f.: x^3 * (1+x+x^3) / ( (1-x)^3*(1+x)^2*(1+x^2) ). - Joerg Arndt, Apr 02 2017
a(n)+a(n-1) = A282513(n-2). - R. J. Mathar, Jun 23 2021
a(n) = floor((n-1)^2/4) - floor((n-1)/4)*floor((n+1)/4). - Ridouane Oudra, Nov 21 2024

A211521 Number of ordered triples (w,x,y) with all terms in {1,...,n} and w + 2x = 4y.

Original entry on oeis.org

0, 0, 1, 2, 4, 5, 9, 11, 16, 18, 25, 28, 36, 39, 49, 53, 64, 68, 81, 86, 100, 105, 121, 127, 144, 150, 169, 176, 196, 203, 225, 233, 256, 264, 289, 298, 324, 333, 361, 371, 400, 410, 441, 452, 484, 495, 529, 541, 576, 588, 625, 638, 676, 689, 729, 743
Offset: 0

Views

Author

Clark Kimberling, Apr 14 2012

Keywords

Comments

For a guide to related sequences, see A211422.
Also, number of ordered pairs (w,x) with both terms in {1,...,n} and w+2x divisible by 4. - Pontus von Brömssen, Jan 19 2020

Crossrefs

Cf. A211422.

Programs

  • Magma
    a:=[0]; for n in [1..55] do m:=0; for i, j in [1..n] do if (i+2*j) mod 4 eq 0  then m:=m+1; end if; end for; Append(~a, m); end for; a; // Marius A. Burtea, Jan 19 2020
    
  • Magma
    R:=PowerSeriesRing(Integers(), 57); [0,0] cat Coefficients(R!( x^3*(1 + x + x^2 + x^4) / ((1 - x)^3*(1 + x)^2*(1 + x^2)))); // Marius A. Burtea, Jan 19 2020
  • Mathematica
    t[n_] := t[n] = Flatten[Table[w + 2 x - 4 y, {w, 1, n}, {x, 1, n}, {y, 1, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 0, 70}]  (* A211521 *)
    FindLinearRecurrence[t]
    LinearRecurrence[{1,1,-1,1,-1,-1,1},{0,0,1,2,4,5,9},56] (* Ray Chandler, Aug 02 2015 *)
  • PARI
    concat(vector(2), Vec(x^2*(1 + x + x^2 + x^4) / ((1 - x)^3*(1 + x)^2*(1 + x^2)) + O(x^40))) \\ Colin Barker, Dec 02 2017
    

Formula

a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) - a(n-5) - a(n-6) + a(n-7).
a(n) = (2*n^2-n+1+(n-1)*(-1)^n+(-1)^((2*n+1-(-1)^n)/4)-(-1)^((6*n+1-(-1)^n)/4))/8. - Luce ETIENNE, Dec 31 2015
G.f.: x^2*(1 + x + x^2 + x^4) / ((1 - x)^3*(1 + x)^2*(1 + x^2)). - Colin Barker, Dec 02 2017

Extensions

Offset corrected by Pontus von Brömssen, Jan 19 2020

A211523 Number of ordered triples (w,x,y) with all terms in {1,...,n} and w+2x=5y.

Original entry on oeis.org

0, 0, 1, 2, 4, 5, 7, 10, 13, 17, 20, 24, 29, 34, 40, 45, 51, 58, 65, 73, 80, 88, 97, 106, 116, 125, 135, 146, 157, 169, 180, 192, 205, 218, 232, 245, 259, 274, 289, 305, 320, 336, 353, 370, 388, 405, 423, 442, 461, 481, 500, 520, 541, 562, 584, 605, 627
Offset: 0

Views

Author

Clark Kimberling, Apr 14 2012

Keywords

Comments

For a guide to related sequences, see A211422.
Also, number of ordered pairs (w,x) with both terms in {1,...,n} and w+2x divisible by 5. - Pontus von Brömssen, Jan 17 2020

Crossrefs

Cf. A211422.

Programs

  • Magma
    a:=[]; for n in [0..57] do m:=0; for i,j in [1..n] do if (i+2*j) mod 5 eq 0  then m:=m+1; end if; end for; Append(~a,m); end for; a; // Marius A. Burtea, Jan 17 2020
    
  • Magma
    R:=PowerSeriesRing(Integers(), 57);[0,0] cat Coefficients(R!( x^2*(1 + x^2 - x^3 + x^4) / ((1 - x)^3*(1 + x + x^2 + x^3 + x^4) ))); // Marius A. Burtea, Jan 17 2020
  • Mathematica
    t[n_] := t[n] = Flatten[Table[w + 2 x - 5 y, {w, 1, n}, {x, 1, n}, {y, 1, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 0, 70}]   (* A211523 *)
    FindLinearRecurrence[t]
    LinearRecurrence[{2,-1,0,0,1,-2,1},{0,0,1,2,4,5,7},57] (* Ray Chandler, Aug 02 2015 *)
  • PARI
    concat(vector(2), Vec(x^2*(1 + x^2 - x^3 + x^4) / ((1 - x)^3*(1 + x + x^2 + x^3 + x^4)) + O(x^40))) \\ Colin Barker, Dec 02 2017
    

Formula

a(n) = 2*a(n-1) - a(n-2) + a(n-5) - 2*a(n-6) + a(n-7).
G.f.: x^2*(1 + x^2 - x^3 + x^4) / ((1 - x)^3*(1 + x + x^2 + x^3 + x^4)). - Colin Barker, Dec 02 2017

A211534 Number of ordered triples (w,x,y) with all terms in {1,...,n} and w = 3x + 3y.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 3, 3, 6, 6, 6, 10, 10, 10, 15, 15, 15, 21, 21, 21, 28, 28, 28, 36, 36, 36, 45, 45, 45, 55, 55, 55, 66, 66, 66, 78, 78, 78, 91, 91, 91, 105, 105, 105, 120, 120, 120, 136, 136, 136, 153, 153, 153, 171, 171, 171, 190, 190, 190, 210
Offset: 0

Views

Author

Clark Kimberling, Apr 15 2012

Keywords

Comments

This sequence consists of six 0's followed by triply repeated triangular numbers.
For a guide to related sequences, see A211422.

Crossrefs

Cf. A211422, A008805 (w = 2x + 2y and doubly repeated triangular numbers).

Programs

  • Magma
    [Floor(n/3)*(Floor(n/3)-1)/2 : n in [0..100]]; // Wesley Ivan Hurt, Apr 05 2015
    
  • Magma
    [n le 7 select Floor(n/7) else Self(n-1)+2*Self(n-3)-2*Self(n-4)-Self(n-6)+ Self(n-7): n in [1..70]]; // Vincenzo Librandi, Apr 05 2015
  • Maple
    A211534:=n->floor(n/3)*(floor(n/3)-1)/2: seq(A211534(n), n=0..100); # Wesley Ivan Hurt, Apr 05 2015
  • Mathematica
    t[n_] := t[n] = Flatten[Table[-w + 3 x + 3 y, {w, 1, n}, {x, 1, n}, {y, 1, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 0, 70}]  (* A211534 *)
    FindLinearRecurrence[t]
    LinearRecurrence[{1, 0, 2, -2, 0, -1, 1}, {0, 0, 0, 0, 0, 0, 1}, 70] (* Vincenzo Librandi, Apr 05 2015 *)
  • PARI
    concat([0,0,0,0,0,0], Vec(-x^6/((x-1)^3*(x^2+x+1)^2) + O(x^100))) \\ Colin Barker, Feb 17 2015
    

Formula

a(n) = a(n-1) + 2*a(n-3) - 2*a(n-4) - a(n-6) + a(n-7).
a(n) = floor(n/3)*( floor(n/3) - 1 )/2. - Luce ETIENNE, Jul 08 2014
G.f.: -x^6 / ((x-1)^3*(x^2+x+1)^2). - Colin Barker, Feb 17 2015
a(n) = Sum_{i=0..n-3} i*0^(i mod 3)/3. - Wesley Ivan Hurt, Apr 05 2015

A211635 Number of ordered triples (w,x,y) with all terms in {1,...,n} and w^2

Original entry on oeis.org

0, 1, 7, 22, 51, 97, 166, 263, 391, 554, 756, 1004, 1303, 1653, 2061, 2530, 3068, 3677, 4362, 5126, 5973, 6912, 7942, 9071, 10304, 11640, 13087, 14649, 16333, 18142, 20078, 22150, 24357, 26707, 29202, 31845, 34649, 37610, 40739, 44031
Offset: 0

Views

Author

Clark Kimberling, Apr 18 2012

Keywords

Comments

For a guide to related sequences, see A211422.

Crossrefs

Cf. A211422.

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
        (Do[If[w^2 < x^2 + y^2, s = s + 1],
            {w, 1, #}, {x, 1, #}, {y, 1, #}] &[n]; s)]];
    Map[t[#] &, Range[0, 50]]  (* A211635 *)
    (* Peter J. C. Moses, Apr 13 2012 *)

A211638 Number of ordered triples (w, x, y) with all terms in {1, ..., n} and w^2 + x^2 + y^2 < n.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 4, 4, 4, 7, 7, 10, 11, 11, 17, 17, 17, 20, 23, 26, 26, 32, 35, 35, 38, 38, 44, 48, 48, 54, 60, 60, 60, 66, 69, 75, 78, 78, 87, 87, 87, 96, 102, 105, 108, 114, 120, 120, 121, 127, 133, 139, 139, 145, 157, 157, 163, 169, 169, 178, 178, 184
Offset: 0

Views

Author

Clark Kimberling, Apr 18 2012

Keywords

Comments

For a guide to related sequences, see A211422.

Crossrefs

Cf. A211422.

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
        (Do[If[w^2 + x^2 + y^2 < n, s = s + 1],
            {w, 1, #}, {x, 1, #}, {y, 1, #}] &[n]; s)]];
    Map[t[#] &, Range[0, 80]]     (* A211638 *)
    (* Peter J. C. Moses, Apr 13 2012 *)
  • PARI
    first(n) = {n = max(n, 2); n-=2; my(res = vector(n), v = vector(n)); forvec(x = vector(3, i, [1,sqrtint(n)]), c = sum(i = 1, 3, x[i]^2); if(c <= n, v[c]++)); for(i = 2, #v, v[i]+=v[i-1]); concat([0,0],v)} \\ David A. Corneth, Jun 16 2023

Formula

a(n) + A063691(n) = A211639(n). - R. J. Mathar, Jun 16 2023
a(n) = A211639(n-1). - R. J. Mathar, Jun 16 2023

A211649 Number of ordered triples (w,x,y) with all terms in {1,...,n} and w^2+x^2+y^2=2n.

Original entry on oeis.org

0, 0, 0, 3, 0, 0, 1, 6, 0, 3, 0, 3, 3, 6, 0, 6, 0, 3, 3, 9, 0, 6, 3, 6, 1, 6, 0, 12, 6, 0, 0, 12, 0, 12, 3, 6, 3, 12, 3, 6, 0, 3, 6, 15, 3, 12, 0, 12, 3, 12, 0, 6, 6, 6, 4, 18, 0, 12, 6, 9, 6, 12, 0, 18, 0, 0, 6, 21, 3, 12, 6, 6, 3, 21, 0, 15, 9, 12, 0, 12, 0, 12, 9, 15, 6, 12, 3, 18
Offset: 0

Views

Author

Clark Kimberling, Apr 18 2012

Keywords

Comments

For a guide to related sequences, see A211422.

Crossrefs

Cf. A211422.

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
        (Do[If[w^2 + x^2 + y^2 == 2 n, s = s + 1],
            {w, 1, #}, {x, 1, #}, {y, 1, #}] &[n]; s)]];
    Map[t[#] &, Range[0, 400]]    (* A211649 *)
    -1 + Flatten[Position[%, 0]]  (* A182195 *)
    (* Peter J. C. Moses, Apr 13 2012 *)

A063468 Number of Pythagorean triples in the range [1..n], i.e., the number of integer solutions to x^2 + y^2 = z^2 with 1 <= x,y,z <= n.

Original entry on oeis.org

0, 0, 0, 0, 2, 2, 2, 2, 2, 4, 4, 4, 6, 6, 8, 8, 10, 10, 10, 12, 12, 12, 12, 12, 16, 18, 18, 18, 20, 22, 22, 22, 22, 24, 26, 26, 28, 28, 30, 32, 34, 34, 34, 34, 36, 36, 36, 36, 36, 40, 42, 44, 46, 46, 48, 48, 48, 50, 50, 52, 54, 54, 54, 54, 62, 62, 62, 64, 64, 66, 66, 66, 68, 70
Offset: 1

Views

Author

Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 27 2001

Keywords

Examples

			For n = 5 the Pythagorean triples are (3, 4, 5) and (4, 3, 5), so a (5) = 2.
For n = 10 the Pythagorean triples are (3, 4, 5), (4, 3, 5), (6, 8, 10) and (8, 6, 10), so a(10) = 4.
For n = 17 the Pythagorean triples are (3, 4, 5), (4, 5, 3), (5, 12, 13), (12, 5, 13), (6, 8, 10), (8, 6, 10), (8, 15, 17), (15, 8, 17), (9, 12, 15) and (12, 9, 15), so a(17) = 10.
		

Crossrefs

a(n) = 2*partial sums of A046080(n).

Programs

  • Magma
    [#[: x in [1..n], y in [1..n]| IsSquare(x^2+y^2) and Floor(Sqrt(x^2+y^2)) le n]:n in [1..74]]; // Marius A. Burtea, Jan 22 2020
  • Mathematica
    nq[n_] := SquaresR[2, n^2]/4 - 1; Accumulate@ Array[nq, 80] (* Giovanni Resta, Jan 23 2020 *)

Extensions

Corrected and extended by Vladeta Jovovic, Jul 28 2001

A182074 Number of ordered triples (w,x,y) with all terms in {-n,...,0,...,n} and w^2+x*y=n.

Original entry on oeis.org

12, 16, 24, 56, 40, 48, 56, 64, 148, 80, 72, 96, 120, 96, 104, 304, 120, 128, 168, 144, 184, 176, 120, 208, 524, 160, 184, 256, 232, 192, 264, 224, 264, 304, 184, 760, 344, 176, 280, 400, 328, 256, 344, 352, 392, 416, 200, 384, 1156, 288, 376, 496
Offset: 1

Views

Author

Clark Kimberling, Apr 12 2012

Keywords

Comments

For a guide to related sequences, see A211422.

Crossrefs

Cf. A211422.

Programs

  • Mathematica
    t[n_] := t[n] = Flatten[Table[w^2 + x*y - n, {w, -n, n}, {x, -n, n}, {y, -n, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 1, 80}]  (* A182074 *)
    t/4                          (* A028387 *)

A182112 Number of ordered triples (w,x,y) with all terms in {-n,...,0,...,n} and (w+n)^2=x+y+w.

Original entry on oeis.org

1, 4, 7, 10, 13, 16, 20, 24, 28, 32, 36, 40, 45, 50, 55, 60, 65, 70, 75, 80, 86, 92, 98, 104, 110, 116, 122, 128, 134, 140, 147, 154, 161, 168, 175, 182, 189, 196, 203, 210, 217, 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, 320, 328, 336
Offset: 0

Views

Author

Clark Kimberling, Apr 12 2012

Keywords

Comments

For a guide to related sequences, see A211422.

Crossrefs

Cf. A211422.

Programs

  • Mathematica
    t[n_] := t[n] = Flatten[Table[(n + w)^2 - x - y - w, {w, -n, n}, {x, -n, n}, {y, -n, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 0, 70}]  (* A182112 *)
Previous Showing 21-30 of 105 results. Next