login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = n + (n base 2 regarded as a decimal number).
1

%I #38 Jul 08 2019 18:26:17

%S 0,2,12,14,104,106,116,118,1008,1010,1020,1022,1112,1114,1124,1126,

%T 10016,10018,10028,10030,10120,10122,10132,10134,11024,11026,11036,

%U 11038,11128,11130,11140,11142,100032,100034,100044,100046,100136,100138,100148,100150,101040

%N a(n) = n + (n base 2 regarded as a decimal number).

%C All terms in this sequence are even, because every even number produces an even binary number (ends with 0) and every odd number produces an odd binary number (ends with 1).

%H Isaac S. Friedman, <a href="/A269130/b269130.txt">Table of n, a(n) for n = 0..999</a>

%F a(n) = A007088(n) + n.

%e a(4) = convert_to_binary(4) + 4 = 100 + 4 = 104.

%t Table[n+FromDigits[IntegerDigits[n,2]],{n,0,40}] (* _Harvey P. Dale_, Jul 08 2019 *)

%o (PARI) a(n)=fromdigits(binary(n))+n \\ _Charles R Greathouse IV_, Feb 19 2016

%o (PARI) a(n) = subst(Pol(binary(n)), x, 10) + n \\ _Michel Marcus_, Feb 20 2016

%Y Cf. A000027 (counting numbers), A007088 (binary numbers).

%Y Cf. A127906 (multiplicated), A228071 (subtracted).

%K nonn,easy,base

%O 0,2

%A _Isaac S. Friedman_, Feb 19 2016