login
Sum of all n-digit Cullen numbers.
0

%I #11 Nov 30 2019 09:13:09

%S 13,90,1443,6658,81923,827395,17956868,157286403,1434451971,

%T 12884901891,114353504259,1005022347267,8761733283843,166026255794180,

%U 1337006139375619,11434920928870403,97390341941886979,1799188051134513156,14231374822490767363,119903836479112085507

%N Sum of all n-digit Cullen numbers.

%H E.W. Weisstein, <a href="http://mathworld.wolfram.com/CullenNumber.html">Cullen Number</a>

%e Sum of all 1-digit Cullen numbers is 1 + 3 + 9 = 13.

%e Sum of all 2-digit Cullen numbers is 25 + 65 = 90.

%e Sum of all 3-digit Cullen numbers is 161 + 385 + 897 = 1443.

%t 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 *)

%Y Cf. A002064.

%K nonn,base,less

%O 1,1

%A _Parthasarathy Nambi_, Sep 15 2007

%E More terms from _Amiram Eldar_, Nov 30 2019