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.

A214720 Least m>0 such that n^2-m and n-m are relatively prime.

Original entry on oeis.org

2, 1, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 7, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 7, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2
Offset: 1

Views

Author

Clark Kimberling, Jul 27 2012

Keywords

Examples

			a(12) = 5 because of the following:
gcd(144-1,11) > 1,
gcd(144-2,10) > 1 ,
gcd(144-3,9) > 1,
gcd(144-4,8) >1,
gcd(144-5,7) = 1.
		

Crossrefs

Programs

  • Maple
    A214720 := proc(n)
        for m from 1 do
            if igcd(n^2-m,n-m) =1  then
                return m;
            end if;
        end do:
    end proc: # R. J. Mathar, Mar 30 2014
  • Mathematica
    Table[m = 1; While[GCD[5^n - m, n - m] != 1, m++]; m, {n, 1, 140}]