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.

A279818 a(n+1) = sum of digits of a(n), plus sum of same digits arising in all prior terms; a(1)=1.

This page as a plain text file.
%I A279818 #46 Jun 20 2025 20:23:41
%S A279818 1,1,2,2,4,4,8,8,16,9,9,18,28,38,43,18,53,14,22,10,7,7,14,28,68,76,39,
%T A279818 39,51,19,55,20,14,35,43,49,86,96,93,96,117,41,50,30,27,51,50,40,40,
%U A279818 44,52,63,72,62,70,49,146,130,50,50,55,65,130,54,139,157,156,172,109,131
%N A279818 a(n+1) = sum of digits of a(n), plus sum of same digits arising in all prior terms; a(1)=1.
%C A279818 Note that the numbers 3,5,6,11, etc. do not appear.
%C A279818 Let the string (n1,n2,n3...n9) represent the number of times the digits 1,2,3...9 have appeared so far in all terms up to and including a(n). If a(n) has decimal expansion di dj ... dr then a(n+1) = ni*di + nj*dj + ... + nr*dr.
%C A279818 Let S(r) denote the analogous sequence obtained with initial term a(1) = r. The present sequence is S(1), and S{2} = 2, 2, 4, 8, 8, 16, 7, 7, 14, 14, 19, ...
%C A279818 S{11} = 11, 2, 2, 4, 4, 8, 8, 16, 9, 9, ... is the same as S{1} except at the start where 11 replaces 1,1 (there is no distinction between 1,1 and 11 in the generation of terms).
%C A279818 _Scott R. Shannon_'s plot has an unusual paint-sprayer appearance. - _N. J. A. Sloane_, Jan 02 2020
%C A279818 From _Michael De Vlieger_, Dec 31 2020: (Start)
%C A279818 The "paint sprayer" streams k relate to the set D of nonzero distinct digits d in m, the term a(n-1) that precedes a(n) in the stream.
%C A279818 We may compactify the set D as k = Sum_{d in D} 2^(d - 1) and thus label each stream k. Since there are b nonzero base-b digits and since we cannot have a null D except in the case of m=0 (which is not in the sequence), there are thus N = 2^(b-1)-1 streams. For the decimal case herein, we have N = 2^9-1 = 511 possible streams. The base b=6 case thus has N = 2^5-1 or 31 streams.
%C A279818 Let c_d(n) be the number of digits d in a(n) and let s_d(n) be the partial sums of c_d(n) for 1 <= n. We may redefine a(n) = Sum_{d in D} s_d(n). This explains the "curve" of the streams in the plot and their seemingly random crossings.
%C A279818 The lower bound of a(n) relates to the stream k = 1, stemming from progenitor m whose digits are limited to 1s and possibly some 0s. For n > 96, the lower bound of a(n) = s_1(n), the total number of 1s in the sequence at index n.
%C A279818 The upper bound of a(n) relates to the sum of all s_d(n), however, we do not see a term m that instigates a stream k = 511 until we have "pandigital" m. For the purposes of this sequence, we call a number that has at least one copy of all nonzero digits d in base b.
%C A279818 The first instance of pandigital m is a(3994834)=127643598. We see that the following term 137801427 sets a record and is the first term in the stream k = 511. In base b=6, the smallest pandigital m is a_6(450)=2050, which is written "13254" in base 6.
%C A279818 We can thus identify the first term m that instigates all streams 1 <= k <= 511.
%C A279818 For a(n) = m with 1 <= n <= 2^22, we see m repeated at most 4 times. An example of m appearing 4 times is m = 50 at n in {43, 47, 59, 60}. We can certify 10 such occurrences of m repeated 4 times in the stated range.
%C A279818 a(n) = n for n in {1, 8, 573} and 1 <= n <= 2^22. Are there any more instances of a(n) = n? We note that s_1(n) > n for 877824 <= n <= 2007412. Therefore it is possible to have a(n) = n outside of that range.
%C A279818 (End)
%H A279818 Scott R. Shannon, <a href="/A279818/b279818.txt">Table of n, a(n) for n = 1..20000</a>
%H A279818 Michael De Vlieger, <a href="http://www.vincico.com/seq/a279818.html">Explanation of the streams</a> evident in the plot of this sequence.
%H A279818 Michael De Vlieger, <a href="/A279818/a279818_1.png">Log log plot of a(n) for n = 1..4000000</a> showing records in red, local minima in blue, and indicating the first term of each stream k= 1..511 in gold.
%H A279818 Michael De Vlieger, <a href="/A279818/a279818_2.png">Log log plot of s_d(n) for n = 1..2^18</a> using a color function to indicate d where d=1 is red, d=9 is purple, and d=0 is black.
%H A279818 Michael De Vlieger, <a href="/A279818/a279818_3.png">Example of progenitors a(n-1) that produce a(n)</a> that pertain to digit signature k=138 (i.e., a(n-1) has digits 1, 2, 4, and 8 and any number of zeros). a(n-1) is blue, a(n) in red.
%H A279818 Michael De Vlieger, <a href="/A279818/a279818_4.png">Plot of a_6(n) for n = 1..6^7</a> (base 6 version of this sequence for comparison, exhibiting N = 2^5-1 = 31 streams).
%H A279818 Michael De Vlieger, <a href="/A279818/a279818.txt">Table of the least term m of a given digit signature k</a>, or the first term in stream k.
%H A279818 Michael De Vlieger, <a href="/A279818/a279818_1.txt">Lineages k represented among the records in this sequence</a> for n = 1..2^22.
%H A279818 Scott R. Shannon, <a href="/A279818/a279818.png">Plot of a(n) for n = 1..1000000</a>.
%e A279818 a(2)=1, the sum of digits of a(1); a(3)=1+1=2, the sum of digits of a(1) and a(2), the only terms so far to contain digit 1; a(4)=2, the sum of digits of a(3), the only term so far to contain digit 2; a(5)=2+2=4, since 2 is the only digit appearing in a(4) and a(3); a(6)=4, a(7)=8; etc.
%t A279818 Block[{a = {1}, s}, Array[Set[s[#], 0] &, 9]; Do[(MapIndexed[AddTo[s[First[#2]], #1] &, #]; AppendTo[a, Total@ Map[# s[#] &, Position[#, _?(# > 0 &)][[All, 1]] ]]) &@ Most@ DigitCount@ Last@ a, 69]; a ] (* _Michael De Vlieger_, Dec 31 2020 *)
%o A279818 (PARI) lista(nn) = {my(a=1, vsd = vector(9)); print1(a, ", "); for (n = 2, nn, my(s = sumdigits(a)); my(dd = Set(digits(a))); my(rd = digits(a)); a = s + sum(k=1, #dd, if (dd[k], vsd[dd[k]])); print1(a, ", "); for (k=1, #rd, if (rd[k], vsd[rd[k]] += rd[k]);););} \\ _Michel Marcus_, Nov 06 2019
%Y A279818 Cf. A007953, A378359, A378360.
%K A279818 nonn,base,look
%O A279818 1,3
%A A279818 _David James Sycamore_, Dec 19 2016
%E A279818 Partially edited by _N. J. A. Sloane_, Sep 03 2021