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!)
A335933 A fractal function, related to ruler functions. a(1) = 0; otherwise for m >= 0, a(3m) = 1, a(3m-1) = a(2m-1) + sign(a(2m-1)), a(3m+1) = a(2m+1) + sign(a(2m+1)). 2
1, 0, 0, 1, 2, 2, 1, 3, 3, 1, 4, 4, 1, 2, 2, 1, 5, 5, 1, 3, 3, 1, 2, 2, 1, 6, 6, 1, 4, 4, 1, 2, 2, 1, 3, 3, 1, 7, 7, 1, 2, 2, 1, 5, 5, 1, 3, 3, 1, 2, 2, 1, 4, 4, 1, 8, 8, 1, 2, 2, 1, 3, 3, 1, 6, 6, 1, 2, 2, 1, 4, 4, 1, 3, 3, 1, 2, 2, 1, 5, 5, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,5

COMMENTS

We choose a form for the definition that shows clearly its relationship to A307744.

The odd bisection is essentially A087088.

If we add a(-1) = 0 to the definition and allow negative m (and therefore n), we get a symmetric function, that is a(n) = a(-n).

For k >= 1 numbers 1..k occur with the same periodic and mirror symmetries as in A307744 and in ruler function A051064. In A051064, k occurs 3 times more frequently than k+1. Here, and in A307744, k occurs 3/2 times more frequently than k+1, precisely 2^(k-1) times in every 3^k terms.

LINKS

Table of n, a(n) for n=0..81.

PROG

(PARI) a(n) = if (n==1, 0, if ((n%3) == 0, 1, if ((n%3)==1, my(k=(n-1)/3, aa = a(2*k+1)); aa+sign(aa),  my(k=(n+1)/3, aa = a(2*k-1)); aa+sign(aa)))); \\ Michel Marcus, Jul 03 2020

CROSSREFS

Sequence with similar definition: A307744.

A051064 has matching symmetries.

Odd bisection: A087088.

Sequence in context: A292594 A093613 A344086 * A344087 A118816 A283904

Adjacent sequences:  A335930 A335931 A335932 * A335934 A335935 A335936

KEYWORD

nonn,easy

AUTHOR

Peter Munn, Jun 30 2020

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 August 15 02:13 EDT 2022. Contains 356122 sequences. (Running on oeis4.)