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.

A087560 Smallest m > n such that gcd(m, n^2) = n.

Original entry on oeis.org

2, 6, 6, 12, 10, 30, 14, 24, 18, 30, 22, 60, 26, 42, 30, 48, 34, 90, 38, 60, 42, 66, 46, 120, 50, 78, 54, 84, 58, 210, 62, 96, 66, 102, 70, 180, 74, 114, 78, 120, 82, 210, 86, 132, 90, 138, 94, 240, 98, 150, 102, 156, 106, 270, 110, 168, 114, 174, 118, 420, 122
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 24 2003

Keywords

Comments

Equals n multiplied by the least nontrivial number coprime to n. - Amarnath Murthy, Nov 20 2005

Crossrefs

Programs

  • Mathematica
    Table[n*Select[Prime[Range[Log2[n] + 1]], ! Divisible[n, #] &][[1]], {n, 61}] (* Ivan Neretin, May 21 2015 *)
  • PARI
    a(n) = forprime(p = 2, , if(n%p, return(n*p))); \\ Amiram Eldar, Feb 01 2025

Formula

a(n) = n*A053669(n).
A000005(a(n)) = 2*A000005(n) = A062011(n). - Reinhard Zumkeller, May 17 2006
Sum_{k=1..n} ~ c * n^2 / 2, where c = A249270. - Amiram Eldar, Feb 01 2025