A138908 a(n) = d^d, where d is the number of digits in n.
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27
Offset: 0
Programs
-
Mathematica
dd[n_]:=Module[{d=IntegerLength[n]},d^d]; Join[{1},Array[dd,150]] (* Harvey P. Dale, Mar 16 2013 *)
-
PARI
a(n) = my(d=#Str(n)); d^d; \\ Michel Marcus, Nov 18 2020
Formula
From Amiram Eldar, Nov 18 2020: (Start)
Sum_{n>=1} 1/a(n) = A308314. (End)
Extensions
Edited by N. J. A. Sloane, Sep 29 2011, at the suggestion of Franklin T. Adams-Watters
Comments