A319515 Second term of the simple continued fraction of (Sum_{k=1..n} k^k)/(n^n).
1, 4, 5, 8, 10, 13, 16, 19, 21, 24, 27, 30, 32, 35, 38, 41, 43, 46, 49, 51, 54, 57, 60, 62, 65, 68, 70, 73, 76, 79, 81, 84, 87, 90, 92, 95, 98, 100, 103, 106, 109, 111, 114, 117, 119, 122, 125, 128, 130, 133, 136, 138, 141, 144, 147, 149, 152, 155, 158, 160, 163, 166, 168, 171, 174, 177
Offset: 1
Examples
a(1)=1 because the continued fraction of 1 is written as 0 + 1/1 = (0;1). a(3)=5 because (1 + 4 + 27)/27 = 1 + 5/27 = 1 + 1/(5 + 1/(2 + 1/2)) = (1;5,2,2).
Links
- G. W. Wishard and F. Underwood, Problem 4155, Amer. Math. Monthly, 53 (1946), 471.
Programs
-
Mathematica
a[1]=1; a[n_] := ContinuedFraction[Sum[k^k, {k, 1, n}]/n^n][[2]]; Array[a, 100]
-
PARI
a(n) = if (n==1, 1, contfrac(sum(k=1, n, k^k)/n^n)[2]); \\ Michel Marcus, Sep 23 2018
Comments