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.

A348483 a(1) = 1; if the sum of the digits of 2*a(n-1) + 1 is not yet in the sequence then a(n) = 2*a(n-1) + 1; otherwise a(n) is the sum of digits of a(n-1).

This page as a plain text file.
%I A348483 #37 Nov 19 2021 17:00:04
%S A348483 1,3,7,15,6,13,4,9,19,10,21,43,87,175,351,703,1407,12,25,51,103,207,
%T A348483 415,831,1663,16,33,67,135,271,543,1087,2175,4351,8703,18,37,75,151,
%U A348483 303,607,1215,2431,4863,9727,19455,24,49,99,199,399,799,1599,3199,22,45
%N A348483 a(1) = 1; if the sum of the digits of 2*a(n-1) + 1 is not yet in the sequence then a(n) = 2*a(n-1) + 1; otherwise a(n) is the sum of digits of a(n-1).
%C A348483 Numbers of the form 2 + 3*k will not appear in this sequence.
%C A348483 Do all other positive integers appear in this sequence?
%e A348483 a(4) = 15 because it is the double + 1 of a(3) = 7.
%e A348483 a(5) = 6 and not 31 because the sum of the digits of 15, 1 + 5 = 6 and 6 is not yet in the sequence.
%e A348483 a(6) = 13 because it is the double + 1 of a(5) = 6.
%e A348483 Written as an irregular triangle the sequence begins:
%e A348483    1,  3,  7,  15;
%e A348483    6, 13;
%e A348483    4,  9, 19;
%e A348483   10, 21, 43,  87, 175, 351,  703, 1407;
%e A348483   12, 25, 51, 103, 207, 415,  831, 1663;
%e A348483   16, 33, 67, 135, 271, 543, 1087, 2175, 4351, 8703;
%e A348483   18, 37, 75, 151, 303, 607, 1215, 2431, 4863, 9727, 19455;
%e A348483   24, 49, 99, 199, 399, 799, 1599, 3199;
%e A348483   ...
%t A348483 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 + 1], AppendTo[s, d]]]; s]; seq[50] (* _Amiram Eldar_, Oct 21 2021 *)
%o A348483 (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]+1), listput(v, s))); Vec(v); \\ _Jinyuan Wang_, Oct 21 2021
%Y A348483 Cf. A007953, A348400, A348433.
%K A348483 nonn,base
%O A348483 1,2
%A A348483 _Rodolfo Kurchan_, Oct 20 2021