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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

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, 39, 51, 19, 55, 20, 14, 35, 43, 49, 86, 96, 93, 96, 117, 41, 50, 30, 27, 51, 50, 40, 40, 44, 52, 63, 72, 62, 70, 49, 146, 130, 50, 50, 55, 65, 130, 54, 139, 157, 156, 172, 109, 131
Offset: 1

Views

Author

David James Sycamore, Dec 19 2016

Keywords

Comments

Note that the numbers 3,5,6,11, etc. do not appear.
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.
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, ...
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).
Scott R. Shannon's plot has an unusual paint-sprayer appearance. - N. J. A. Sloane, Jan 02 2020
From Michael De Vlieger, Dec 31 2020: (Start)
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.
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.
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.
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.
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.
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.
We can thus identify the first term m that instigates all streams 1 <= k <= 511.
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.
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.
(End)

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    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 *)
  • 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

Extensions

Partially edited by N. J. A. Sloane, Sep 03 2021

A378316 a(1) = 1, a(2) = 2. For n > 2, a(n) is the sum of the digits of a(n-2) plus the sum of the same digits occurring in all terms a(i); 1 <= i <= n-2.

Original entry on oeis.org

1, 2, 1, 2, 2, 4, 6, 4, 6, 8, 12, 8, 11, 16, 5, 24, 5, 22, 10, 14, 7, 24, 7, 36, 14, 27, 33, 39, 9, 21, 18, 30, 35, 15, 33, 32, 24, 49, 52, 59, 51, 66, 48, 36, 68, 72, 88, 56, 56, 94, 105, 85, 64, 119, 110, 70, 18, 35, 91, 93, 83, 108, 119, 109, 104, 114, 73, 79
Offset: 1

Views

Author

David James Sycamore, Nov 23 2024

Keywords

Comments

Definition related to that of the paint sprayer sequence A279818 so we may see similar behaviors and plots for this sequence.
From Michael De Vlieger, Dec 08 2024: (Start)
Let c(d) be the cardinality of digits d in a(k), k = 1..n-m. Then a(n) is the sum of d*c(d) across the set of (distinct) digits in a(n-m), m = 2. Then it is easy to see that zeros have no effect on the sums.
Scatterplot shows "rays" associated with distinct digits in a(n-2), therefore there are 2^(b-1) rays. Since b = 10, there are 512 rays in the plot, just as there are in A279818.
A279818 is the case regarding m = 1.
A378360(n) is the sum of (d+[d=0])*c(d) across the set of digits in a(n-m), m = 1, starting instead with a(1) = 0, so as to count zeros, and thus the scatterplot shows 1024 rays. (End)

Examples

			From _Michael De Vlieger_, Dec 08 2024: (Start)
Let c(d) be the number of digits d in a(k), k = 1..n-2.
a(3) = 1 since a(1) = 1.
a(4) = 2 since a(2) = 2.
a(5) = 2 since a(1) = a(3) = 1, i.e., 1*c(1) = 1*2 = 2.
a(6) = 4 since a(2) = a(4) = 2, i.e., 2*c(2) = 2*2 = 4.
a(7) = 6 since a(2) = a(4) = a(5) = 2, i.e., 2*c(2) = 2*3 = 6.
a(13) = 11 since a(11) = 12, and 1*c(1) + 2*c(2) = 1*3 + 2*4 = 3+8 = 11.
a(15) = 5 since a(13) = 11, and 1*c(1) = 1*5 = 5; note, there is 1 distinct digit d = 1, but two 1's in a(13), etc. (End)
		

Crossrefs

Programs

  • Mathematica
    nn = 120; a[1] = i = 1; a[2] = j = 2; c[_] := 0;
    Do[(k = Total@ Map[#1*(c[#1] += #2) & @@ # &, #]) &@
      Tally@ IntegerDigits[i];
      Set[{a[n], i, j}, {k, j, k}], {n, 3, nn}];
    Array[a, nn] (* Michael De Vlieger, Dec 08 2024 *)
Showing 1-2 of 2 results.