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

A003057 n appears n - 1 times.

Original entry on oeis.org

2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14
Offset: 2

Views

Author

Keywords

Comments

The PARI functions t1, t2 can be used to read a triangular array T(n,k) (n >= 2, 1 <= k <= n - 1) by rows from left to right: n -> T(t1(n), t2(n)). - Michael Somos, Aug 23 2002
Smallest integer such that n-1 <= C(a(n),2). - Frank Ruskey, Nov 06 2007
a(n) = inverse (frequency distribution) sequence of A161680. - Jaroslav Krizek, Jun 19 2009
Taken as a triangle t(n, m) with offset 1, i.e., n >= m >= 1, this gives all positive integer limits r = r (a = m, b = A063929(n, m)) of the (a,b)-Fibonacci ratio F(a,b;k+1)/F(a,b;k) for k -> infinity. See the Jan 11 2015 comment on A063929. - Wolfdieter Lang, Jan 12 2015
Square array, T(n,k) = n + k + 2, n > = 0 and k >= 0, read by antidiagonals. Northwest corner:
2, 3, 4, 5, ...
3, 4, 5, 6, ...
4, 5, 6, 7, ...
5, 6, 7, 8, ...
... - Franck Maminirina Ramaharo, Nov 21 2018
a(n) is the pair chromatic number of an empty graph with n vertices. (The pair chromatic number of a graph G is the smallest number of colors for which G has a coloring where every vertex has two distinct colors, no adjacent vertices have a common color, and no pair of colors is repeated.) - Allan Bickle, Dec 26 2021

Examples

			(a,b)-Fibonacci ratio limits r(a,b) (see a comment above): as a triangle with offset 1 one has t(3, m) = 4 for m = 1, 2, 3. This gives the limits r(a = m,b = A063929(3, m)), i.e., r(1,12) = r(2,8) = r(3,4) = 4 (and the limit 4 appears only for these three (a,b) values). - _Wolfdieter Lang_, Jan 12 2015
		

Crossrefs

Programs

  • Magma
    [Round(Sqrt(2*(n-1)))+1: n in [2..60]]; // Vincenzo Librandi, Jun 23 2011
    
  • Maple
    seq(n$(n-1),n=2..15); # Robert Israel, Jan 12 2015
  • Mathematica
    Flatten[Table[PadRight[{},n-1,n],{n,15}]] (* Harvey P. Dale, Feb 26 2012 *)
  • PARI
    t1(n)=floor(3/2+sqrt(2*n-2)) /* A003057 */
    
  • PARI
    t2(n)=n-1-binomial(floor(1/2+sqrt(2*n-2)),2) /* A002260(n-2) */
    
  • Python
    from math import isqrt
    def A003057(n): return (k:=isqrt(m:=n-1<<1))+int((m<<2)>(k<<2)*(k+1)+1)+1 # Chai Wah Wu, Jul 26 2022

Formula

a(n) = A002260(n) + A004736(n).
a(n) = A002024(n-1) + 1 = floor(sqrt(2*(n - 1)) + 1/2) + 1 = round(sqrt(2*(n - 1))) + 1. - Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 21 2003
a(n) = ceiling((sqrt(8*n - 7) + 1)/2). - Reinhard Zumkeller, Aug 28 2001, modified by Frank Ruskey, Nov 06 2007, restored by M. F. Hasler, Jan 13 2015
a(n) = A080036(n-1) - (n - 1) for n >= 2. - Jaroslav Krizek, Jun 19 2009
G.f.: (2*x^2 + Sum_{n>=2} x^(n*(n - 1)/2 + 2))/(1 - x) = (x^2 + x^(15/8)*theta_2(0,sqrt(x))/2)/(1 - x) where theta_2 is the second Jacobi theta function. - Robert Israel, Jan 12 2015

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 21 2003

A055096 Triangle read by rows, sums of 2 distinct nonzero squares: T(n,k) = k^2+n^2, (n>=2, 1 <= k <= n-1).

