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

A049829 a(n) = Sum_{k=1..n} T(n,k), array T as in A049828.

Original entry on oeis.org

0, 0, 1, 1, 5, 3, 10, 12, 14, 16, 33, 21, 41, 45, 46, 50, 74, 72, 99, 83, 97, 111, 158, 120, 148, 176, 181, 185, 243, 191, 262, 254, 282, 314, 313, 293, 363, 391, 418, 386, 480, 414, 529, 497, 501, 573, 660, 570, 626, 672, 699, 703
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A049828.

Programs

  • Maple
    T:=  proc(n,k) option remember;
    if n*k = 0 then 0 else (n mod k) + procname(k,n mod k) fi
    end proc:
    seq(add(T(n,k),k=1..n), n=1..100); # Robert Israel, Aug 31 2015
  • Mathematica
    T[n_, k_] := T[n, k] = If[n*k == 0, 0, Mod[n, k] + T[k, Mod[n, k]]];
    a[n_] := Sum[T[n, k], {k, 1, n}];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Sep 16 2022, after Robert Israel *)
  • PARI
    t(n, k) = {x = n; y = k; r = 1; s = 0; while (r, q = x\y; r = x - y*q; s +=r; x = y; y = r;); s;}
    a(n) = sum(k=1, n, t(n, k)); \\ Michel Marcus, Aug 31 2015

A049831 a(n) = Max_{k=1..n} T(n,k), array T as in A049828.

Original entry on oeis.org

0, 0, 1, 1, 3, 2, 4, 6, 5, 6, 8, 8, 11, 10, 9, 12, 12, 15, 15, 14, 19, 16, 19, 18, 19, 22, 21, 23, 26, 25, 27, 24, 27, 32, 27, 30, 33, 31, 33, 30, 35, 38, 35, 38, 40, 38, 44, 39, 44, 46, 43, 44, 47, 45, 53, 46, 49, 52, 50, 56, 54, 54, 57, 56
Offset: 1

Views

Author

Keywords

Comments

a(n)/n -> 1, while n goes to infinity (for proof see attached link). - Tiberiu Szocs-Mihai, Aug 17 2015

Crossrefs

Cf. A049828.

Programs

  • PARI
    a(nn) = {for (n=1, nn, m = 0; for (k=1, n, a = n; b = k; r = 1; s = 0; while (r, q = a\b; r = a - b*q; s += r; a = b; b = r); m = max(m, s);); print1(m, ", "););} \\ Michel Marcus, Aug 18 2015

A049830 a(n) = Sum_{k=1..n, m=1..k} T(m,k); array T as in A049828.

Original entry on oeis.org

0, 0, 1, 2, 7, 10, 20, 32, 46, 62, 95, 116, 157, 202, 248, 298, 372, 444, 543, 626, 723, 834, 992, 1112, 1260, 1436, 1617, 1802, 2045, 2236, 2498, 2752, 3034, 3348, 3661, 3954, 4317, 4708, 5126, 5512, 5992, 6406, 6935, 7432
Offset: 1

Views

Author

Keywords

Crossrefs

Partial sums of A049829.
Cf. A049828.

A049832 a(n) = T(n,n) + T(n + 1,n) + ... + T(2n-1,n) = sum over a period of n-th column of array T given by A049828.

Original entry on oeis.org

0, 1, 4, 7, 15, 18, 31, 40, 50, 61, 88, 87, 119, 136, 151, 170, 210, 225, 270, 273, 307, 342, 411, 396, 448, 501, 532, 563, 649, 626, 727, 750, 810, 875, 908, 923, 1029, 1094, 1159, 1166, 1300, 1275, 1432, 1443, 1491, 1608, 1741, 1698, 1802, 1897, 1974, 2029
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A049828.

Extensions

More terms from Sean A. Irvine, Aug 07 2021

A049833 a(n) = T(2n-1,n) + T(2n,n+1) + ... + T(3n-3,2n-2) = sum over a period of n-th diagonal of array T given by A049828.

