cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A327306 a(n) = floor(3*n*r) - 3*floor(n*r), where r = sqrt(6).

This page as a plain text file.
%I A327306 #17 Aug 04 2022 15:05:16
%S A327306 0,1,2,1,2,0,2,0,1,0,1,2,1,2,0,2,0,1,0,1,2,1,2,1,2,0,2,0,1,0,1,2,1,2,
%T A327306 0,2,0,1,0,1,2,1,2,0,2,0,2,0,1,0,1,2,1,2,0,2,0,1,0,1,2,1,2,0,2,0,1,0,
%U A327306 1,0,1,2,1,2,0,2,0,1,0,1,2,1,2,0,2,0
%N A327306 a(n) = floor(3*n*r) - 3*floor(n*r), where r = sqrt(6).
%H A327306 Clark Kimberling, <a href="/A327306/b327306.txt">Table of n, a(n) for n = 0..10000</a>
%F A327306 a(n) = floor(3*n*r) - 3*floor(n*r), where r = sqrt(6).
%t A327306 r = Sqrt[6]; z = 300;
%t A327306 t = Table[Floor[3 n*r] - 3 Floor[n*r], {n, 0, z}]
%o A327306 (Python)
%o A327306 from math import isqrt
%o A327306 def A327306(n): return isqrt(9*(m:=6*n*n))-3*isqrt(m) # _Chai Wah Wu_, Aug 04 2022
%Y A327306 The positions of 0's, 1's and 2's in {a(n) : n > 0} are given by A327307, A327308 and A327309.
%Y A327306 Cf. A022840.
%K A327306 nonn,easy
%O A327306 0,3
%A A327306 _Clark Kimberling_, Sep 07 2019