login
A083054
a(n) = floor(sqrt(3)*n) - 3*floor(n/sqrt(3)).
3
1, 0, 2, 0, 2, 1, 0, 1, 0, 2, 1, 2, 1, 0, 1, 0, 2, 1, 2, 1, 0, 2, 0, 2, 1, 0, 1, 0, 2, 0, 2, 1, 0, 1, 0, 2, 1, 2, 1, 0, 2, 0, 2, 1, 2, 1, 0, 2, 0, 2, 1, 0, 1, 0, 2, 0, 2, 1, 0, 1, 0, 2, 1, 2, 1, 0, 2, 0, 2, 1, 2, 1, 0, 2, 0, 2, 1, 0, 1, 0, 2, 1, 2, 1, 0, 1, 0, 2, 1, 2, 1, 0, 2, 0, 2, 1, 0, 1, 0, 2, 0, 2, 1, 0, 1
OFFSET
1,3
FORMULA
a(n) = floor(n*sqrt(3)) mod 3. - T. D. Noe, Oct 11 2006
PROG
(PARI) {a(n)=if(n<1, 0, sqrtint(3*n^2)-3*sqrtint(n^2\3))} /* Michael Somos, Aug 31 2006 */
CROSSREFS
Cf. A022383 (floor(n*sqrt(3))).
Sequence in context: A194702 A118682 A198393 * A336921 A297742 A061264
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Apr 18 2003
STATUS
approved