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.

A271773 a(1) = 0, then a(n) is the maximum of all 0 < m < n for which n == a(m) (mod m).

Original entry on oeis.org

0, 1, 2, 1, 4, 1, 6, 3, 5, 1, 10, 1, 12, 9, 2, 1, 16, 1, 18, 7, 11, 1, 22, 5, 13, 3, 20, 1, 28, 1, 30, 21, 17, 7, 8, 1, 36, 25, 5, 1, 40, 1, 42, 39, 23, 1, 46, 7, 16, 33, 14, 1, 52, 11, 48, 19, 29, 1, 58, 1, 60, 15, 38, 13, 54, 1, 66, 45, 7, 1, 70, 1, 72, 27
Offset: 1

Views

Author

Peter Kagey, Apr 14 2016

Keywords

Examples

			a(1) = 0 by definition.
a(2) = 1 because a(1) == 2 (mod 1).
a(3) = 2 because a(2) == 3 (mod 2).
a(4) = 1 because a(1) == 4 (mod 1).
a(5) = 4 because a(4) == 5 (mod 4).
a(6) = 1 because a(1) == 6 (mod 1).
a(7) = 6 because a(6) == 7 (mod 6).
a(8) = 3 because a(3) == 8 (mod 3).
		

Crossrefs

Programs

  • Mathematica
    a[1] = 0; a[n_] := a[n] = Max@ Select[Range[n - 1], Mod[n, #] == Mod[a[#], #] &]; Table[a@ n, {n, 75}] (* Michael De Vlieger, Apr 15 2016 *)