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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A087734 a(n) = f(f(n)), where f() = A035327(). 2
0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 2, 3, 0, 1, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 0, 1, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 0, 1, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,11

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..16384

J.-P. Allouche and J. Shallit, The ring of k-regular sequences, II, Theoret. Computer Sci., 307 (2003), 3-29.

FORMULA

From Mikhail Kurkov, Sep 29 2019: (Start)

a(n) = n - Sum_{k=A063250(n)..A000523(n)} 2^k = n - 2^(A000523(n)+1) + 2^A063250(n) for n>0 with a(0)=0.

G.f.: 1/(1-x) * Sum_{j>=0} (2^j)*((x^(2^j))/(1+x^(2^j)) - (1-x^(2^j)) * Sum_{k>=1} x^((2^j)*(2^k-1))).

a(n) = 2*a(floor(n/2)) + n mod 2 - A036987(n) for n>1 with a(0)=a(1)=0.

a(n) = (1 - A036987(n-1))*(1 + A063250(n) - A063250(n-1))*(1 + a(n-1)) for n>0 with a(0)=0.

(End)

MAPLE

a:= n-> ((i->Bits[Nand](i$2))@@2)(n):

seq(a(n), n=0..100);  # Alois P. Heinz, Sep 29 2019

MATHEMATICA

{0}~Join~Array[Nest[BitXor[#, 2^IntegerPart[Log2@ # + 1] - 1] &, #, 2] /. -1 -> 0 &, 81] (* Michael De Vlieger, Sep 29 2019 *)

CROSSREFS

Sequence in context: A240658 A063890 A156439 * A073644 A123343 A054439

Adjacent sequences:  A087731 A087732 A087733 * A087735 A087736 A087737

KEYWORD

nonn

AUTHOR

N. J. A. Sloane, Oct 01 2003

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 8 13:59 EST 2021. Contains 341949 sequences. (Running on oeis4.)