|
|
A356274
|
|
a(n) is the number whose base-(n+1) expansion equals the binary expansion of n.
|
|
0
|
|
|
1, 3, 5, 25, 37, 56, 73, 729, 1001, 1342, 1741, 2366, 2941, 3615, 4369, 83521, 104977, 130340, 160021, 194922, 234741, 280393, 332377, 406250, 474553, 551151, 636637, 732511, 837901, 954304, 1082401, 39135393, 45435425, 52521910, 60466213, 69345326, 79236613
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
If the binary expansion of n is n = bit0*2^0 + bit1*2^1 + bit2*2^2 + ... then a(n) = bit0*(n+1)^0 + bit1*(n+1)^1 + bit2*(n+1)^2 + ... . In other words: Interpret the binary expansion of n as digits in base n+1.
|
|
LINKS
|
|
|
FORMULA
|
a(2^n - 1) = (2^(n^2) - 1)/(2^n - 1) = A128889(n).
a(2^n + 1) = 1 + (2^n + 2)^n.
a(n) = (1/n)*Sum_{j>=1} floor((n + 2^(j-1))/2^j) * ((n-1)*(n+1)^(j-1) + 1).
a(n) = (1/n)*Sum_{j=1..n} ((n-1)*(n+1)^A007814(j) + 1).
(2*m+1)^n divides a((2*m+1)^n-1) for positive m and n > 0.
|
|
EXAMPLE
|
n=4 in binary is 100 and interpreting those digits as base n+1 = 5 is a(4) = 25.
|
|
MATHEMATICA
|
a[n_] := FromDigits[IntegerDigits[n, 2], n + 1]; Array[a, 40] (* Amiram Eldar, Aug 19 2022 *)
|
|
PROG
|
(PARI) a(n) = fromdigits(digits(n, 2), n+1)
(Python)
def a(n): return sum((n+1)**i*int(bi) for i, bi in enumerate(bin(n)[2:][::-1]))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|