Original entry on oeis.org

0, 1, 5, 13, 23, 40, 54, 80, 104, 131, 161, 209, 231, 288, 332, 376, 426, 499, 549, 631, 673, 748, 826, 940, 972, 1073, 1177, 1261, 1347, 1490, 1526, 1688, 1774, 1899, 2031, 2133, 2219, 2398, 2538, 2680, 2766, 2981, 3039, 3281, 3379, 3516, 3724, 3950, 4002
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A049828.

Extensions

More terms from Sean A. Irvine, Aug 07 2021

A261133 a(n) = Max{k from {1..n} | T(n,k) = A049831(n)}, where T(n,k) is the triangle defined at A049828.

Original entry on oeis.org

1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 7, 8, 9, 9, 10, 11, 11, 12, 13, 13, 14, 14, 15, 16, 16, 17, 17, 18, 19, 19, 20, 20, 21, 22, 22, 23, 23, 24, 25, 25, 26, 26, 27, 28, 28, 29, 29, 30, 31, 31, 32, 33, 33, 34, 34, 35, 36, 36, 37, 38, 38, 39
Offset: 1

Views

Author

Tiberiu Szocs-Mihai, Aug 10 2015

Keywords

Comments

For the n-th row of the triangle T(n,k) defined in A049828, a(n) is the largest index where the maximum of that row, namely A049831(n), is obtained.
Conjecture: a(n)/n -> (sqrt(5)-1)/2, see Szocs-Mihai link.

Crossrefs

Programs

  • PARI
    t(n, k) = {x = n; y = k; r = 1; s = 0; while (r, q = x\y; r = x - y*q; s +=r; x = y; y = r;); s;}
    row(n) = vector(n, k, t(n, k));
    a(n) = v = row(n); vm = vecmax(v); forstep(k=n, 1, -1, if (v[k] == vm, return(k))); \\ Michel Marcus, Aug 31 2015

A049834 Triangular array T given by rows: T(n,k)=sum of quotients when Euclidean algorithm acts on n and k; for k=1,2,...,n; n=1,2,3,...; also number of subtraction steps when computing gcd(n,k) using subtractions rather than divisions.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

First quotient=[ n/k ]=Q1; 2nd=[ k/(n-k*Q1) ]; ...
Number of squares in a greedy tiling of an n-by-k rectangle by squares. [David Radcliffe, Nov 14 2012]

Examples

			Rows:
1;
2,1;
3,3,1;
4,2,4,1;
5,4,4,5,1;
6,3,2,3,6,1;
7,5,5,5,5,7,1;
...
		

Crossrefs

Cf. A049828.
Row sums give A049835.
This is the lower triangular part of the square array in A072030.

Programs

  • Maple
    A049834 := proc(n,k)
        local a,b,r,s ;
        a := n ;
        b := k ;
        r := 1;
        s := 0 ;
        while r > 0 do
            q := floor(a/b);
            r := a-b*q ;
            s := s+q ;
            a := b;
            b := r;
        end do:
        s ;
    end proc: # R. J. Mathar, May 06 2016
    # second Maple program:
    T:= (n, k)-> add(i, i=convert(k/n, confrac)):
    seq(seq(T(n, k), k=1..n), n=1..14);  # Alois P. Heinz, Jan 31 2023
  • Mathematica
    T[n_, k_] := T[n, k] = Which[n < 1 || k < 1, 0, n == k, 1, n < k, T[k, n], True, 1 + T[k, n - k]];
    Table[T[n, k], {n, 1, 13}, {k, 1, n}] // Flatten (* Jean-François Alcover, Mar 29 2020 *)
  • PARI
    tabl(nn) = {for (n=1, nn, for (k=1, n, a = n; b = k; r = 1; s = 0; while (r, q = a\b; r = a - b*q; s += q; a = b; b = r); print1(s, ", ");); print(););} \\ Michel Marcus, Aug 17 2015
Showing 1-7 of 7 results.