login
A348433
a(1) = 1; a(n+1) = 2*a(n) if the digit sum of a(n) is already in the sequence, otherwise a(n+1) = digitsum(a(n)).
6
1, 2, 4, 8, 16, 7, 14, 5, 10, 20, 40, 80, 160, 320, 640, 1280, 11, 22, 44, 88, 176, 352, 704, 1408, 13, 26, 52, 104, 208, 416, 832, 1664, 17, 34, 68, 136, 272, 544, 1088, 2176, 4352, 8704, 19, 38, 76, 152, 304, 608, 1216, 2432, 4864, 9728, 19456, 25, 50, 100, 200
OFFSET
1,2
COMMENTS
There are no multiples of 3 in this sequence.
Will all other positive integers appear in this sequence?
LINKS
EXAMPLE
The sum of the digits of a(4) = 8 is 8, which is already in the sequence, so a(5) = 2*8 = 16.
The sum of the digits of a(5) = 16 is 7, which is not yet in the sequence, so a(6) = 7.
From Omar E. Pol, Oct 19 2021: (Start)
Written as an irregular triangle the sequence begins (see A348408):
1, 2, 4, 8, 16;
7, 14;
5, 10, 20, 40, 80, 160, 320, 640, 1280;
11, 22, 44, 88, 176, 352, 704, 1408;
13, 26, 52, 104, 208, 416, 832, 1664;
17, 34, 68, 136, 272, 544, 1088, 2176, 4352, 8704;
19, 38, 76, 152, 304, 608, 1216, 2432, 4864, 9728, 19456;
... (End)
MATHEMATICA
seq[len_] := Module[{s = {1}, k, d}, While[Length[s] < len, k = s[[-1]]; If[MemberQ[s, (d = Plus @@ IntegerDigits[k])], AppendTo[s, 2*k], AppendTo[s, d]]]; s]; seq[50] (* Amiram Eldar, Oct 19 2021 *)
PROG
(PARI) lista(nn) = my(s, v=List([1])); for(n=1, nn, if(setsearch(vecsort(v), s=sumdigits(v[n])), listput(v, 2*v[n]), listput(v, s))); v \\ Jinyuan Wang, Oct 21 2021
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rodolfo Kurchan, Oct 18 2021
EXTENSIONS
Definition and examples clarified by N. J. A. Sloane, Oct 24 2021
STATUS
approved