A038485 Sums of 3 distinct powers of 8.
73, 521, 577, 584, 4105, 4161, 4168, 4609, 4616, 4672, 32777, 32833, 32840, 33281, 33288, 33344, 36865, 36872, 36928, 37376, 262153, 262209, 262216, 262657, 262664, 262720, 266241, 266248, 266304, 266752, 294913, 294920, 294976, 295424, 299008, 2097161, 2097217
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Take[Union[Total/@Subsets[8^Range[0,10],{3}]],40] (* Harvey P. Dale, Jan 31 2016 *)
-
Python
from math import isqrt, comb from sympy import integer_nthroot def A038485(n): return (1<<3*((r:=n-1-comb((m:=integer_nthroot(6*n,3)[0])+(t:=(n>comb(m+2,3)))+1,3))-comb((k:=isqrt(b:=r+1<<1))+(b>k*(k+1)),2)))+(1<<3*((a:=isqrt(s:=n-comb(m-(t^1)+2,3)<<1))+((s<<2)>(a<<2)*(a+1)+1)))+(1<<3*(m+t+1)) # Chai Wah Wu, Apr 05 2025
Extensions
Offset corrected by Amiram Eldar, Jul 14 2022
Comments