Original entry on oeis.org

5, 10, 13, 17, 20, 25, 26, 29, 34, 41, 37, 40, 45, 52, 61, 50, 53, 58, 65, 74, 85, 65, 68, 73, 80, 89, 100, 113, 82, 85, 90, 97, 106, 117, 130, 145, 101, 104, 109, 116, 125, 136, 149, 164, 181, 122, 125, 130, 137, 146, 157, 170, 185, 202, 221, 145, 148, 153, 160
Offset: 2

Views

Author

Antti Karttunen, Apr 04 2000

Keywords

Comments

Discovered by Bernard Frénicle de Bessy (1605?-1675). - Paul Curtz, Aug 18 2008
Terms that are not hypotenuses in primitive Pythagorean triangles, are replaced by 0 in A222946. - Reinhard Zumkeller, Mar 23 2013
This triangle T(n,k) gives the circumdiameters for the Pythagorean triangles with a = (n+1)^2 - k^2, b = 2*(n+1)*k and c = (n+1)^2 + k^2 (see the Floor van Lamoen entries or comments A063929, A063930, A002283, A003991). See also the formula section. Note that not all Pythagorean triangles are covered, e.g., (9,12,15) does not appear. - Wolfdieter Lang, Dec 03 2014

Examples

			The triangle T(n, k) begins:
n\k   1   2   3   4   5   6   7   8   9  10  11 ...
2:    5
3:   10  13
4:   17  20  25
5:   26  29  34  41
6:   37  40  45  52  61
7:   50  53  58  65  74  85
8:   65  68  73  80  89 100 113
9:   82  85  90  97 106 117 130 145
10: 101 104 109 116 125 136 149 164 181
11: 122 125 130 137 146 157 170 185 202 221
12: 145 148 153 160 169 180 193 208 225 244 265
...
13: 170 173 178 185 194 205 218 233 250 269 290 313,
14: 197 200 205 212 221 232 245 260 277 296 317 340 365,
15: 226 229 234 241 250 261 274 289 306 325 346 369 394 421,
16: 257 260 265 272 281 292 305 320 337 356 377 400 425 452 481,
...
Formatted and extended by _Wolfdieter Lang_, Dec 02 2014 (reformatted Jun 11 2015)
The successive terms are (1^2+2^2), (1^2+3^2), (2^2+3^2), (1^2+4^2), (2^2+4^2), (3^2+4^2), ...
		

Crossrefs

Sorting gives A024507. Count of divisors: A055097, Möbius: A055132. For trinv, follow A055088.
Cf. A001844 (right edge), A002522 (left edge), A033429 (central column).

Programs

  • Haskell
    a055096 n k = a055096_tabl !! (n-1) !! (k-1)
    a055096_row n = a055096_tabl !! (n-1)
    a055096_tabl = zipWith (zipWith (+)) a133819_tabl a140978_tabl
    -- Reinhard Zumkeller, Mar 23 2013
    
  • Magma
    [n^2+k^2: k in [1..n-1], n in [2..15]]; // G. C. Greubel, Apr 19 2023
    
  • Maple
    sum2distinct_squares_array := (n) -> (((n-((trinv(n-1)*(trinv(n-1)-1))/2))^2)+((trinv(n-1)+1)^2));
  • Mathematica
    T[n_, k_]:= (n+1)^2 + k^2; Table[T[n, k], {n,15}, {k,n}]//Flatten (* Jean-François Alcover, Mar 16 2015, after Reinhard Zumkeller *)
  • SageMath
    def A055096(n,k): return n^2 + k^2
    flatten([[A055096(n,k) for k in range(1,n)] for n in range(2,16)]) # G. C. Greubel, Apr 19 2023

Formula

