A104258 Replace 2^i with n^i in binary representation of n.
1, 2, 4, 16, 26, 42, 57, 512, 730, 1010, 1343, 1872, 2367, 2954, 3616, 65536, 83522, 104994, 130341, 160400, 194923, 234762, 280394, 345600, 406251, 474578, 551152, 637392, 732512, 837930, 954305, 33554432, 39135394, 45435458
Offset: 1
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A104257.
Programs
-
PARI
a(n) = my(b=binary(n)); sum(k=1, #b, b[k]*n^(#b-k)); \\ Michel Marcus, Mar 19 2015
-
Python
def a(n): return sum(n**i*int(bi) for i, bi in enumerate(bin(n)[2:][::-1])) print([a(n) for n in range(1, 35)]) # Michael S. Branicky, Aug 02 2022
Formula
a(n) = A104257(n, n).
a(n) = [x^n] (1/(1 - x)) * Sum_{k>=0} n^k*x^(2^k)/(1 + x^(2^k)). - Ilya Gutkovskiy, Aug 17 2019
Comments