The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A181359 a(1)=1. After that, a(n) = a(n-1) XOR a(floor(sqrt(n))). 1
 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Antti Karttunen, Table of n, a(n) for n = 1..65537 FORMULA a(1) = 1; for n > 1, a(n) = A000035(a(n-1) + a(A000196(n))). - Antti Karttunen, Dec 16 2017, after Magma program of Klaus Brockhaus MATHEMATICA f[1] := True f[x_] := Xor[f[x - 1], f[Floor[Sqrt[x]]]] PROG (MAGMA) [ n eq 1 select 1 else (Self(n-1)+Self(Isqrt(n))) mod 2: n in [1..105] ]; // Klaus Brockhaus, Oct 16 2010 (PARI) first(n) = my(res = vector(n)); res[1]=1; for(x=2, n, res[x]=bitxor(res[x-1], res[floor(sqrt(x))])); res \\ Iain Fox, Dec 16 2017 (Scheme, with memoization-macro definec) (definec (A181359 n) (if (= 1 n) n (A000035 (+ (A181359 (- n 1)) (A181359 (A000196 n)))))) ;; Antti Karttunen, Dec 16 2017 CROSSREFS Cf. A000196 (integer part of square root of n). - Klaus Brockhaus, Oct 16 2010 Sequence in context: A254377 A285657 A162519 * A072418 A128973 A176412 Adjacent sequences:  A181356 A181357 A181358 * A181360 A181361 A181362 KEYWORD nonn AUTHOR Ben Branman, Oct 14 2010 STATUS approved

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

Last modified November 30 09:54 EST 2021. Contains 349419 sequences. (Running on oeis4.)