This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A131840 #18 Mar 01 2025 17:44:36 %S A131840 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, %T A131840 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, %U A131840 2,3,3,3,3,2,2,3,2,2,2,2,3,2,2,3,2,3,3,2 %N A131840 Additive persistence of Cullen numbers. %F A131840 a(n) = A031286(A002064(n)). - _James C. McMahon_, Mar 01 2025 %e A131840 Cullen number 385 --> 3+8+5=16 -->1+6=7 thus persistence is 2 %p A131840 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; %p A131840 end: seq(P(i),i=1..10^2); %t A131840 f[n_] := Length@ NestWhileList[Plus @@ IntegerDigits@# &, n*2^n + 1, UnsameQ@## &, All] - 2; Array[f, 88] (* _James C. McMahon_, Mar 01 2025 *) %Y A131840 Cf. A002064, A031286, A131837. %K A131840 easy,nonn,base %O A131840 1,4 %A A131840 _Paolo P. Lava_ and _Giorgio Balzarotti_, Jul 20 2007 %E A131840 Corrected entries and Maple code by _Paolo P. Lava_, Dec 19 2017