login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A104258 Replace 2^i with n^i in binary representation of n. 15

%I #16 Aug 02 2022 12:39:08

%S 1,2,4,16,26,42,57,512,730,1010,1343,1872,2367,2954,3616,65536,83522,

%T 104994,130341,160400,194923,234762,280394,345600,406251,474578,

%U 551152,637392,732512,837930,954305,33554432,39135394,45435458

%N Replace 2^i with n^i in binary representation of n.

%C The following sequences all appear to have the same parity: A003071, A029886, A061297, A092524, A093431, A102393, A104258, A122248, A128975. - _Jeremy Gardiner_, Dec 28 2008

%H Michael S. Branicky, <a href="/A104258/b104258.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A104257(n, n).

%F a(n) = [x^n] (1/(1 - x)) * Sum_{k>=0} n^k*x^(2^k)/(1 + x^(2^k)). - _Ilya Gutkovskiy_, Aug 17 2019

%o (PARI) a(n) = my(b=binary(n)); sum(k=1, #b, b[k]*n^(#b-k)); \\ _Michel Marcus_, Mar 19 2015

%o (Python)

%o def a(n): return sum(n**i*int(bi) for i, bi in enumerate(bin(n)[2:][::-1]))

%o print([a(n) for n in range(1, 35)]) # _Michael S. Branicky_, Aug 02 2022

%Y Cf. A104257.

%K nonn,base

%O 1,2

%A _Ralf Stephan_, Mar 05 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)