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.

A130802 a(1) = 1; a(n+1) = Sum_{k=1..n} (a(k)-th integer from among those positive integers which are coprime to (n+1-k)).

Original entry on oeis.org

1, 1, 2, 4, 9, 20, 47, 110, 260, 614, 1448, 3421, 8081, 19092, 45107, 106567, 251768, 594816, 1405285, 3320066, 7843851, 18531547, 43781846, 103437135, 244376187, 577352823, 1364029309, 3222597827, 7613573030, 17987504932, 42496516727, 100400469160
Offset: 1

Views

Author

Leroy Quet, Aug 20 2007

Keywords

Examples

			The integers coprime to 5 are 1, 2, 3, 4, 6, ... The a(1)-th=1st of these is 1. The integers coprime to 4 are 1, 3, 5, ... The a(2)-th=1st of these is 1. The integers coprime to 3 are 1, 2, 4, 5, ... The a(3)-th=2nd of these is 2. The integers coprime to 2 are 1, 3, 5, 7, 9, ... The a(4)-th=4th of these is 7. And the integers coprime to 1 are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ... The a(5)-th=9th of these is 9. So a(6) = 1 + 1 + 2 + 7 + 9 = 20.
		

Crossrefs

Programs

  • Maple
    with(numtheory): fc:= proc(t,p) option remember; local m, j, h, pp; if p=1 then t else pp:= phi(p); m:= iquo(t,pp); j:= m*pp; h:= m*p-1; while jAlois P. Heinz, Aug 05 2009
  • Mathematica
    fc[t_, p_] := fc[t, p] = Module[{m, j, h, pp}, If[p == 1, t, pp = EulerPhi[p]; m = Quotient[t, pp]; j = m pp; h = m p - 1; While[j < t, h++; If[GCD[p, h] == 1, j++]]; h]];
    a[n_] := a[n] = If [n == 1, 1, Sum[fc[a[k], (n - k)], {k, 1, n - 1}]];
    Array[a, 35] (* Jean-François Alcover, Nov 19 2020, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, Aug 05 2009