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-4 of 4 results.

A359143 The sum-and-erase sequence starting at 11: a(0) = 11; for n>=1, let m = a(n-1), and if m < 0, change m to an improper decimal "number" by replacing the minus sign by a single leading zero; then a(n) = A359142(m).

Original entry on oeis.org

11, 112, 1124, 11248, 2486, 4860, 486018, 48601827, 4860182736, 8601827365, 860182736546, 86018273654656, 8601827365465667, 601273654656670, -1273545704, -127354570438, -12735457043849, -1273545704384962, 1273545743849627, 127354574384962777, 273545743849627779
Offset: 0

Views

Author

N. J. A. Sloane, Jan 31 2023, based on suggestions from Eric Angelini and Hans Havermann

Keywords

Comments

Although this entry was only created in January, 2023, the problem had already been extensively studied in 2022.
Comment from Michael S. Branicky, Jul 26 2022: (Start)
Starting at 11, this first reaches 0 at step 1399141.
The longest string encountered has length 222:
444444414144444454144444145454455155154545515454564756517555545657676664\
465677675961617616416561527541551562575592651853254255356658359962263264\
365667368971272273374676377982812823836853869892911922935952968991101010\
121016.
(End)
It is conjectured that every starting number will eventually enter a cycle or reach 0 (see A359142 for small examples).
The first nontrivial cycle has length 583792 and the smallest number in it is 3374 (see the "Cycles in ..." Havermann link).
There is no b-file, but instead there is an a-file from Hans Havermann giving the sequence in full in b-file format, from a(0) to a(1399141). Beware, this is a 106.5 MB file. - N. J. A. Sloane, Feb 01 2023
From Michael S. Branicky, Sep 06 2023: (Start)
There are additional cycles with lengths
- 20173, containing 34674044445,
- 46, containing 9982228989928229222222829202026260298265278295291026. (End)

Crossrefs

