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.

A159797 Triangle read by rows in which row n lists n+1 terms, starting with n, such that the difference between successive terms is equal to n-1.

Original entry on oeis.org

0, 1, 1, 2, 3, 4, 3, 5, 7, 9, 4, 7, 10, 13, 16, 5, 9, 13, 17, 21, 25, 6, 11, 16, 21, 26, 31, 36, 7, 13, 19, 25, 31, 37, 43, 49, 8, 15, 22, 29, 36, 43, 50, 57, 64, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 10, 19, 28, 37, 46, 55, 64, 73, 82, 91, 100, 11, 21, 31, 41, 51, 61, 71, 81, 91, 101
Offset: 0

Views

Author

Omar E. Pol, Jul 09 2009

Keywords

Comments

Note that the last term of the n-th row is the n-th square A000290(n).
See also A162611, A162614 and A162622.
The triangle sums, see A180662 for their definitions, link the triangle A159797 with eleven sequences, see the crossrefs. - Johannes W. Meijer, May 20 2011
T(n,k) is the number of distinct sums in the direct sum of {1, 2, ... n} with itself k times for 1 <= k <= n+1, e.g., T(5,3) = the number of distinct sums in the direct sum {1,2,3,4,5} + {1,2,3,4,5} + {1,2,3,4,5}. The sums range from 1+1+1=3 to 5+5+5=15. So there are 13 distinct sums. - Derek Orr, Nov 26 2014

Examples

			Triangle begins:
0;
1, 1;
2, 3, 4;
3, 5, 7, 9;
4, 7,10,13,16;
5, 9,13,17,21,25;
6,11,16,21,26,31,36;
		

Crossrefs

Cf.: A006002 (row sums). - R. J. Mathar, Jul 17 2009
Cf. A163282, A163283, A163284, A163285. - Omar E. Pol, Nov 18 2009
From Johannes W. Meijer, May 20 2011: (Start)
Triangle sums (see the comments): A006002 (Row1), A050187 (Row2), A058187 (Related to Kn11, Kn12, Kn13, Fi1 and Ze1), A006918 (Related to Kn21, Kn22, Kn23, Fi2 and Ze2), A000330 (Kn3), A016061 (Kn4), A190717 (Related to Ca1 and Ze3), A144677 (Related to Ca2 and Ze4), A000292 (Related to Ca3, Ca4, Gi3 and Gi4) A190718 (Related to Gi1) and A144678 (Related to Gi2). (End)

Programs

Formula

Given m = floor( (sqrt(8*n+1)-1)/2 ), then a(n) = m + (n - m*(m+1)/2)*(m-1). - Carl R. White, Jul 24 2010

Extensions

Edited by Omar E. Pol, Jul 18 2009
More terms from Omar E. Pol, Nov 18 2009
More terms from Carl R. White, Jul 24 2010

A159469 Maximum remainder when (k + 1)^n + (k - 1)^n is divided by k^2 for variable n and k > 2.

Original entry on oeis.org

6, 8, 20, 24, 42, 48, 72, 80, 110, 120, 156, 168, 210, 224, 272, 288, 342, 360, 420, 440, 506, 528, 600, 624, 702, 728, 812, 840, 930, 960, 1056, 1088, 1190, 1224, 1332, 1368, 1482, 1520, 1640, 1680, 1806, 1848, 1980, 2024, 2162, 2208, 2352, 2400, 2550, 2600
Offset: 3

Views

Author

Gaurav Kumar, Apr 13 2009

Keywords

Examples

			For n = 3, maxr => 3*3 - 3 = 6 since 3 is odd.
For n = 4, maxr => 4*4 - 2*4 = 8 since 4 is even.
		

Crossrefs

Cf. A050187.

Programs

  • Mathematica
    LinearRecurrence[{1,2,-2,-1,1},{6,8,20,24,42},50] (* Harvey P. Dale, Apr 18 2018 *)
  • PARI
    a(n) = if (n % 2, n^2 - n, n^2 - 2*n); \\ Michel Marcus, Aug 26 2013
    
  • PARI
    first(n) = Vec(x^3*(-6-2*x)/((x+1)^2*(x-1)^3) + O(x^(n+3))) \\ Iain Fox, Nov 26 2017

Formula

maxr(n) = n*n - 2*n if n is even, and n*n - n if n is odd.
G.f.: x^3*(-6-2*x)/((x+1)^2*(x-1)^3). - Maksym Voznyy (voznyy(AT)mail.ru), Jul 26 2009 (proved by Iain Fox, Nov 26 2017)
a(n) = 2*A050187(n). - R. J. Mathar, Aug 08 2009 (proved by Iain Fox, Nov 27 2017)
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 7. - Colin Barker, Oct 29 2017 (proved by Iain Fox, Nov 26 2017)
a(n) = n^2 - n*(3 + (-1)^n)/2. - Iain Fox, Nov 26 2017
From Iain Fox, Nov 27 2017: (Start)
a(n) = A000290(n) - A022998(n).
a(n) = 2*A093005(n-2) + A168273(n-1).
a(n) = (4*(A152749(n-2)) + A091574(n-1) - A010719(n-1))/3.
E.g.f.: x*(exp(x)*x - sinh(x)).
(End)

A294473 Sum of the areas of the squares on the sides of the distinct rectangles that can be made with positive integer sides such that L + W = n, W < L.

Original entry on oeis.org

0, 0, 10, 20, 60, 92, 182, 248, 408, 520, 770, 940, 1300, 1540, 2030, 2352, 2992, 3408, 4218, 4740, 5740, 6380, 7590, 8360, 9800, 10712, 12402, 13468, 15428, 16660, 18910, 20320, 22880, 24480, 27370, 29172, 32412, 34428, 38038, 40280, 44280, 46760, 51170
Offset: 1

