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

A382069 Row sums of the triangular array in A199408.

Original entry on oeis.org

1, 4, 10, 18, 31, 42, 64, 80, 105, 128, 166, 182, 235, 262, 300, 344, 409, 432, 514, 538, 607, 674, 760, 776, 885, 952, 1026, 1086, 1219, 1230, 1396, 1440, 1545, 1652, 1738, 1794, 1999, 2074, 2176, 2240, 2461, 2472, 2710, 2758, 2871, 3062, 3244, 3240, 3493
Offset: 1

Views

Author

Ctibor O. Zizka, Mar 14 2025

Keywords

Examples

			n = 3: a(3) = 3 + 4 + 3 = 10.
n = 4: a(4) = 4 + 4 + 6 + 4 = 18.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := (e*(p-1)/p + 1) * p^e; a[n_] := n*(3*n+1)/2 - Times @@ f @@@ FactorInteger[n]; Array[a, 50] (* Amiram Eldar, Mar 14 2025 *)

Formula

a(n) = A000217(n) + A000290(n) - A018804(n).
a(A000040(n)) = A001248(n) + A006093(n)*A040976(n)/2.
a(A000040(n)) = A001248(n) + A087397(n) for n > 2.

A074712 Number of (interiors of) cells touched by a diagonal in a regular n X k grid (enumerated antidiagonally).

Original entry on oeis.org

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

Views

Author

Jens Voß, Sep 04 2002

Keywords

Comments

From Yifan Xie, Nov 17 2024: (Start)
A(n, k) is the minimum sum of side lengths of squares that exactly cover a n X k rectangle.
A(n, k) is the minimum number of nonzero elements of a n X k matrix such that the sum of each row is n, and the sum of each column is k.
(End)

Examples

			The square array A(n,k) (n >= 1, k >= 1) begins:
  1 2  3  4  5  6  7  8
  2 2  4  4  6  6  8  8
  3 4  3  6  7  6  9 10
  4 4  6  4  8  8 10  8
  5 6  7  8  5 10 11 12
  6 6  6  8 10  6 12 12
  7 8  9 10 11 12  7 14
  8 8 10  8 12 12 14  8
  ...
From _Seiichi Manyama_, Apr 05 2025: (Start)
The triangle T(n,k) (1 <= k <= n) begins:
   1;
   2,  2;
   3,  2,  3;
   4,  4,  4,  4;
   5,  4,  3,  4,  5;
   6,  6,  6,  6,  6,  6;
   7,  6,  7,  4,  7,  6,  7;
   8,  8,  6,  8,  8,  6,  8,  8;
   9,  8,  9,  8,  5,  8,  9,  8,  9;
  10, 10, 10, 10, 10, 10, 10, 10, 10, 10;
  ... (End)
		

Crossrefs

Programs

  • Maple
    A074712 := proc(m,n) local d: d:=gcd(m,n): if(d=1)then return m+n-1: else return d*procname(m/d,n/d): fi: end: seq(seq(A074712(n-d+1,d),d=1..n),n=1..8); # Nathaniel Johnston, May 09 2011
  • Mathematica
    A[m_,n_]=m+n-GCD[m,n];Table[A[m,s-m],{s,2,10},{m,1,s-1}]//Flatten (* Luc Rousseau, Sep 16 2017 *)
  • PARI
    (A(n,k)=n+k-gcd(n,k));for(s=2,10,for(n=1,s-1,k=s-n;print1(A(n,k),", "))) \\ Luc Rousseau, Sep 16 2017

Formula

A(n, k) = n + k - 1 if n and k are coprime; A(n, k) = d * A(n/d, k/d) where d is the greatest common divisor of n and k, otherwise.
A(n, k) = n + k - gcd(n, k). - Luc Rousseau, Sep 15 2017
T(n,k) = A(k,n-k+1) = n+1 - A050873(n+1,k). - Seiichi Manyama, Apr 05 2025

A226246 Triangle T(n, k), read by rows 1<=n, 1<=k<=n: Number of cells touched by a unit-width diagonal in a regular n X k grid.

Original entry on oeis.org

1, 2, 4, 3, 6, 7, 4, 8, 10, 10, 5, 8, 11, 14, 13, 6, 10, 14, 14, 16, 16, 7, 12, 13, 16, 19, 20, 19, 8, 14, 16, 20, 20, 22, 24, 22, 9, 14, 17, 18, 21, 22, 25, 28, 25, 10, 16, 20, 20, 26, 24, 28, 30, 30, 28, 11, 18, 21, 22, 25, 26, 29, 30, 33, 34, 31
Offset: 1

Views

Author

Andrew Woods, Jun 01 2013

Keywords

Examples

			A paintbrush of unit width is dragged centrally along the diagonal of a rectangular 5 X 7 grid. The number of squares in the grid which contain paint in their interiors is T(5,7) = 19.
		

References

  • J. D. E. Konhauser, D. J. Velleman and S. Wagon, Which Way Did the Bicycle Go?, Cambridge University Press, 1996, page 179.

Crossrefs

The zero-width case is A199408 (or A074712).

Formula

Let g := gcd(n,k), r := sqrt(n*n+k*k)/2.
T(n,k) = n+k+g+2*(g*floor(r/g)-floor(r/min(n,k))-1).
Showing 1-3 of 3 results.