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!)
A350091 a(n) = a(floor(n/4)) for n == 2 (mod 4), otherwise n. 2
0, 1, 0, 3, 4, 5, 1, 7, 8, 9, 0, 11, 12, 13, 3, 15, 16, 17, 4, 19, 20, 21, 5, 23, 24, 25, 1, 27, 28, 29, 7, 31, 32, 33, 8, 35, 36, 37, 9, 39, 40, 41, 0, 43, 44, 45, 11, 47, 48, 49, 12, 51, 52, 53, 13, 55, 56, 57, 3, 59, 60, 61, 15, 63, 64, 65, 16, 67, 68, 69, 17, 71, 72, 73 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
a(n) deletes any trailing '10' bit pairs from n. So in base 4, it removes all trailing '2' digits.
LINKS
FORMULA
A139391(2*a(n)+1) = A139391(2*n+1).
EXAMPLE
Numbers between '' are in base 2: '0'->'0', so a(0)=0. '110'->'1', so a(6)=1. '1010'->'10' -> '0', so a(10)=0. a(floor((2^1000001)/3))=0.
MATHEMATICA
a[n_] := a[n] = If[Mod[n, 4] == 2, a[(n - 2)/4], n]; Array[a, 100, 0] (* Amiram Eldar, Dec 14 2021 *)
PROG
(PARI) a(n) = if(2!=(n%4), n, my(m=3*n+2); m=m/4^valuation(m, 4); (m+1)/3-1)
CROSSREFS
Cf. A006519, A139391, A001511, A065883 (chop trailing 00 bit pairs).
Sequence in context: A051993 A174530 A280490 * A135347 A370116 A345708
KEYWORD
nonn,easy
AUTHOR
Ruud H.G. van Tol, Dec 14 2021
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 2 12:57 EDT 2024. Contains 374848 sequences. (Running on oeis4.)