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.

A361501 A variant of A359143 in which all copies of a digit d are erased only when d is both the leading digit and the final digit of (a(n) concatenated with sum of digits of a(n)).

This page as a plain text file.
%I A361501 #39 Mar 21 2023 02:49:57
%S A361501 11,112,1124,11248,1124816,112481623,11248162328,1124816232838,
%T A361501 112481623283849,11248162328384962,1124816232838496270,
%U A361501 112481623283849627077,2486232838496270779,248623283849627077997,248623283849627077997113,248623283849627077997113118,248623283849627077997113118128
%N A361501 A variant of A359143 in which all copies of a digit d are erased only when d is both the leading digit and the final digit of (a(n) concatenated with sum of digits of a(n)).
%C A361501 Since we cannot list nonzero numbers with leading digit 0, we use a minus sign to represent a leading zero.
%C A361501 To compute a(n+1), let m denote the decimal string formed from a(n) by replacing a minus sign (if present) by a leading 0.
%C A361501 Let k denote the concatenation of m and its digit-sum.
%C A361501 If the first and last digits of k are equal, delete all copies of that digit from k.
%C A361501 If k has any leading zeros, replace them with a minus sign.  The result is a(n+1).
%C A361501 A359143 eventually reaches 0, but we do not know if the present sequence will reach 0, enter a loop, or grow without limit towards +infinity or -infinity.
%C A361501 From _Michael De Vlieger_, Mar 17 2023: (Start)
%C A361501 First negative term is a(146).
%C A361501 Sequence continues beyond 2^30 terms. (End)
%C A361501 From _Michael S. Branicky_, Mar 21 2023: (Start)
%C A361501 The sequence enters a loop of period L = 224339586.
%C A361501 Specifically, a(35179968) = a(259519554) = 8863336630330333333663833080638368062852636350393323037363535737238.
%C A361501 In this loop, the term with the fewest digits is a(101772740) = 48623, and the term with the most digits is a(251014293), with 940 digits. (End)
%H A361501 Michael De Vlieger, <a href="/A361501/b361501.txt">Table of n, a(n) for n = 0..10000</a>
%e A361501 a(11) = 112481623283849627077, which has digit-sum 91.
%e A361501 So k = 11248162328384962707791 both begins and ends with 1.
%e A361501 Erasing all the 1's from k gives a(12) = 2486232838496270779.
%t A361501 a[1] = {1, 1}; nn = 17;
%t A361501 Do[If[And[#2 == Last[#3], n > 2],
%t A361501        Set[k, DeleteCases[#1~Join~#3, #2]],
%t A361501        Set[k, #1~Join~#3]] & @@
%t A361501        {#, First[#], IntegerDigits@ Total[#]} &[a[n - 1]];
%t A361501   Set[a[n], k], {n, 2, nn}];
%t A361501 Array[(1 - 2 Boole[First[#] == 0])*FromDigits[#] &@ a[#] &, nn] (* _Michael De Vlieger_, Mar 17 2023 *)
%Y A361501 Cf. A359142, A359143, A361350.
%K A361501 sign,base
%O A361501 0,1
%A A361501 _N. J. A. Sloane_, Mar 17 2023