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.

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.

This page as a plain text file.
%I A378316 #12 Dec 08 2024 17:23:38
%S A378316 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,
%T A378316 9,21,18,30,35,15,33,32,24,49,52,59,51,66,48,36,68,72,88,56,56,94,105,
%U A378316 85,64,119,110,70,18,35,91,93,83,108,119,109,104,114,73,79
%N 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.
%C A378316 Definition related to that of the paint sprayer sequence A279818 so we may see similar behaviors and plots for this sequence.
%C A378316 From _Michael De Vlieger_, Dec 08 2024: (Start)
%C A378316 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.
%C A378316 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.
%C A378316 A279818 is the case regarding m = 1.
%C A378316 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)
%H A378316 Michael De Vlieger, <a href="/A378316/b378316.txt">Table of n, a(n) for n = 1..10000</a>
%H A378316 Michael De Vlieger, <a href="/A378316/a378316.png">Log log scatterplot of a(n)</a>, n = 1..10^6.
%e A378316 From _Michael De Vlieger_, Dec 08 2024: (Start)
%e A378316 Let c(d) be the number of digits d in a(k), k = 1..n-2.
%e A378316 a(3) = 1 since a(1) = 1.
%e A378316 a(4) = 2 since a(2) = 2.
%e A378316 a(5) = 2 since a(1) = a(3) = 1, i.e., 1*c(1) = 1*2 = 2.
%e A378316 a(6) = 4 since a(2) = a(4) = 2, i.e., 2*c(2) = 2*2 = 4.
%e A378316 a(7) = 6 since a(2) = a(4) = a(5) = 2, i.e., 2*c(2) = 2*3 = 6.
%e A378316 a(13) = 11 since a(11) = 12, and 1*c(1) + 2*c(2) = 1*3 + 2*4 = 3+8 = 11.
%e A378316 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)
%t A378316 nn = 120; a[1] = i = 1; a[2] = j = 2; c[_] := 0;
%t A378316 Do[(k = Total@ Map[#1*(c[#1] += #2) & @@ # &, #]) &@
%t A378316   Tally@ IntegerDigits[i];
%t A378316   Set[{a[n], i, j}, {k, j, k}], {n, 3, nn}];
%t A378316 Array[a, nn] (* _Michael De Vlieger_, Dec 08 2024 *)
%Y A378316 Cf. A007953, A279818, A378359, A378360.
%K A378316 nonn,base,easy
%O A378316 1,2
%A A378316 _David James Sycamore_, Nov 23 2024