cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A355810 #9 Jul 19 2022 10:43:19
%S A355810 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,
%T A355810 27,20,29,30,17,32,33,34,33,36,33,34,39,40,33,34,43,36,45,46,33,48,33,
%U A355810 34,51,36,53,54,33,40,57,58,33,60,33,34,51,64,65,66,65
%N 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.
%H A355810 Rémy Sigrist, <a href="/A355810/b355810.txt">Table of n, a(n) for n = 0..8192</a>
%H A355810 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A355810 a(n) <= n with equality iff n = 0 or n belongs to A143071.
%F A355810 a(2*n) = 2*a(n).
%e A355810 For n = 27:
%e A355810 - we have the following triangle:
%e A355810           27
%e A355810          9  18
%e A355810        3  10  24
%e A355810      1   2   8  16
%e A355810 - so a(27) = 27.
%o A355810 (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) }
%Y A355810 See A355807 for similar sequences.
%Y A355810 Cf. A143071, A348296.
%K A355810 nonn,base
%O A355810 0,3
%A A355810 _Rémy Sigrist_, Jul 18 2022