OFFSET
1,1
LINKS
E.W. Weisstein, Cullen Number
EXAMPLE
Sum of all 1-digit Cullen numbers is 1 + 3 + 9 = 13.
Sum of all 2-digit Cullen numbers is 25 + 65 = 90.
Sum of all 3-digit Cullen numbers is 161 + 385 + 897 = 1443.
MATHEMATICA
digNum[n_] := Length @ IntegerDigits[n]; cullen[n_] := n * 2^n + 1; digCount = 0; sum = 0; cumsum = {}; Do[c = cullen[n]; If[digNum[c] > digCount, digCount++; AppendTo[cumsum, sum]]; sum += c, {n, 0, 65}]; Differences[cumsum] (* Amiram Eldar, Nov 30 2019 *)
CROSSREFS
KEYWORD
nonn,base,less
AUTHOR
Parthasarathy Nambi, Sep 15 2007
EXTENSIONS
More terms from Amiram Eldar, Nov 30 2019
STATUS
approved