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.

A109496 a(n) is the first integer k for which b(b(...b(n)...))=5, where the transformation b(m), the m-th term of A008474, is taken k-1 times.

Original entry on oeis.org

1, 4, 3, 2, 2, 3, 4, 3, 6, 5, 4, 5, 4, 3, 5, 4, 4, 5, 4, 3, 4, 5, 5, 4, 8, 7, 5, 4, 6, 5, 6, 3, 6, 5, 4, 5, 6, 5, 7, 6, 5, 6, 5, 4, 3, 4, 6, 4, 4, 3, 4, 7, 4, 7, 7, 6, 8, 7, 7, 3, 5, 6, 7, 6, 5, 5, 5, 4, 8, 7, 5, 4, 5, 5, 5, 4, 4, 6, 7, 6, 4, 6, 6, 5, 7, 6, 6, 5, 4, 7, 6, 5, 5, 4, 5, 5, 6, 5, 7, 6, 4, 5, 5, 4, 6
Offset: 5

Views

Author

Y. Kallus (yoav(AT)rice.edu), Aug 29 2005

Keywords

Examples

			a(6)=4 because b(6=2^1*3^1)=7, b(7=7^1)=8, b(8=2^3)=5, so we apply b(m) 3 times to get 5.
		

Crossrefs

Cf. A008474.

Programs

  • Mathematica
    f[n_] := Sum[FactorInteger[n][[i]][[1]] + FactorInteger[n][[i]][[2]], { i, Length[FactorInteger[n]]}] g[t_, n_] := If[t == 1, n, f[g[t - 1, n]]]; a[n_] := Position[Array[g[ #, n] &, 100], 5, {1}, 1][[1, 1]]