a(n) = sum2distinct_squares_array(n).
T(n, 1) = A002522(n).
T(n, n-1) = A001844(n-1).
T(2*n-2, n-1) = A033429(n-1).
T(n,k) = A133819(n,k) + A140978(n,k) = (n+1)^2 + k^2, 1 <= k <= n. - Reinhard Zumkeller, Mar 23 2013
T(n, k) = a*b*c/(2*sqrt(s*(s-1)*(s-b)*(s-c))) with s =(a + b + c)/2 and the substitution a = (n+1)^2 - k^2, b = 2*(n+1)*k and c = (n+1)^2 + k^2 (the circumdiameter for the considered Pythagorean triangles). - Wolfdieter Lang, Dec 03 2014
From Bob Selcoe, Mar 21 2015: (Start)
T(n,k) = 1 + (n-k+1)^2 + Sum_{j=0..k-2} (4*j + 2*(n-k+3)).
T(n,k) = 1 + (n+k-1)^2 - Sum_{j=0..k-2} (2*(n+k-3) - 4*j).
Therefore: 4*(n-k+1) + Sum_{j=0..k-2} (2*(n-k+3) + 4*j) = 4*n(k-1) - Sum_{j=0..k-2} (2*(n+k-3) - 4*j). (End)
From G. C. Greubel, Apr 19 2023: (Start)
T(2*n-3, n-1) = A033429(n-1).
T(2*n-4, n-2) = A079273(n-1).
T(2*n-2, n) = A190816(n).
T(3*n-4, n-1) = 10*A000290(n-1) = A033583(n-1).
Sum_{k=1..n-1} T(n, k) = A331987(n-1).
Sum_{k=1..floor(n/2)} T(n-k, k) = A226141(n-1). (End)

Extensions

Edited: in T(n, k) formula by Reinhard Zumkeller k < n replaced by k <= n. - Wolfdieter Lang, Dec 02 2014
Made definition more precise, changed offset to 2. - N. J. A. Sloane, Mar 30 2015

A001283 Triangle read by rows, in which row n consists of n(n+m) for m = 1 .. n-1.

Original entry on oeis.org

6, 12, 15, 20, 24, 28, 30, 35, 40, 45, 42, 48, 54, 60, 66, 56, 63, 70, 77, 84, 91, 72, 80, 88, 96, 104, 112, 120, 90, 99, 108, 117, 126, 135, 144, 153, 110, 120, 130, 140, 150, 160, 170, 180, 190, 132, 143, 154, 165, 176, 187, 198, 209, 220, 231, 156, 168, 180
Offset: 2

Views

Author

Keywords

Comments

With a different offset: triangle read by rows: t(n, m) = T(n+1, m) = (n+1)(n+m+1) = radius of C-excircle of Pythagorean triangle with sides a=(n+1)^2-m^2, b=2*(n+1)*m and c=(n+1)^2+m^2. - Floor van Lamoen, Aug 21 2001

Examples

			The triangle T(n, m) begins:
n\m   1   2   3   4   5   6   7   8   9  10  11  12  13  14 ...
2:    6
3:   12  15
4:   20  24  28
5:   30  35  40  45
6:   42  48  54  60  66
7:   56  63  70  77  84  91
8:   72  80  88  96 104 112 120
9:   90  99 108 117 126 135 144 153
10: 110 120 130 140 150 160 170 180 190
11: 132 143 154 165 176 187 198 209 220 231
12: 156 168 180 192 204 216 228 240 252 264 276
13: 182 195 208 221 234 247 260 273 286 299 312 325
14: 210 224 238 252 266 280 294 308 322 336 350 364 378
15: 240 255 270 285 300 315 330 345 360 375 390 405 420 435
...
[Reformatted and extended by _Wolfdieter Lang_, Dec 02 2014]
----------------------------------------------------------------
		

Crossrefs

Row sums are in A085788. Central column is A033581.

Programs

  • Mathematica
    Flatten[Table[n*(n+m), {n, 2, 10}, {m, n-1}]] (* T. D. Noe, Jun 27 2012 *)

