login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A188470 a(n) = [5r]-[nr]-[5r-nr], where r=(1+sqrt(5))/2 and []=floor. 2

%I #25 Aug 11 2022 03:19:37

%S 1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,

%T 1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,

%U 1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,0

%N a(n) = [5r]-[nr]-[5r-nr], where r=(1+sqrt(5))/2 and []=floor.

%C See A188294.

%C Essentially the same as 1 - A187946, see formulas. - _Michel Dekking_, Oct 15 2016, edited by _M. F. Hasler_, Oct 12 2017

%C Sequence A188471 lists the position of 0's, all other terms equal 1. - _M. F. Hasler_, Oct 12 2017

%H Antti Karttunen, <a href="/A188470/b188470.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = [5r] - [nr] - [5r-nr], where r=(1+sqrt(5))/2 is the golden ratio.

%F a(n) = 1 - A187946(n) for n not equal to 5 (from [-x]=-[x]-1 for non-integer x). - _Michel Dekking_, Oct 15 2016

%F For n>5, a(n) = 9 - A000201(n) + A000201(n-5). - _Max Alekseyev_, Oct 14 2017

%p A188470 := proc(n)

%p 8-A000201(n)-A000201(5-n);

%p end proc:

%p seq(A188470(n),n=1..50) ; # _R. J. Mathar_, Oct 13 2017

%t r = (1 + 5^(1/2))/2 + .0000000000001;

%t f[n_] := Floor[5r] - Floor[n*r] - Floor[5r - n*r]

%t t = Flatten[Table[f[n], {n, 1, 200}]] (* A188470 *)

%t Flatten[Position[t, 0] ] (* A188471 *)

%t Flatten[Position[t, 1] ] (* complement of A188471 *)

%o (PARI)

%o \\ For z = a + b*phi with phi = quadgen(5), exact representation of (sqrt(5)+1)/2:

%o FLOOR(z,F=1,f(w)=floor(real(z)+imag(z)*w),L=f(F))=while(L!=L=f(F=1+1/F),);LA188470(n,r=quadgen(5)) = FLOOR(5*r)-FLOOR(n*r)-FLOOR(5*r-n*r) \\ _M. F. Hasler_, Oct 12 2017

%o (PARI)

%o A000201(m) = (sqrtint((m^2)*5)+m)\2;

%o A188470(n) = if(n<=5,n%5!=0,9+A000201(n-5)-A000201(n)); \\ _Max Alekseyev_, Oct 13 2017

%o (Python)

%o from math import isqrt

%o def A188470(n): return 7-(n+isqrt(5*n**2)>>1)+(n-1+isqrt(5*(n-5)**2)>>1) if n>5 else int(n<5) # _Chai Wah Wu_, Aug 10 2022

%Y Cf. A188294, A188471, A187946.

%K nonn

%O 1

%A _Clark Kimberling_, Apr 01 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 23 13:21 EDT 2024. Contains 375396 sequences. (Running on oeis4.)