A356274 a(n) is the number whose base-(n+1) expansion equals the binary expansion of n.
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
Offset: 1
Examples
n=4 in binary is 100 and interpreting those digits as base n+1 = 5 is a(4) = 25.
Programs
-
Mathematica
a[n_] := FromDigits[IntegerDigits[n, 2], n + 1]; Array[a, 40] (* Amiram Eldar, Aug 19 2022 *)
-
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])) print([a(n) for n in range(1, 39)]) # Michael S. Branicky, Aug 02 2022
Formula
a(2^n) = (2^n + 1)^n = A136516(n).
a(2^n - 1) = (2^(n^2) - 1)/(2^n - 1) = A128889(n).
a(2^n + 1) = 1 + (2^n + 2)^n.
a(n) = A104257(n+1, 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).
a(2*n) = A104258(2*n+1) - 1.
(2*m+1)^n divides a((2*m+1)^n-1) for positive m and n > 0.
Comments