A055236 Sums of two powers of 4.
2, 5, 8, 17, 20, 32, 65, 68, 80, 128, 257, 260, 272, 320, 512, 1025, 1028, 1040, 1088, 1280, 2048, 4097, 4100, 4112, 4160, 4352, 5120, 8192, 16385, 16388, 16400, 16448, 16640, 17408, 20480, 32768, 65537, 65540, 65552, 65600, 65792, 66560, 69632, 81920, 131072
Offset: 0
Links
- T. D. Noe, Rows n = 0..100 of triangle, flattened
Crossrefs
Programs
-
Mathematica
t = 4^Range[0, 9]; Select[Union[Flatten[Table[i + j, {i, t}, {j, t}]]], # <= t[[-1]] + 1 &] (* T. D. Noe, Oct 09 2011 *) Union[Total/@Tuples[4^Range[0,9], 2]] (* Harvey P. Dale, Mar 25 2012 *)
-
Python
from math import isqrt def A055236(n): return (1<<((a:=(k:=isqrt(m:=n<<1))+(m>k*(k+1))-1)<<1))+(1<<(n-1-(a*(a+1)>>1)<<1)) # Chai Wah Wu, Apr 08 2025