Formula

T(n, m) = n*(n+m), n-1 >= m >= 1.

Extensions

Edited comment by Wolfdieter Lang, Dec 02 2014

A063930 Radius of B-excircle of Pythagorean triangle with a=(n+1)^2-m^2, b=2*(n+1)*m and c=(n+1)^2+m^2.

Original entry on oeis.org

3, 4, 10, 5, 12, 21, 6, 14, 24, 36, 7, 16, 27, 40, 55, 8, 18, 30, 44, 60, 78, 9, 20, 33, 48, 65, 84, 105, 10, 22, 36, 52, 70, 90, 112, 136, 11, 24, 39, 56, 75, 96, 119, 144, 171, 12, 26, 42, 60, 80, 102, 126, 152, 180, 210, 13, 28, 45, 64, 85, 108, 133, 160, 189, 220
Offset: 1

Views

Author

Floor van Lamoen, Aug 21 2001

Keywords

Comments

See a comment for excircle and exradius on A063929, also for links.

Examples

			The triangle T(n, m) begins:
n\m  1  2  3  4   5   6   7   8   9  10  11  12  13  14  15 ...
1:   3
2:   4 10
3:   5 12 21
4:   6 14 24 36
5:   7 16 27 40  55
6:   8 18 30 44  60  78
7:   9 20 33 48  65  84 105
8:  10 22 36 52  70  90 112 136
9:  11 24 39 56  75  96 119 144 171
10: 12 26 42 60  80 102 126 152 180 210
11: 13 28 45 64  85 108 133 160 189 220 253
12: 14 30 48 68  90 114 140 168 198 230 264 300
13: 15 32 51 72  95 120 147 176 207 240 275 312 351
14: 16 34 54 76 100 126 154 184 216 250 286 324 364 406
15: 17 36 57 80 105 132 161 192 225 260 297 336 377 420 465
...
[Formatted and extended by _Wolfdieter Lang_, Dec 02 2014]
		

Crossrefs

Cf. A003991 (inradius), A063929 (A-exradius), A001283 (C-exradius), A055096 (circumradius diameter).

Formula

T(n,m) = m(n+m+1), n >= m >= 1.
T(n,m) = sqrt(s*(s-a)*(s-c)/(s-b)) with the semiperimeter s = (a + b + c)/2, and the a, b and c values given in the name substituted. - Wolfdieter Lang, Dec 02 2014

Extensions

Crossreferences commented and A055096 added by Wolfdieter Lang, Dec 02 2014

A265611 a(n) = a(n-1) + floor((n-1)/2) - (-1)^n + 2 for n>=2, a(0)=1, a(1)=3.

Original entry on oeis.org

1, 3, 4, 8, 10, 15, 18, 24, 28, 35, 40, 48, 54, 63, 70, 80, 88, 99, 108, 120, 130, 143, 154, 168, 180, 195, 208, 224, 238, 255, 270, 288, 304, 323, 340, 360, 378, 399, 418, 440, 460, 483, 504, 528, 550, 575, 598, 624, 648, 675, 700, 728, 754, 783, 810, 840
Offset: 0

Views

Author

Peter Luschny, Dec 17 2015

Keywords

Crossrefs

Cf. A084964 and A097065, after the first 3: a(n+1) - a(n) for n>0.
Cf. A055998, after 3: a(n+1) + a(n) for n>0.
Cf. A063929: a(2*n+1) gives the second column of the triangle; for n>0, a(2*n) gives the third column.

