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.

A165942 For a nonnegative integer n, define dsf(n) = n_1^{n_1}+n_2^{n_2}+n_3^{n_3} + n_m^{n_m}, where {n_1,n_2,n_3,...n_m} lists digits of n. Then starting with a(1) = 3418, a(n+1) = dsf(a(n)).

Original entry on oeis.org

3418, 16777500, 2520413, 3418, 16777500, 2520413, 3418, 16777500, 2520413, 3418, 16777500, 2520413, 3418, 16777500, 2520413, 3418, 16777500, 2520413, 3418, 16777500, 2520413, 3418, 16777500, 2520413, 3418, 16777500, 2520413, 3418, 16777500, 2520413
Offset: 1

Views

Author

Ryohei Miyadera, Daisuke Minematsu and Taishi Inoue, Oct 01 2009

Keywords

Comments

Period 3. In fact there are only 8 such loops among all the nonnegative integers for the "dsf" function that we defined.

Examples

			a(2) = dsf(a(1)) = dsf(3418) = 3^3+4^4+1^1+8^8 = 16777500; a(3) = dsf(16777500) = 1^1+6^6+7^7+7^7+7^7+5^5+0^0+0^0 = 2520413; a(4) = dsf(2520413) = 2^2+5^5+2^2+0^0+4^4+1^1+3^3 = 3418.
This is an iterative process that starts with 3418.
		

Crossrefs

dsf is A045503.

Programs

  • Mathematica
    dsf[n_] := Block[{m = n, t}, t = IntegerDigits[m]; Sum[Max[1, t[[k]]]^t[[k]], {k, Length[t]}]]; NestList[dsf, 3418, 6]
    LinearRecurrence[{0, 0, 1},{3418, 16777500, 2520413},30] (* Ray Chandler, Aug 25 2015 *)

Extensions

Cross-reference from Charles R Greathouse IV, Nov 01 2009
Edited by Charles R Greathouse IV, Mar 18 2010
Extended by Ray Chandler, Aug 25 2015