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.

A214990 Second nearest integer to n*r, where r = (1+ sqrt(5))/2, the golden ratio.

This page as a plain text file.
%I A214990 #18 Oct 31 2024 01:45:48
%S A214990 1,4,4,7,9,9,12,12,14,17,17,20,22,22,25,25,27,30,30,33,33,35,38,38,41,
%T A214990 43,43,46,46,48,51,51,54,56,56,59,59,62,64,64,67,67,69,72,72,75,77,77,
%U A214990 80,80,82,85,85,88,88,90,93,93,96,98,98,101,101,103,106,106
%N A214990 Second nearest integer to n*r, where r = (1+ sqrt(5))/2, the golden ratio.
%C A214990 Let {x} denote the fractional part of x.  The second nearest integer to x, denoted by s(x), is defined to be ceiling(x) if {x} < 1/2 and floor(x) if {x} >= 1/2.  If x is not an integer, there are exactly two integers k such that |k-x|<1; one is round(x) = floor(x+1/2), and the other is s(x).
%C A214990 Let J(n) be the n-th number k for which s((k+1)*r) > s(k*r).  The golden ratio appears to be the only number x for which J(n) = floor(nx) for all n>=0.  In this case, J = A000201.
%C A214990 Let f(n) = 0 if a(n) = a(n+1) and f(n) = 1 otherwise; then f is the infinite Fibonacci word A005614 = 1-A003849.
%C A214990 In this sequence, replace each repeated term by 1 and all others by 0; the result is A005713 (prefixed by 0).
%C A214990 The distinct terms of this sequence are given by A007064.
%H A214990 Clark Kimberling, <a href="/A214990/b214990.txt">Table of n, a(n) for n = 1..10000</a>
%e A214990 n . . n*r . . nearest integer . second nearest
%e A214990 1 . . 1.618... .  2 . . . . . . . 1 = a(1)
%e A214990 2 . . 3.236... .  3 . . . . . . . 4 = a(2)
%e A214990 3 . . 4.854... .  5 . . . . . . . 4 = a(3)
%e A214990 4 . . 6.472... .  6 . . . . . . . 7 = a(4)
%e A214990 5 . . 8.090... .  8 . . . . . . . 9 = a(5)
%t A214990 r = GoldenRatio; f[x_] := If[FractionalPart[x] < 1/2, Ceiling[x], Floor[x]]
%t A214990 Table[f[r*n], {n, 1, 100}]
%Y A214990 Cf. A214991, A000201, A003849, A005713, A005614, A007064, A001950, A007067 (complement).
%K A214990 nonn
%O A214990 1,2
%A A214990 _Clark Kimberling_, Oct 31 2012