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.

A319515 Second term of the simple continued fraction of (Sum_{k=1..n} k^k)/(n^n).

Original entry on oeis.org

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

Views

Author

Greg Huber, Sep 21 2018

Keywords

Comments

Ignoring the first two terms, a(n+1) is very similar to floor(n*e) (the Beatty sequence for e, A022843). This breaks down at n=11, where a(12)=30 and floor(11*e)=29. The successive terms (or partial denominators) in the sequence differ by 3 except for semi-regular "glitches". For example, the pattern of differences is 313233323332333233233323323332333233233323323332332333233323323332... A natural conjecture is that the mean of these differences is asymptotic to e. The glitches are positioned between terms n and n+1, for values of n which begin 2,4,8,12,16,19,23,26,30,34,37,41,44,48,.... If one counts the 3's immediately preceding the 2's in the pattern of differences, one gets the "derivative" sequence 233323233232323323....

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).
		

Crossrefs

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