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.

A074320 a(n) = sum of smallest and largest prime factors of n, for n>1; a(1)=2.

Original entry on oeis.org

2, 4, 6, 4, 10, 5, 14, 4, 6, 7, 22, 5, 26, 9, 8, 4, 34, 5, 38, 7, 10, 13, 46, 5, 10, 15, 6, 9, 58, 7, 62, 4, 14, 19, 12, 5, 74, 21, 16, 7, 82, 9, 86, 13, 8, 25, 94, 5, 14, 7, 20, 15, 106, 5, 16, 9, 22, 31, 118, 7, 122, 33, 10, 4, 18, 13, 134, 19, 26, 9, 142, 5, 146, 39, 8, 21, 18, 15
Offset: 1

Views

Author

Jason Earls, Sep 26 2002

Keywords

Comments

If n is prime, a(n) = 2n; the only prime factor, n itself, is taken as both the "smallest" and "largest" prime factor of n. - Jon E. Schoenfield, Jan 14 2015

Crossrefs

Programs

  • Mathematica
    f[n_]:=Transpose[FactorInteger[n]][[1]];Table[First[f[n]]+Last[f[n]],{n,200}] (* Vladimir Joseph Stephan Orlovsky, Apr 08 2011 *)
  • PARI
    a(n) = if (n==1, 2, my(f=factor(n)); f[1,1] + f[#f~,1]); \\ Michel Marcus, Jan 14 2015

Formula

a(n) = A020639(n) + A006530(n).