Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A117462
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A117462 Number of iterations of SOD(N), doubled, to exceed or equal N. +0
2
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 (list; graph; listen)
OFFSET

0,10

COMMENT

"SOD" = "sum of digits".

FORMULA

Taking consecutive N, calculate SOD, double, and count iterations to equal or exceed N

EXAMPLE

a(9) = 10. SOD(10)=1. 1 doubled is 2. Iterating: 2,4,8,16 -- 4 iterations of 1 doubled to exceed 10.

PROGRAM

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

Cf. A117463.

Sequence in context: A055115 A108438 A082504 this_sequence A109496 A138851 A090342

Adjacent sequences: A117459 A117460 A117461 this_sequence A117463 A117464 A117465

KEYWORD

easy,nonn,base

AUTHOR

Enoch Haga (Enokh(AT)comcast.net), Mar 18 2006

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified August 29 17:54 EDT 2008. Contains 143238 sequences.


AT&T Labs Research