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.

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

This page as a plain text file.
%I A140397 #16 Jul 10 2025 11:02:02
%S A140397 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 A140397 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 A140397 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 A140397 a(n) = floor(3*phi*n) - 3*floor(phi*n) where phi = (1+sqrt(5))/2.
%F A140397 a(n) = floor(n*s^2)-floor(s*floor(n*s)), where s=1+phi.
%t A140397 a[n_]:=Floor[3GoldenRatio*n]-3Floor[GoldenRatio*n];Array[a,99] (* _James C. McMahon_, Jul 08 2025 *)
%o A140397 (PARI) a(n) = my(fhi=(1+sqrt(5))/2); floor(3*fhi*n) - 3*floor(fhi*n); \\ _Michel Marcus_, Aug 26 2013
%Y A140397 Cf. A140398, A140399, A140400, A140401, A005652, A005653, A078588.
%K A140397 nonn
%O A140397 1,3
%A A140397 _Fred Lunnon_, Jun 20 2008