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!)
A355810 a(n) is the number at the apex of a triangle whose base contains the distinct powers of 2 summing to n (in ascending order), and each number in a higher row is the bitwise XOR of the two numbers directly below it; a(0) = 0. 2
0, 1, 2, 3, 4, 5, 6, 5, 8, 9, 10, 9, 12, 9, 10, 15, 16, 17, 18, 17, 20, 17, 18, 23, 24, 17, 18, 27, 20, 29, 30, 17, 32, 33, 34, 33, 36, 33, 34, 39, 40, 33, 34, 43, 36, 45, 46, 33, 48, 33, 34, 51, 36, 53, 54, 33, 40, 57, 58, 33, 60, 33, 34, 51, 64, 65, 66, 65 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n) <= n with equality iff n = 0 or n belongs to A143071.
a(2*n) = 2*a(n).
EXAMPLE
For n = 27:
- we have the following triangle:
27
9 18
3 10 24
1 2 8 16
- so a(27) = 27.
PROG
(PARI) a(n) = { my (b=vector(hammingweight(n))); for (k=1, #b, n-=b[k]=2^valuation(n, 2)); while (#b>1, b=vector(#b-1, k, bitxor(b[k+1], b[k]))); if (#b, b[1], 0) }
CROSSREFS
See A355807 for similar sequences.
Sequence in context: A091951 A063283 A228732 * A331173 A307089 A239132
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jul 18 2022
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 September 12 10:47 EDT 2024. Contains 375850 sequences. (Running on oeis4.)