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.

A076563 a(n) = n - greatest prime divisor of n, for n>1.

Original entry on oeis.org

0, 0, 2, 0, 3, 0, 6, 6, 5, 0, 9, 0, 7, 10, 14, 0, 15, 0, 15, 14, 11, 0, 21, 20, 13, 24, 21, 0, 25, 0, 30, 22, 17, 28, 33, 0, 19, 26, 35, 0, 35, 0, 33, 40, 23, 0, 45, 42, 45, 34, 39, 0, 51, 44, 49, 38, 29, 0, 55, 0, 31, 56, 62, 52, 55, 0, 51, 46, 63, 0, 69, 0, 37, 70, 57, 66, 65, 0, 75
Offset: 2

Views

Author

Zak Seidov, Oct 19 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n-Last@(First/@FactorInteger[n]),{n,2,200}] (* Vladimir Joseph Stephan Orlovsky, Apr 08 2011 *)
  • PARI
    a(n) = n - vecmax(factor(n)[,1]); \\ Michel Marcus, Aug 07 2022
    
  • Python
    from sympy import factorint
    def a(n): return n - max(factorint(n))
    print([a(n) for n in range(2, 81)]) # Michael S. Branicky, Aug 07 2022

Formula

a(p) = 0 for prime p.
a(n) = n - A006530(n). - Michel Marcus, Jan 16 2015