login
A131840
Additive persistence of Cullen numbers.
1
0, 0, 1, 2, 1, 2, 2, 2, 3, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 3, 2, 2, 2, 2, 3, 2, 3, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 3, 2, 3, 3, 3, 3, 2, 3, 3, 2, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 2, 3, 2, 2, 3, 2, 3, 3, 3, 3, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 3, 2, 3, 3, 2
OFFSET
1,4
FORMULA
a(n) = A031286(A002064(n)). - James C. McMahon, Mar 01 2025
EXAMPLE
Cullen number 385 --> 3+8+5=16 -->1+6=7 thus persistence is 2
MAPLE
with(numtheory): with(combinat): P:=proc(n) local a, t; t:=0; a:=n*2^n+1; while a>9 do t:=t+1; a:=convert(convert(a, base, 10), `+`); od; t;
end: seq(P(i), i=1..10^2);
MATHEMATICA
f[n_] := Length@ NestWhileList[Plus @@ IntegerDigits@# &, n*2^n + 1, UnsameQ@## &, All] - 2; Array[f, 88] (* James C. McMahon, Mar 01 2025 *)
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
EXTENSIONS
Corrected entries and Maple code by Paolo P. Lava, Dec 19 2017
STATUS
approved