A055261 Sums of two powers of 16.
2, 17, 32, 257, 272, 512, 4097, 4112, 4352, 8192, 65537, 65552, 65792, 69632, 131072, 1048577, 1048592, 1048832, 1052672, 1114112, 2097152, 16777217, 16777232, 16777472, 16781312, 16842752, 17825792, 33554432, 268435457
Offset: 1
Examples
a(4) = 272 = 16^2+16^1.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A052216.
Programs
-
Maple
A055261:= proc(n) local p1, p2; p1:= floor((sqrt(8*n-7)-1)/2); p2:= n - 1 - p1*(p1+1)/2; 16^p1 + 16^p2 end proc; # Robert Israel, Apr 07 2014
-
Python
from math import isqrt def A055261(n): return (1<<((a:=(k:=isqrt(m:=n<<1))+(m>k*(k+1))-1)<<2))+(1<<(n-1-(a*(a+1)>>1)<<2)) # Chai Wah Wu, Apr 08 2025