login
a(n) = 5*n - floor(n*r), where r=(1+sqrt(5))/2 (the golden ratio).
1

%I #19 Sep 08 2022 08:45:59

%S 0,4,7,11,14,17,21,24,28,31,34,38,41,44,48,51,55,58,61,65,68,72,75,78,

%T 82,85,88,92,95,99,102,105,109,112,115,119,122,126,129,132,136,139,

%U 143,146,149,153,156,159,163,166,170,173,176,180,183,187,190,193

%N a(n) = 5*n - floor(n*r), where r=(1+sqrt(5))/2 (the golden ratio).

%H Vincenzo Librandi, <a href="/A195171/b195171.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) = 5*n - A000201(n) = n + A195170(n). - _R. J. Mathar_, Sep 11 2011

%t With[{c = GoldenRatio},Table[5*n - Floor[c*n], {n,0,50}]] (* _G. C. Greubel_, Oct 31 2017 *)

%o (Magma) [5*n-Floor(n*(1+Sqrt(5))/2): n in [0..70]]; // _Vincenzo Librandi_, Sep 11 2011

%o (PARI) for(n=0,50, print1(5*n - floor(n*(1+sqrt(5))/2), ", ")) \\ _G. C. Greubel_, Oct 31 2017

%o (Python)

%o from math import isqrt

%o def A195171(n): return (m:=5*n)-(n+isqrt(n*m)>>1) # _Chai Wah Wu_, Aug 10 2022

%K nonn

%O 0,2

%A _Clark Kimberling_, Sep 10 2011