login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = floor(3*phi*n) - 3*floor(phi*n) where phi = (1+sqrt(5))/2.
13

%I #13 Jul 08 2019 03:16:14

%S 1,0,2,1,0,2,0,2,1,0,2,1,0,1,0,2,1,0,2,1,2,1,0,2,1,0,2,0,2,1,0,2,1,0,

%T 1,0,2,1,0,2,1,2,1,0,2,1,0,1,0,2,1,0,2,1,2,1,0,2,1,0,2,0,2,1,0,2,1,0,

%U 1,0,2,1,0,2,1,2,1,0,2,1,0,2,0,2,1,0,2,1,0,1,0,2,1,0,2,0,2,1,0

%N a(n) = floor(3*phi*n) - 3*floor(phi*n) where phi = (1+sqrt(5))/2.

%F a(n) = floor(n*s^2)-floor(s*floor(n*s)), where s=1+phi.

%o (PARI) a(n) = my(fhi=(1+sqrt(5))/2); floor(3*fhi*n) - 3*floor(fhi*n); \\ _Michel Marcus_, Aug 26 2013

%Y Cf. A140398, A140399, A140400, A140401, A005652, A005653, A078588.

%K nonn

%O 1,3

%A _Fred Lunnon_, Jun 20 2008