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.

A338668 a(n) is the rightmost prime number in prime tower factorization of n; a(1) = 1.

Original entry on oeis.org

1, 2, 3, 2, 5, 3, 7, 3, 2, 5, 11, 3, 13, 7, 5, 2, 17, 2, 19, 5, 7, 11, 23, 3, 2, 13, 3, 7, 29, 5, 31, 5, 11, 17, 7, 2, 37, 19, 13, 5, 41, 7, 43, 11, 5, 23, 47, 3, 2, 2, 17, 13, 53, 3, 11, 7, 19, 29, 59, 5, 61, 31, 7, 3, 13, 11, 67, 17, 23, 7, 71, 2, 73, 37, 2
Offset: 1

Views

Author

Rémy Sigrist, Apr 23 2021

Keywords

Comments

The prime tower factorization of a number is defined in A182318.

Examples

			See Links section.
		

Crossrefs

Programs

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

Formula

a(n) <= n with equality iff n = 1 or n is a prime number.
a(n) = a(A053585(n)).