Views

Author

Wesley Ivan Hurt, Oct 31 2017

Keywords

Examples

			a(14) = 1540; the rectangles are 1 X 13, 2 X 12, 3 X 11, 4 X 10, 5 X 9, 6 X 8 (7 X 7 is not considered since W < L). The sum of the areas of the squares on the sides of the rectangles is 2*1^2+2*13^2 + 2*2^2+2*12^2 + 2*3^2+2*11^2 + 2*4^2+2*10^2 + 2*5^2+2*9^2 + 2*6^2+2*8^2 = 340 + 296 + 260 + 232 + 212 + 200 = 1540.
		

Crossrefs

Programs

  • Magma
    [n*(2*n-3-(-1)^n)*(8*n-3+(-1)^n)/24: n in [1..60]]; // Wesley Ivan Hurt, Dec 02 2023
  • Mathematica
    Table[2 Sum[i^2 + (n - i)^2, {i, Floor[(n-1)/2]}], {n, 40}]
    LinearRecurrence[{1,3,-3,-3,3,1,-1},{0,0,10,20,60,92,182},50] (* Harvey P. Dale, Jul 05 2025 *)
  • PARI
    concat(vector(2), Vec(2*x^3*(5 + 5*x + 5*x^2 + x^3) / ((1 - x)^4*(1 + x)^3) + O(x^60))) \\ Colin Barker, Oct 31 2017
    
  • PARI
    a(n) = 2*sum(i=1, (n-1)\2, i^2 + (n-i)^2); \\ Michel Marcus, Nov 08 2017
    

Formula

a(n) = 2 * Sum_{i=1..floor((n-1)/2)} i^2 + (n-i)^2.
a(n) = 2 * A294286(n).
From Colin Barker, Oct 31 2017: (Start)
G.f.: 2*x^3*(5 + 5*x + 5*x^2 + x^3) / ((1 - x)^4*(1 + x)^3).
a(n) = n*(8*n^2 - 18*n + 4) / 12 for n even.
a(n) = n*(8*n^2 - 12*n + 4) / 12 for n odd.
a(n) = a(n-1) + 3*a(n-2) - 3*a(n-3) - 3*a(n-4) + 3*a(n-5) + a(n-6) - a(n-7) for n > 7. (End)
a(n) = n*(2*n-3-(-1)^n)*(8*n-3+(-1)^n)/24. - Wesley Ivan Hurt, Dec 02 2023
E.g.f.: x*(x*(3 + 4*x)*cosh(x) - (3 - 6*x - 4*x^2)*sinh(x))/6. - Stefano Spezia, May 19 2025

A294457 Sum of all the diagonals of the distinct rectangles that can be made with positive integer sides such that L + W = n, W < L. The sums are then rounded to the nearest integer.

Original entry on oeis.org

0, 0, 4, 6, 15, 19, 33, 38, 57, 64, 87, 97, 124, 135, 168, 181, 218, 232, 274, 291, 337, 355, 407, 427, 482, 504, 565, 589, 654, 679, 749, 777, 851, 880, 959, 991, 1074, 1107, 1196, 1230, 1323, 1360, 1458, 1496, 1599, 1639, 1746, 1788, 1900, 1944, 2060, 2106
Offset: 1

Views

Author

Wesley Ivan Hurt, Oct 30 2017

Keywords

Examples

			a(4) = 6; There is only one 1 X 3 rectangle (there is no 2 X 2 rectangle since W < L) and sqrt(1^2 + 3^2) = sqrt(10). Since there are two diagonals in a rectangle, the total length is 2*sqrt(10). Then we have round(2*sqrt(10)) = round(6.32455532..) = 6.
		

Crossrefs

Cf. A050187.

Programs

  • Mathematica
    Table[Round[2*Sum[Sqrt[i^2 + (n - i)^2], {i, Floor[(n-1)/2]}]], {n, 80}]

Formula

a(n) = round(2 * Sum_{i=1..floor((n-1)/2)} sqrt(i^2 + (n-i)^2)).

A338544 a(n) = (5*floor((n-1)/2)^2 + (4+(-1)^n)*floor((n-1)/2)) / 2.

Original entry on oeis.org

0, 0, 0, 4, 5, 13, 15, 27, 30, 46, 50, 70, 75, 99, 105, 133, 140, 172, 180, 216, 225, 265, 275, 319, 330, 378, 390, 442, 455, 511, 525, 585, 600, 664, 680, 748, 765, 837, 855, 931, 950, 1030, 1050, 1134, 1155, 1243, 1265, 1357, 1380, 1476, 1500, 1600, 1625, 1729, 1755, 1863
Offset: 0

Views

Author

Wesley Ivan Hurt, Nov 01 2020

Keywords

Comments

Sum of the largest side lengths of all integer-sided triangles with perimeter 3n whose side lengths are in arithmetic progression (for example, when n=5 there are two triangles with perimeter 3*5 = 15 whose side lengths are in arithmetic progression: [3,5,7] and [4,5,6]; thus a(5) = 7+6 = 13).

Crossrefs

Programs

  • Mathematica
    Table[(5 Floor[(n - 1)/2]^2 + Floor[(n - 1)/2] (4 + (-1)^n))/2, {n, 0, 100}]

Formula

From Stefano Spezia, Nov 01 2020: (Start)
G.f.: x^3*(4 + x)/((1 - x)^3*(1 + x)^2).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 4. (End)
16*a(n) = -14*n-1+10*n^2+(-1)^n-6*(-1)^n*n . - R. J. Mathar, Aug 19 2022
Showing 1-5 of 5 results.