|
|
A189663
|
|
Partial sums of A189661.
|
|
14
|
|
|
0, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 7, 7, 7, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 20, 20, 20, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 25, 25, 25, 26, 26, 26, 27, 27, 28, 28, 28, 29, 29, 30, 30, 30, 31
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 2*(n-1)-floor((n-1)*r), where r = (1+sqrt(5))/2 (the golden ratio). - corrected by R. J. Mathar, Sep 11 2011
a(n) = a(1+a(n-2))+a(n-1-a(n-2)), n>2. - Frank Ruskey, Dec 10 2011
a(1) = 0, a(2) = 1; a(n) = n - a(n-1) - a(n-a(n-1)) for n > 2. - Altug Alkan, Jun 24 2017
a(n) = ceiling((n-1)/r^2), where r = (1+sqrt(5))/2. - Jeffrey Shallit, Jul 02 2018
|
|
MATHEMATICA
|
Table[2 (n - 1) - Floor[(n - 1) (1 + Sqrt[5]) / 2], {n, 100}] (* Vincenzo Librandi, Jun 26 2017 *)
|
|
PROG
|
(Python)
l=[0, 0, 1]
for n in range(3, 101):
l.append(n - l[n - 1] - l[n - l[n - 1]])
(Python)
from math import isqrt
(Magma) [2*(n-1)-Floor((n-1)*(1+Sqrt(5))/2): n in [1..100]]; // Vincenzo Librandi, Jun 26 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|