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!)
A241183 Start with n; add to it any of its digits; repeat; a(n) = minimal number of steps needed to reach 2n, or -1 if 2n cannot be reached. 11
1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 4, 4, 3, 3, 5, 4, 4, 3, 7, 6, 5, 5, 5, 4, 5, 5, 5, 4, 5, 7, 6, 6, 7, 6, 6, 7, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, -1, 8, 8, 8, 7, 8, 8, 8, 8, 8, 10, 9, 9, 9, 10, 11, 10, 10, 10, 11, 12, 11, 12, 12, 11, 12, 12, 14, 12, 13, 15, 12, 13, 14, 14, 14, 14, 14, 15, 14, 14, 16, 16, 16, 15, 15, 17, 16, 15, 15, 18 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,10
COMMENTS
Is it a theorem that a(n) always exists?
Does any number take two steps to reach 2n by the shortest path? If the answer is yes, we should add the sequence of the smallest numbers that take n steps to go from k to 2k.
If the answer is no, then the sequence of the smallest numbers that take at least n steps to go from k to 2k.
There cannot be a 2 in this list. The maximum possible increase in two steps is 18 (2 nines) so no number larger than 18 can be doubled in 2 steps by digit addition. Since the minimum number of steps have been found through 18, and since none of them required exactly 2 steps, then there can be no 2s in this sequence. - David Consiglio, Jr., May 12 2014
a(50) does not exist. - Hiroaki Yamanouchi, Sep 05 2014
Except for n=50, 2n can be reached from all n<=10000. - Robert Price, Mar 20 2019
REFERENCES
Eric Angelini, Posting to Sequence Fans Mailing List, Apr 20 2014.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000 (first 49 terms from Hiroaki Yamanouchi)
EXAMPLE
Examples (in condensed notation):
1+1=2
2+2=4
...
9+9=18
10+1=11+1=12+2=14+1=15+5=20
11+1=12+1=13+3=16+6=22
12+1=13+3=16+1=17+7=24
13+1=14+4=18+8=26
14+4=18+8=26+2=28
15+5=20+2=22+2=24+4=28+2=30
15+1=16+6=22+2=24...
15+1=16+1=17+7=24...
16+6=22+2=24+2=26+6=32
17+1=18+8=26+6=32+2=34
18+8=26+2=28+8=36
19+1=20+2=22+2=24+2=26+6=32+2=34+4=38
20+2=22+2=24+2=26+6=32+3=35+5=40
...
MATHEMATICA
A241183[n_] := Module[{c=1, nx=n},
While[ ! AnyTrue[nx =
Union[Flatten[nx + IntegerDigits[nx]]], # == 2 n &], c++];
Return[c]];
Join[Table[A241183[i], {i, 49}], -1, Table[A241183[i], {i, 51, 100}]] (* Robert Price, Mar 18 2019 *)
(* The following is a program to detect any n that cannot reach 2n *)
f[n_] := Module[{n2 = 2 n, totest = {2 n}, i},
While[Length[totest] > 0,
x = First[totest]; totest = Rest[totest];
For[i = 1, i <= 9, i++,
If[MemberQ[IntegerDigits[x - i], i],
If[! MemberQ[totest, x - i], AppendTo[totest, x - i]]] ];
If[MemberQ[totest, n], Return[False]]]; Return[True]];
Select[Range[100], f[#] &] (* Robert Price, Mar 20 2019 *)
CROSSREFS
Sequence in context: A354209 A220248 A147533 * A137240 A243380 A244999
KEYWORD
sign,base
AUTHOR
N. J. A. Sloane, Apr 23 2014
EXTENSIONS
a(11) corrected (was 5 should be 4) by David Consiglio, Jr., May 12 2014
a(11) corrected in example by David Consiglio, Jr., May 20 2014
a(13) corrected (including the example) and a(23)-a(49) from Hiroaki Yamanouchi, Sep 05 2014
Escape clause added to definition at the suggestion of Robert Price. - N. J. A. Sloane, Mar 18 2019
a(50)-a(100) from Robert Price, Mar 18 2019
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 April 25 09:49 EDT 2024. Contains 371967 sequences. (Running on oeis4.)