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.

A276269 a(n) = n + the largest (if n is even), or the smallest (if n is odd) prime factor of n if n > 1; and a(1)=1.

Original entry on oeis.org

1, 4, 6, 6, 10, 9, 14, 10, 12, 15, 22, 15, 26, 21, 18, 18, 34, 21, 38, 25, 24, 33, 46, 27, 30, 39, 30, 35, 58, 35, 62, 34, 36, 51, 40, 39, 74, 57, 42, 45, 82, 49, 86, 55, 48, 69, 94, 51, 56, 55, 54, 65, 106, 57, 60, 63, 60, 87, 118, 65, 122, 93, 66, 66, 70, 77, 134
Offset: 1

Views

Author

Michel Marcus, Aug 26 2016

Keywords

Comments

This is the underlying sequence for sequence A256393.
a(n) is never prime, since for n>1 it is alternatively divisible by A006530(n) then by A020639(n). This explains the existence of the sequences noted [p] in A256393 comments. There are also such [c] sequences where c is composite like for instance for c=8.

Crossrefs

Cf. A006530 (Gpf), A020639 (Lpf), A256393.

Programs

  • PARI
    a(n) = if (n==1, 1, my(f = factor(n)); if (n % 2, n + f[1,1], n + f[#f~, 1]));