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.

A054347 Partial sums of A000201.

Original entry on oeis.org

0, 1, 4, 8, 14, 22, 31, 42, 54, 68, 84, 101, 120, 141, 163, 187, 212, 239, 268, 298, 330, 363, 398, 435, 473, 513, 555, 598, 643, 689, 737, 787, 838, 891, 946, 1002, 1060, 1119, 1180, 1243, 1307, 1373, 1440, 1509, 1580, 1652, 1726, 1802, 1879
Offset: 0

Views

Author

N. J. A. Sloane, May 06 2000

Keywords

Comments

From Michel Dekking, Aug 19 2019: (Start)
Limit_{n->oo} a(n)/(n*(n+1)) = phi/2.
Proof: Let {alpha} be the fractional part of a real number alpha and let [alpha] = floor(alpha).
a(n) = [phi] + [2*phi] + ... + [n*phi] = phi + {phi} + 2*phi + {2*phi} + ... + n*phi + {n*phi} = n*(n+1)*phi/2 + [{phi} + {2*phi} + ... + {n*phi}].
When we divide by n*(n+1) this tends to phi/2, since the second term is bounded by n.
(End)

Crossrefs

Cf. A000201.

Programs

  • Mathematica
    Accumulate[Table[Floor[GoldenRatio n], {n, 0, 30}]] (* Birkas Gyorgy, May 06 2011 *)
  • PARI
    for(n=0,50, print1(sum(k=0,n, floor(k*(1+sqrt(5))/2)), ", ")) \\ G. C. Greubel, Oct 06 2017
    
  • Python
    from math import isqrt
    from itertools import count, islice, accumulate
    def A054347_gen(): # generator of terms
        return accumulate(n+isqrt(5*n**2)>>1 for n in count(0))
    A054347_list = list(islice(A054347_gen(),30)) # Chai Wah Wu, Aug 29 2022

Formula

a(n) = floor(n*(n+1)/2*phi - n/2) + 0 or +1. - Benoit Cloitre, Oct 03 2003
a(n) = floor(n*(n+1)/2*phi - n/2) + 0, +1, or -1 (n = 7920, 18762, 18851, ...), or +2 (n = 12815, 15841, 30358, 30382, ...) if n < 2000000. - Birkas Gyorgy, May 06 2011