login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A189663 Partial sums of A189661. 13
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
See A189661.
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
a(n) = A060144(n-1) + sign(abs(n-1)). - Primoz Pirnat, Dec 29 2020
MATHEMATICA
(See A189661.)
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]])
print(l[1:]) # Indranil Ghosh, Jun 24 2017, after Altug Alkan
(Python)
from math import isqrt
def A189663(n): return (n-1<<1)-(n-1+isqrt(5*(n-1)**2)>>1) # Chai Wah Wu, Aug 09 2022
(Magma) [2*(n-1)-Floor((n-1)*(1+Sqrt(5))/2): n in [1..100]]; // Vincenzo Librandi, Jun 26 2017
CROSSREFS
Sequence in context: A057367 A032634 A057366 * A341440 A355028 A061375
KEYWORD
nonn
AUTHOR
Clark Kimberling, Apr 25 2011
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 3 04:18 EST 2024. Contains 370499 sequences. (Running on oeis4.)