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.

A106464 Antidiagonal sums of number triangle A003989.

Original entry on oeis.org

1, 1, 2, 3, 3, 4, 6, 6, 5, 11, 6, 9, 15, 12, 8, 18, 9, 21, 22, 15, 11, 32, 20, 18, 27, 31, 14, 45, 15, 32, 36, 24, 41, 57, 18, 27, 43, 60, 20, 66, 21, 51, 72, 33, 23, 84, 42, 60, 57, 61, 26, 81, 67, 88, 64, 42, 29, 135, 30, 45, 105
Offset: 0

Views

Author

Paul Barry, May 03 2005

Keywords

Comments

Consider the triangle T(n, k) = A003989(n, k) = gcd(n-k+1, k), n >= 1, k = 1..n. Then a(n) = Sum_{k=0..floor(n/2)} T(n-k+1, k+1), for n >= 0. - R. J. Mathar, May 11 2018 [adjusted to the definition of A003989. - Wolfdieter Lang, May 12 2018]

Crossrefs

Programs

  • GAP
    Flat(List([0..70],n->Sum([0..Int(n/2)],k->Gcd(n-2*k+1,k+1)))); # Muniru A Asiru, May 15 2018
  • Maple
    f:= n -> add(igcd(n-2*k+1,k+1),k=0..n/2):
    map(f, [$0..100]); # Robert Israel, May 11 2018
  • Mathematica
    Array[Sum[GCD[# - 2 k + 1, k + 1], {k, 0, Floor[#/2]}] &, 61, 0] (* Michael De Vlieger, May 14 2018 *)
  • PARI
    a(n) = sum(k=0, n\2, gcd(n-2*k+1, k+1)); \\ Michel Marcus, May 11 2018
    

Formula

a(n) = Sum_{k=0..floor(n/2)} gcd(n-2*k+1, k+1). [corrected by R. J. Mathar, May 11 2018]

Extensions

Name corrected by R. J. Mathar, May 11 2018