OFFSET
1
COMMENTS
Essentially the same as A187944.
From Michel Dekking, Sep 28 2017: (Start)
a(n) = floor(n*r) - floor((n-3)*r) - floor(3*r) = b(n) + b(n-1) + b(n-2) - 4, where b(n) = floor(n*r) - floor((n-1)*r) equals A014675(n-2) for n >= 2, the infinite Fibonacci word on {1,2}.
The words w1w2w3 = 212, 122, 221, and 121 of length 3 occurring in (b(n)) yield the sums w1+w2+w3 = 5, 5, 5, and 4, respectively. This implies that the 0's in (a(n)) occur exactly at the 4's in A138967, shifted by 3. So a(n) = 0 <=> n = BB(k)+3 for some k <=> n = 3A(k)+2k+3, where (A(k)) = ([k.r]), and (B(k)) = ([k.r]+k) are the lower and upper Wythoff sequences. (End)
LINKS
Muniru A Asiru, Table of n, a(n) for n = 1..5000
FORMULA
a(n+3) = A187944(n) for n >= 1. - Michel Dekking, Sep 17 2016
a(n) = floor(n*r) - floor(n*r-3*r) - floor(3*r), where r=(1+sqrt(5))/2.
a(n) = 2 + floor(n*phi) - floor((n+R)*phi), where phi=(sqrt(5)+1)/2 and R=0.70980344286... is the rabbit constant. - Federico Provvedi, Nov 21 2018
MAPLE
r:=(1+sqrt(5))/2: a:=n->floor(n*r)-floor(n*r-3*r)-floor(3*r): [a(n)$n=1..140]; # Muniru A Asiru, Nov 22 2018
MATHEMATICA
PROG
(PARI) vector(200, n, floor(n*(1+sqrt(5))/2) - floor((n-3)*(1+sqrt(5))/2) - floor(3*(1+sqrt(5))/2)) \\ G. C. Greubel, Nov 22 2018
(Magma) [Floor(n*(1+Sqrt(5))/2) - Floor((n-3)*(1+Sqrt(5))/2) - Floor(3*(1+Sqrt(5))/2): n in [1..200]]; // G. C. Greubel, Nov 22 2018
(Sage) [floor(n*(1+sqrt(5))/2) - floor((n-3)*(1+sqrt(5))/2) - floor(3*(1+sqrt(5))/2) for n in (1..200)] # G. C. Greubel, Nov 22 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Mar 19 2011
STATUS
approved