Programs

  • Magma
    [1] cat [(2*n*(n+6)-5*(-1)^n+5)/8: n in [1..60]]; // Bruno Berselli, Dec 18 2015
  • Maple
    A265611 := proc(n) iquo(n+1,2); %*(%+irem(n+1,2)+2)+0^n end:
    seq(A265611(n), n=0..55);
  • Mathematica
    Join[{1}, Table[(2 n (n + 6) - 5 (-1)^n + 5)/8, {n, 1, 60}]] (* Bruno Berselli, Dec 18 2015 *)
  • PARI
    Vec((x^4-2*x^3+2*x^2-x-1)/(x^4-2*x^3+2*x-1) + O(x^1000)) \\ Altug Alkan, Dec 18 2015
    
  • Sage
    # The initial values x, y = 0, 1 give the quarter-squares A002620.
    def A265611():
        x, y = 1, 2
        while True:
           yield x
           x, y = x + y, x//y + 1
    a = A265611(); print([next(a) for i in range(60)])
    

Formula

O.g.f.: (x^4-2*x^3+2*x^2-x-1)/(x^4-2*x^3+2*x-1).
E.g.f.: 1-(5/8)*exp(-x)+(1/8)*(5+14*x+2*x^2)*exp(x).
a(2*n) = n*(n+3) + 0^n = A028552(n) + 0^n. [Here 0^0 = 1, otherwise 0^s = 0. - N. J. A. Sloane, Aug 26 2022]
a(2*n+1) = (n+1)*(n+3) = A005563(n+1).
a(n+1) - a(n) = floor(n/2) + 2 + (-1)^n - 0^n.
a(n) = a(-n-6) = (2*n*(n+6) - 5*(-1)^n + 5)/8 for n>0, a(0)=1. [Bruno Berselli, Dec 18 2015]
For n>0, a(n) = n + 1 + Sum_{i=1..n+1} floor(i/2) + (-1)^i = n + floor((n+1)^2/4) + (1 - (-1)^n)/2. - Enrique Pérez Herrero, Dec 18 2015
Sum_{n>=0} 1/a(n) = 85/36. - Enrique Pérez Herrero, Dec 18 2015
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n>5. - R. H. Hardin, Dec 21 2015, proved by Susanne Wienand for the algorithm sent to the seqfan mailing list and used in the Sage script below.
a(n) = A002620(n+1) + A052928(n+1) for n>=1. (Note A198442(n) = A002620(n+2) - A052928(n+2) for n>=1.) - Peter Luschny, Dec 22 2015
a(n) = (floor((n+3)/2)-1)*(ceiling((n+3)/2)+1) for n>0. - Wesley Ivan Hurt, Mar 30 2017

A249973 Positive integers A when the positive roots of r^2 = Ar + B are listed in increasing order.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 3, 1, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 1, 2, 3, 4, 1, 2, 3, 1, 4, 2, 1, 3, 2, 4, 1, 3, 2, 1, 4, 3, 2, 1, 4, 3, 2, 1, 1, 2, 3, 4, 5, 1, 2, 3, 4, 1, 2, 5, 3, 1, 4, 2, 1, 3, 5, 2, 4, 1, 3, 2, 5, 1, 4, 3
Offset: 1

Views

Author

Kerry Mitchell, Nov 09 2014

Keywords

Comments

Generalize the Fibonacci sequence recurrence equation as: F_(n+1) = A*F_n + B*F_(n-1), where A and B are positive integers. As n goes to infinity, the ratio F_n / F_(n-1) approaches the positive real number r = (A + sqrt(A*A + 4B))/2. This sequence gives the A values in increasing order of r.
In case of a tie in r values, then sort in increasing order of sqrt(A*A + B*B).
This A sequence appears to be the ordinal transform of the B sequence (A249974) and vice versa. The associative arrays of A and B are transposes. The first row of A's associative array seems to be A006000.
For the A and B values leading to a positive integer limit r see a comment in A063929. - Wolfdieter Lang, Jan 12 2015

Examples

			a(6) = 2 because the 6th smallest value of r (approximately 2.732050808) is that for A=2, B=2.
		

Crossrefs

Programs

Extensions

Edited. - Wolfdieter Lang, Jan 11 2015
Showing 1-6 of 6 results.