cp's OEIS Frontend

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.

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)).

This page as a plain text file.
%I A348433 #66 Jul 13 2023 19:51:05
%S A348433 1,2,4,8,16,7,14,5,10,20,40,80,160,320,640,1280,11,22,44,88,176,352,
%T A348433 704,1408,13,26,52,104,208,416,832,1664,17,34,68,136,272,544,1088,
%U A348433 2176,4352,8704,19,38,76,152,304,608,1216,2432,4864,9728,19456,25,50,100,200
%N 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)).
%C A348433 There are no multiples of 3 in this sequence.
%C A348433 Will all other positive integers appear in this sequence?
%H A348433 Rémy Sigrist, <a href="/A348433/b348433.txt">Table of n, a(n) for n = 1..10000</a>
%H A348433 Rémy Sigrist, <a href="/A348433/a348433.gp.txt">PARI program for A348433</a>
%e A348433 The sum of the digits of a(4) = 8 is 8, which is already in the sequence, so a(5) = 2*8 = 16.
%e A348433 The sum of the digits of a(5) = 16 is 7, which is not yet in the sequence, so a(6) = 7.
%e A348433 From _Omar E. Pol_, Oct 19 2021: (Start)
%e A348433 Written as an irregular triangle the sequence begins (see A348408):
%e A348433    1,  2,  4,   8,  16;
%e A348433    7, 14;
%e A348433    5, 10, 20,  40,  80, 160,  320,  640, 1280;
%e A348433   11, 22, 44,  88, 176, 352,  704, 1408;
%e A348433   13, 26, 52, 104, 208, 416,  832, 1664;
%e A348433   17, 34, 68, 136, 272, 544, 1088, 2176, 4352, 8704;
%e A348433   19, 38, 76, 152, 304, 608, 1216, 2432, 4864, 9728, 19456;
%e A348433 ... (End)
%t A348433 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 *)
%o A348433 (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
%o A348433 (PARI) See Links section.
%Y A348433 Cf. A001651, A007953, A008585, A331440 (similar), A348400, A348408, A348483.
%K A348433 nonn,base
%O A348433 1,2
%A A348433 _Rodolfo Kurchan_, Oct 18 2021
%E A348433 Definition and examples clarified by _N. J. A. Sloane_, Oct 24 2021