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.

A110663 Triangle read by rows: T(n,k) = Sum_{j=k..n} phi(j) (1<=k<=n), where phi is Euler's totient function.

Original entry on oeis.org

1, 2, 1, 4, 3, 2, 6, 5, 4, 2, 10, 9, 8, 6, 4, 12, 11, 10, 8, 6, 2, 18, 17, 16, 14, 12, 8, 6, 22, 21, 20, 18, 16, 12, 10, 4, 28, 27, 26, 24, 22, 18, 16, 10, 6, 32, 31, 30, 28, 26, 22, 20, 14, 10, 4, 42, 41, 40, 38, 36, 32, 30, 24, 20, 14, 10, 46, 45, 44, 42, 40, 36, 34, 28, 24, 18, 14, 4
Offset: 1

Views

Author

Emeric Deutsch, Aug 02 2005

Keywords

Examples

			T(5,3) = 8 because phi(3)+phi(4)+phi(5) = 2+2+4 = 8.
Triangle begins:
1;
2,1;
4,3,2;
6,5,4,2;
10,9,8,6,4;
...
		

Crossrefs

Programs

  • Mathematica
    T[n_, n_] := EulerPhi[n]; T[n_, k_] := Sum[EulerPhi[j], {j, k, n}];
    Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* G. C. Greubel, Sep 03 2017 *)
  • PARI
    tabl(nn) = {for (n=1, nn, for (k=1, n, print1(sum(j=k, n, eulerphi(j)), ", ");); print(););} \\ Michel Marcus, Apr 05 2015

Formula

T(n,n) = phi(n) = A000010(n) = number of numbers <=n and relatively prime to n.
T(n,1) = Sum_{j=1..n} phi(j) = A002088(n).