This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A358126 #70 Dec 31 2023 00:26:24 %S A358126 0,2,4,6,16,18,20,22,256,258,260,262,272,274,276,278,65536,65538, %T A358126 65540,65542,65552,65554,65556,65558,65792,65794,65796,65798,65808, %U A358126 65810,65812,65814,4294967296,4294967298,4294967300 %N A358126 Replace 2^k in binary expansion of n with 2^(2^k). %C A358126 Sums of distinct terms of A001146. %C A358126 The name "ballooned integers" is proposed for this sequence. %C A358126 a(n) is the index of the first occurrence of n in A253315. %H A358126 Tilman Piesk, <a href="/A358126/b358126.txt">Table of n, a(n) for n = 0..4095</a> %H A358126 Tilman Piesk, <a href="https://commons.wikimedia.org/wiki/File:3-ary_linear_to_noble,_even.svg">Boolean Walsh functions and corresponding balloons</a> %H A358126 Tilman Piesk, <a href="https://commons.wikimedia.org/wiki/File:Variadic_logical_connectives_with_up_to_5_arguments;_XOR_twin.svg">First 32 entries in little-endian binary</a> %F A358126 If n = Sum_{i=0..k} 2^s_i, then a(n) = Sum_{i=0..k} 2^(2^s_i). %F A358126 a(n) = 2 * A253317(n+1). %F A358126 a(2^n-1) = A060803(n-1) for n >= 1. %F A358126 a(2^n) = A001146(n). %F A358126 A197819[m, a(n)] = A228539[m, n]. (Compare link about Boolean Walsh functions.) %e A358126 Let n = 25 = 1 + 8 + 16 = 2^0 + 2^3 + 2^4. %e A358126 Then a(n) = 65794 = 2 + 256 + 65536 = 2^(2^0) + 2^(2^3) + 2^(2^4). %e A358126 The binary indices of n are {0, 3, 4}. Those of a(n) are {1, 8, 16}. %p A358126 a := proc(n) select(d -> d[2] <> 0, ListTools:-Enumerate(convert(n,base,2))): %p A358126 add(2^(2^(%[j][1] - 1)), j = 1..nops(%)) end: seq(a(n), n = 0..34); # _Peter Luschny_, Oct 31 2022 %t A358126 a[n_] := Total[2^(2^Range[If[n == 0, 1, IntegerLength[n,2]] - 1, 0, -1]) * IntegerDigits[n, 2]]; Array[a, 35, 0] (* _Amiram Eldar_, Oct 31 2022 *) %o A358126 (Python) %o A358126 def a(n): %o A358126 binary_string = "{0:b}".format(n)[::-1] # little-endian %o A358126 result = 0 %o A358126 for i, binary_digit in enumerate(binary_string): %o A358126 if binary_digit == '1': %o A358126 result += 1 << (1 << i) # 2 ** (2 ** i) %o A358126 return result %o A358126 (PARI) a(n) = my(d=Vecrev(digits(n,2))); for (k=1, #d, d[k] *= 2^(2^(k-1))); vecsum(d); \\ _Michel Marcus_, Oct 31 2022 %Y A358126 Cf. A253317, A001146, A060803, A133457, A197819, A228539, A253315. %K A358126 nonn,base %O A358126 0,2 %A A358126 _Tilman Piesk_, Oct 30 2022