A190248 a(n) = [nu+nv+nw]-[nu]-[nv]-[nw], where u=(1+sqrt(5))/2, v=u^2, w=u^3, []=floor.
1, 0, 2, 1, 0, 1, 1, 2, 1, 0, 2, 1, 0, 1, 1, 2, 1, 0, 1, 1, 2, 1, 0, 2, 1, 0, 1, 1, 2, 1, 0, 2, 1, 0, 1, 0, 2, 1, 0, 1, 1, 2, 1, 0, 2, 1, 0, 1, 1, 2, 1, 0, 2, 1, 2, 1, 0, 2, 1, 0, 1, 1, 2, 1, 0, 2, 1, 0, 1, 1, 2, 1, 0, 1, 1, 2, 1, 0, 2, 1, 0, 1, 1, 2, 1, 0, 2, 1, 0, 1, 0, 2, 1, 0, 1, 1, 2, 1, 0, 2, 1, 0, 1, 1, 2, 1, 0, 1
Offset: 1
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 1..10000
- Burghard Herrmann, How integer sequences find their way into areas outside pure mathematics, The Fibonacci Quarterly (2019) Vol. 57, No. 5, 67-71.
Programs
-
Magma
[Floor(2*n*(2+Sqrt(5))) - Floor(n*(1+Sqrt(5))/2) - Floor(n*(3 + Sqrt(5))/2): n in [1..30]]; // G. C. Greubel, Dec 26 2017
-
Mathematica
u = GoldenRatio; v = u^2; w=u^3; f[n_] := Floor[n*u + n*v + n*w] - Floor[n*u] - Floor[n*v] - Floor[n*w] t = Table[f[n], {n, 1, 120}] (* A190248 *) Flatten[Position[t, 0]] (* A190249 *) Flatten[Position[t, 1]] (* A190250 *) Flatten[Position[t, 2]] (* A190251 *)
-
PARI
for(n=1,30, print1(floor(2*n*(2+sqrt(5))) - floor(n*(1+sqrt(5))/2) - floor(n*(3 + sqrt(5))/2) - floor(n*(2 + sqrt(5))), ", ")) \\ G. C. Greubel, Dec 26 2017
Formula
a(n) = [2n+4nu]-[nu]-[n+nu]-[n+2nu], where u=(1+sqrt(5))/2. - Michel Dekking, Oct 21 2016
Extensions
Name corrected by Michel Dekking, Oct 21 2016
Comments