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.

A356365 For any nonnegative integer n with binary expansion Sum_{k = 1..w} 2^e_k, let m be the least integer such that the values e_k mod m are all distinct; a(n) = Sum_{k = 1..w} 2^(e_k mod m).

This page as a plain text file.
%I A356365 #10 Oct 17 2022 08:37:24
%S A356365 0,1,1,3,1,5,3,7,1,3,3,11,3,13,7,15,1,3,3,19,6,7,7,23,3,25,11,27,7,29,
%T A356365 15,31,1,3,6,7,3,7,7,39,5,11,7,43,14,15,15,47,3,7,19,51,7,53,23,55,7,
%U A356365 57,27,59,15,61,31,63,1,5,3,7,5,7,7,71,3,13,14,15
%N A356365 For any nonnegative integer n with binary expansion Sum_{k = 1..w} 2^e_k, let m be the least integer such that the values e_k mod m are all distinct; a(n) = Sum_{k = 1..w} 2^(e_k mod m).
%C A356365 See A293390 for the corresponding m's.
%H A356365 Rémy Sigrist, <a href="/A356365/b356365.txt">Table of n, a(n) for n = 0..8192</a>
%H A356365 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A356365 A000120(a(n)) = A000120(n).
%F A356365 a(n) = 1 iff n is a power of 2.
%F A356365 a(2^k - 1) = 2^k - 1 for any k >= 0.
%e A356365 The first terms, alongside their binary expansions and the corresponding m's, are:
%e A356365   n    a(n)  bin(n)   bin(a(n))  m
%e A356365   ---  ----  -------  ---------  -
%e A356365     0     0        0          0  0
%e A356365     1     1        1          1  1
%e A356365     2     1       10          1  1
%e A356365     3     3       11         11  2
%e A356365     4     1      100          1  1
%e A356365     5     5      101        101  3
%e A356365     6     3      110         11  2
%e A356365     7     7      111        111  3
%e A356365     8     1     1000          1  1
%e A356365     9     3     1001         11  2
%e A356365    10     3     1010         11  3
%e A356365    11    11     1011       1011  4
%e A356365    12     3     1100         11  2
%e A356365    13    13     1101       1101  4
%e A356365    14     7     1110        111  3
%e A356365    15    15     1111       1111  4
%e A356365    16     1    10000          1  1
%o A356365 (PARI) a(n) = { my (b=vector(hammingweight(n))); for (i=1, #b, n-=2^b[i]=valuation(n,2);); for (m=1, oo, if (#Set(b%m)==#b, b%=m; break;);); sum(i=1, #b, 2^b[i]); }
%Y A356365 Cf. A000120, A064895, A293390.
%K A356365 nonn,base
%O A356365 0,4
%A A356365 _Rémy Sigrist_, Oct 16 2022