The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A117462 The number of doubling steps of SOD(n) to exceed or equal n. 3
1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 3, 2, 2, 2, 2, 2, 2, 1, 1, 4, 3, 3, 3, 2, 2, 2, 2, 2, 2, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,10
COMMENTS
"SOD" = "sum of digits".
LINKS
FORMULA
Take n, calculate SOD, and count doubling iterations (at least 1) to equal or exceed n.
a(n) = max(1, log_2(n/A007953(n))). - R. J. Mathar, Sep 24 2018
EXAMPLE
a(10) = 4. SOD(10)=1. 1 doubled is 2. Iterating: 2,4,8,16 -- 4 iterations of doubling 1 to exceed 10.
MAPLE
A117462 := proc(n)
local x;
x := digsum(n) ;
max(1, ceil(log[2](n/x))) ;
end proc:
seq(A117462(n), n=1..90) ; # R. J. Mathar, Sep 24 2018
MATHEMATICA
Array[Max[1, Ceiling@ Log2[#/Total@ IntegerDigits@ #]] &, 105] (* Michael De Vlieger, Sep 24 2018 *)
PROG
10 'use of str, mid, len, val
20 'number of doubled iterations required to equal or exceed sod(n)
30 C=C+1
40 D=str(C)
50 E=len(D)
60 for Q=2 to E
70 A=mid(D, Q, 1):G=val(A)
80 I=I+G
90 next Q
100 print C; I; "-";
110 K=I
120 I=0
130 for R=1 to C
140 K=K+K:T=T+1
150 if K>=C then print C; K; T:cancel for:stop:goto 170
160 next R
170 K=0:T=0
180 goto 30
CROSSREFS
Sequence in context: A237524 A266143 A171623 * A155462 A109496 A138851
KEYWORD
easy,nonn,base
AUTHOR
Enoch Haga, Mar 18 2006
EXTENSIONS
Re-engineered definition from BASIC program, and corrected/clarified the terms. - R. J. Mathar, Sep 24 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 28 19:55 EDT 2024. Contains 372919 sequences. (Running on oeis4.)