Programs

  • Mathematica
    a[1] = {1, 1}; nn = 21; Do[If[FreeQ[#3, #2], Set[k, #1~Join~#3], Set[k, #1~Join~#3]; Set[k, DeleteCases[#1~Join~#3, #2]]] & @@ {#, First[#], IntegerDigits@ Total[#]} &[a[n - 1]]; Set[a[n], k], {n, 2, nn}]; Array[(1 - 2 Boole[First[#] == 0])*FromDigits@ # &@ a[#] &, nn] (* Michael De Vlieger, Mar 16 2023 *)

A359144 Indices k such that A359142(k) is negative.

Original entry on oeis.org

109, 1009, 1018, 1019, 1027, 1028, 1029, 1036, 1037, 1038, 1039, 1045, 1046, 1047, 1048, 1049, 1054, 1055, 1056, 1057, 1058, 1059, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1081, 1082, 1083, 1084, 1085, 1086, 1087
Offset: 1

Views

Author

N. J. A. Sloane, based on a comment from M. F. Hasler which was formerly in A359142, Feb 01 2023

Keywords

Crossrefs

Cf. A359142.

Programs

  • Mathematica
    A359144Q[n_]:=Module[{d=IntegerDigits[n],s,u},If[MemberQ[s=IntegerDigits[Total[d]],First[u=Join[d,s]]],u=DeleteCases[u,First[u]]];FromDigits[u]>0&&First[u]==0];Select[Range[2000],A359144Q] (* Paolo Xausa, Oct 11 2023 *)

Extensions

a(9) and beyond from Michael S. Branicky, Feb 01 2023

A361350 A variant of A359143 which includes the intermediate terms before digits are deleted (see Comments for precise definition).

Original entry on oeis.org

11, 112, 1124, 11248, 1124816, 2486, 248620, 4860, 486018, 48601827, 4860182736, 486018273645, 8601827365, 860182736546, 86018273654656, 8601827365465667, 860182736546566780, 601273654656670, 60127365465667064, -1273545704, -127354570438, -12735457043849, -1273545704384962, -127354570438496270, 1273545743849627, 127354574384962777, 12735457438496277791, 273545743849627779
Offset: 0

Views

Author

N. J. A. Sloane, Mar 16 2023

Keywords

Comments

This is essentially the same sequence as A359143 (so this too is a finite sequence), the difference being that it includes the terms before any digits are cancelled. Let S be the digit string of a(n), replacing a minus sign if present by 0.
Let T = S concatenated with the digit-sum of S.
If the leading digit of T is not present in the digit-sum of S, then a(n+1) = A359142(T), as in A359143.
If the leading digit of T is present in the digit-sum of S, then we add two new terms instead of one: a(n+1) = a(n) concatenated with the digit-sum of S, and a(n+2) = A359142(T), as in A359143.

Examples

			The digit strings for the initial terms are:
  11,
  112,
  1124,
  11248,
  1124816,
  2486,
  248620,
  4860,
  486018,
  48601827,
  4860182736,
  486018273645,
  8601827365,
  860182736546,
  86018273654656,
  8601827365465667,
  860182736546566780,
  601273654656670,
  60127365465667064,
  01273545704,
  0127354570438,
  012735457043849,
  01273545704384962,
  0127354570438496270,
  1273545743849627,
  127354574384962777,
  12735457438496277791,
  273545743849627779, ...
The sequence itself is obtained by replacing the leading zeros by minus signs.
For example, after the term 601273654656670, we first append its digit-sum 64, getting 60127365465667064. Since the leading digit 6 is present in 64, we cancel all the 6's, getting 01273545704. The corresponding term in the sequence is -1273545704.
		

Crossrefs

Programs

  • Mathematica
    a[1] = {1, 1}; nn = 28;
    Do[Which[ListQ[m], k = m; Clear[m],
          FreeQ[#3, #2], Set[k, #1~Join~#3],
          True, Set[k, #1~Join~#3];
          Set[m, DeleteCases[#1~Join~#3, #2]]] & @@
           {#, First[#], IntegerDigits@ Total[#]} &[a[n - 1]];
     Set[a[n], k], {n, 2, nn}];
    Array[(1 - 2 Boole[First[#] == 0])*FromDigits@ # &@ a[#] &, nn] (* Michael De Vlieger, Mar 16 2023 *)

Extensions

More than the usual number of terms are shown in order to clarify the differences from A359143.

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)).

Original entry on oeis.org

11, 112, 1124, 11248, 1124816, 112481623, 11248162328, 1124816232838, 112481623283849, 11248162328384962, 1124816232838496270, 112481623283849627077, 2486232838496270779, 248623283849627077997, 248623283849627077997113, 248623283849627077997113118, 248623283849627077997113118128
Offset: 0

Views

Author

N. J. A. Sloane, Mar 17 2023

Keywords

Comments

Since we cannot list nonzero numbers with leading digit 0, we use a minus sign to represent a leading zero.
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.
Let k denote the concatenation of m and its digit-sum.
If the first and last digits of k are equal, delete all copies of that digit from k.
If k has any leading zeros, replace them with a minus sign. The result is a(n+1).
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.
From Michael De Vlieger, Mar 17 2023: (Start)
First negative term is a(146).
Sequence continues beyond 2^30 terms. (End)
From Michael S. Branicky, Mar 21 2023: (Start)
The sequence enters a loop of period L = 224339586.
Specifically, a(35179968) = a(259519554) = 8863336630330333333663833080638368062852636350393323037363535737238.
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)

Examples

			a(11) = 112481623283849627077, which has digit-sum 91.
So k = 11248162328384962707791 both begins and ends with 1.
Erasing all the 1's from k gives a(12) = 2486232838496270779.
		

Crossrefs

Programs

  • Mathematica
    a[1] = {1, 1}; nn = 17;
    Do[If[And[#2 == Last[#3], n > 2],
           Set[k, DeleteCases[#1~Join~#3, #2]],
           Set[k, #1~Join~#3]] & @@
           {#, First[#], IntegerDigits@ Total[#]} &[a[n - 1]];
      Set[a[n], k], {n, 2, nn}];
    Array[(1 - 2 Boole[First[#] == 0])*FromDigits[#] &@ a[#] &, nn] (* Michael De Vlieger, Mar 17 2023 *)
Showing 1-4 of 4 results.