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.

A213544 Sum of numerators of Farey Sequence of order n.

Original entry on oeis.org

1, 2, 5, 9, 19, 25, 46, 62, 89, 109, 164, 188, 266, 308, 368, 432, 568, 622, 793, 873, 999, 1109, 1362, 1458, 1708, 1864, 2107, 2275, 2681, 2801, 3266, 3522, 3852, 4124, 4544, 4760, 5426, 5768, 6236, 6556, 7376, 7628, 8531, 8971, 9511, 10017, 11098, 11482
Offset: 1

Views

Author

Anunay Kulshrestha, Jun 14 2012

Keywords

Examples

			For n = 3, the Farey Sequence is 0/1, 1/3, 1/2, 2/3, 1/1. Thus a(3) = 0 + 1 + 1 + 2 + 1 = 5.
		

Crossrefs

Similar to A133404 and A191607.
Partial sums of A023896.

Programs

  • Maple
    with(numtheory):
    b:= n-> `if`(n=1, 1, n*phi(n)/2):
    a:= proc(n) option remember; b(n) +`if`(n>1, a(n-1), 0) end:
    seq(a(n), n=1..60);  # Alois P. Heinz, Jun 14 2012
  • Mathematica
    Farey[n_] := Union[ Flatten[ Join[{0}, Table[a/b, {b, n}, {a, b}]]]]; Table[ Total[ Numerator[ Farey[ n]]], {n, 0, 53}] (* Robert G. Wilson v, Apr 15 2014 *)
    a[n_] := Sum[If[CoprimeQ[j, k], j, 0], {k, 1, n}, {j, 1, k}]; Table[a[n], {n, 1, 48}] (* Jean-François Alcover, Dec 29 2014 *)
    Table[Total[Numerator[FareySequence[n]]],{n,50}] (* Harvey P. Dale, Apr 21 2025 *)

Formula

a(n) = Sum_{k=1..n} A023896(k).
a(n) = A240877(n)/2. - Robert G. Wilson v, Apr 15 2014
a(n) ~ n^3/Pi^2 - Jean-François Alcover, Dec 29 2014
a(n) = (A011755(n)+1)/2. - Chai Wah Wu, Apr 04 2022