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
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1
COMMENTS
See A188294.
Essentially the same as 1 - A187946, see formulas. - Michel Dekking, Oct 15 2016, edited by M. F. Hasler, Oct 12 2017
Sequence A188471 lists the position of 0's, all other terms equal 1. - M. F. Hasler, Oct 12 2017
LINKS
FORMULA
a(n) = [5r] - [nr] - [5r-nr], where r=(1+sqrt(5))/2 is the golden ratio.
a(n) = 1 - A187946(n) for n not equal to 5 (from [-x]=-[x]-1 for non-integer x). - Michel Dekking, Oct 15 2016
For n>5, a(n) = 9 - A000201(n) + A000201(n-5). - Max Alekseyev, Oct 14 2017
MAPLE
A188470 := proc(n)
8-A000201(n)-A000201(5-n);
end proc:
seq(A188470(n), n=1..50) ; # R. J. Mathar, Oct 13 2017
MATHEMATICA
r = (1 + 5^(1/2))/2 + .0000000000001;
f[n_] := Floor[5r] - Floor[n*r] - Floor[5r - n*r]
t = Flatten[Table[f[n], {n, 1, 200}]] (* A188470 *)
Flatten[Position[t, 0] ] (* A188471 *)
Flatten[Position[t, 1] ] (* complement of A188471 *)
PROG
(PARI)
\\ For z = a + b*phi with phi = quadgen(5), exact representation of (sqrt(5)+1)/2:
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
(PARI)
A000201(m) = (sqrtint((m^2)*5)+m)\2;
A188470(n) = if(n<=5, n%5!=0, 9+A000201(n-5)-A000201(n)); \\ Max Alekseyev, Oct 13 2017
(Python)
from math import isqrt
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
CROSSREFS
Sequence in context: A059095 A187944 A105597 * A333922 A071026 A259022
KEYWORD
nonn
AUTHOR
Clark Kimberling, Apr 01 2011
STATUS
approved

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 April 18 03:01 EDT 2024. Contains 371767 sequences. (Running on oeis4.)