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

A329200 The ghost iteration (A): add or subtract the number formed by absolute differences of digits (A040115), according to parity (even or odd).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 11, 11, 15, 11, 19, 11, 23, 11, 27, 22, 20, 22, 22, 26, 22, 30, 22, 34, 22, 27, 33, 31, 33, 33, 37, 33, 41, 33, 45, 44, 38, 44, 42, 44, 44, 48, 44, 52, 44, 45, 55, 49, 55, 53, 55, 55, 59, 55, 63, 66, 56, 66, 60, 66, 64, 66, 66, 70, 66, 63, 77, 67, 77, 71, 77
Offset: 0

Views

Author

Eric Angelini and M. F. Hasler, Nov 09 2019

Keywords

Comments

Sequence A040115 is most naturally extended to 0 (empty sum) for single-digit arguments; that's what we use here. This value is added to n if even, subtracted if odd.
Repdigit numbers are the fixed points. Other starting values end in nontrivial loops under iterations of this map, like 11090 -> 10891 -> 12709 -> 11130 -> 11107 -> 11090 etc. Table A329196 lists these cycles, A329197 their lengths.
A329198 gives the size of n's orbit, i.e., the length of the trajectory until the terminating cycle is covered.

Examples

			For n = 101, the number formed by the absolute differences of digits is 11, since this is odd it is subtracted from n, so a(101) = 101-11 = 90.
		

Crossrefs

Cf. A040115, A329201 (variant B: add/subtract if odd/even).
Cf. A329196 (cycles), A329197 (lengths), A329198 (size of orbit of n).

Programs

  • PARI
    apply( A329200(n)={n+(-1)^(n=fromdigits(abs((n=digits(n+!n))[^-1]-n[^1])))*n}, [1..199])

Formula

a(n) = n + (-1)^d*d where d = A040115(n), 0 for n < 10.

A329624 Number of iterations of A329623 for starting value n before a repeated value appears, or -1 if this never happens.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10
Offset: 1

Views

Author

Scott R. Shannon, Nov 19 2019

Keywords

Comments

This sequence gives the number of iterations of A329623 for start value n before a repeated value first appears. Unlike the "ghost iteration" of A329200 the only fixed points are the single digits 0 to 9. See A328865 for the first repeating value.
Due to A329623(n) being significantly larger than n for some values of n, the iterative sequence can grow to infinity for some n. The first value to do so is n = 1373. This appears due to the occurrence of the digit string '62637' at the end of the term of the third iteration. These five digits reappear every second iteration at the end of the term, but with more and more digits preceding it. A329917 lists other divergent n values.
The smallest value, for n >= 10, which acts as an end point before repeating is 9, which is the final value for many starting values.
The digit string '8091' forms the basis of a very long convergent series for some values of n. The digit string consisting of an arbitrary number of copies of '80' followed by '91' will eventually converge to 8091, then 891, then 91, which finally converges in ten more iterations. We can thus form a number of arbitrary length using this rule which is guaranteed to converge. This sequence appears naturally with the starting value n = 139100 which converges to 9 after 136 iterations after reaching a term with 72 digits after 20 iterations. See the linked file below.
From M. F. Hasler, Dec 03 2019: (Start)
It seems the a(n) = -1 are conjectural, i.e., we have no proof that the terms for which the trajectory seems to "explode" do not eventually end up in a cycle. For example, the 8th iterate of 1373 is 5218725017016262626273. If the 2nd digit is changed from 2 to 0, then the further iterates appear to explode up to a length of 157 bits, but finally end up in a 2-cycle of 41-digit numbers (26...26273, 62...62637).
The "repeating values" are members of cycles, listed in A328142. Only fixed points 1, ..., 9 and 4*(10^k-1)/9 + 11, k >=3, and 6 infinite families of 2-cycles are known.
(End)
The first escape value is a(1373) = -1 (without proof). - Georg Fischer, Jul 16 2020

Examples

			a(1) = 1 as A329623(1) = 1, so a repeating value occurs after 1 iteration.
a(10) = 2 as A329623(10) = 9 and A329623(9) = 9, so a repeating value occurs after 2 iterations.
a(128) = 3, as A329623(128) = 182, A329623(182) = 728, A329623(728) = 182, so a repeating value occurs after 3 iterations.
		

Crossrefs

Sequences A324160, A226233, A179051, A140438, A132272 are unrelated; they begin with the same numbers as this sequence but differ after a(110) = 10, which ends the pattern of incrementing numbers, 2 through 11, repeated ten times.

Programs

  • PARI
    A329624(n,L=n^10,U=[n])=-!for(i=1,oo,setsearch(U,n=A329623(n))&&return(i); nM. F. Hasler, Dec 02 2019

A329198 Size of the orbit of n under "ghost iterations" A329200.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 5, 2, 4, 2, 3, 2, 3, 2, 3, 1, 2, 5, 2, 4, 2, 3, 2, 3, 2, 3, 1, 2, 5, 2, 4, 2, 3, 2, 3, 2, 3, 1, 2, 5, 2, 4, 2, 3, 2, 3, 2, 3, 1, 2, 5, 2, 4, 2, 3, 2, 3, 2, 3, 1, 2, 5, 2, 4, 2, 3, 2, 3, 2, 3, 1, 2, 5, 2, 4, 2, 3, 2, 3, 2, 3, 1, 2, 5, 2, 4, 2, 3, 2, 3, 2, 3, 1, 8, 6, 3, 6, 3, 6, 4, 6, 5, 6, 7, 1, 2, 6, 2, 5, 2, 4, 2, 4, 3, 8, 3, 3, 8, 3, 4, 3, 4, 3, 7, 6, 2
Offset: 0

Views

Author

M. F. Hasler, Nov 10 2019

Keywords

Comments

Or: Number of iterations of A329200 until a number is seen for the second time in the trajectory of n.
A329200 consists of adding to n the number whose digits are the differences of adjacent digits of n in case it is even, or subtracting it if it is odd.
The trajectory of most small numbers ends in a repdigit (A010785) which are fixed points of this map. Some larger numbers enter nontrivial cycles, cf. examples and A329196. In both cases, some number(s) will appear infinitely often in the trajectory. This sequence gives the number of iterations until a value is repeated for the first time in the trajectory of n. This is also the size of n's orbit, i.e. the total number of distinct values that will ever appear.
If n is part of the cycle, a(n) gives the length of the cycle; in particular a(n) = 1 for fixed points.
For 11 <= n <= 99 the pattern (1, 2, 5, 2, 4, 2, 3, 2, 3, 2, 3) of length 11 repeats, i.e., a(n) = a(n') if n = n' (mod 11). But the trajectory of congruent n with same a(n) does not always end in the corresponding repdigit, e.g., 11+2 and 22+2 both end in 22, 33+2 ends in 33, 44+2 ends in 44, 55+2 and 66+2 both end in 66, 77+2 and 88+2 in 77, etc.

Examples

			The smallest starting value for which the trajectory does not end in a fixed point is n = 8059: Here it enters after 14 iterations a cycle of length 5, 11090 -> 10891 -> 12709 -> 11130 -> 11107 -> 11090 etc., so a(8059) = 14 + 5 = 19.
Many other values after this n  (8079, 8260, 8262, ..., 9008, ...) enter the same loop at 11090, others (9060, 9062, 9064, 9066, ...) enter the same loop at 12709.
Starting value n = 37908 leads after two steps into the new cycle (44232, 44021, 43600, 44960, 45496, 44343) of length 6, so a(37908) = 8.
Starting value n = 68060 leads after 8 steps into a cycle of length 7, (75800, 78180, 79958, 77915, 78199, 79979, 82001), so a(68060) = 15.
a(70502) = 6 because this starting value leads after 3 steps into the loop (74780, 78098, 76207).
a(70515) = 20, entering the loop (111090, 110891, 112709, 111130, 111107) after 15 steps. See A329196 for more cycles and related information.
		

Crossrefs

Cf. A329200, A329196 (cycles), A329197 (length of cycles).
Cf. A329340 (analog for the variant A329201).

Programs

  • PARI
    A329198(n,M=oo,U=[n])={for(k=1,M,setsearch(U,n=A329200(n))&&return(k); U=setunion(U,[n]))}

Formula

a(n) = 1 <=> n is a fixed point of A329200 <=> n is a repdigit number (A010785).

A329196 Irregular table whose rows are the nontrivial cycles of the ghost iteration A329200, ordered by increasing smallest member, always listed first.

Original entry on oeis.org

10891, 12709, 11130, 11107, 11090, 43600, 44960, 45496, 44343, 44232, 44021, 74780, 78098, 76207, 75800, 78180, 79958, 77915, 78199, 79979, 82001, 110891, 112709, 111130, 111107, 111090, 180164, 258316, 224791, 227119, 232727, 221172, 220107, 217990, 201781
Offset: 1

Views

Author

M. F. Hasler, Nov 10 2019

Keywords

Comments

A329200 consists of adding the number whose digits are the absoute values of differences of adjacent digits of n in case it is even, or subtracting it if it is odd. Repdigits A010785 are fixed points of this map, but some numbers enter nontrivial cycles. This sequence lists these cycles, ordered by their smallest member which is always listed first. Sequence A329197 gives the row lengths.
Whenever all terms of a cycle have the same number of digits and same initial digit, then this digit can be prefixed k times to each term to obtain a different cycle of same length, for any k >= 0. (The corresponding "ghosts" A040115(n) are then the same, so the (cyclic) first differences are also the same and add again up to 0.) This is the case for rows 1, 2, 3, ... (but not row 4 or 6) of this table. Rows 5, 7 and 8 are the second members of these three families. We could call "primitive" the cycles which are not obtained from an earlier cycle by duplicating the initial digits.

Examples

			The table starts:
   n |  cycle #n  (length = A329197(n))
  ---+-----------------------------------------------------------------------
   1 |  10891,  12709,  11130,  11107,  11090
   2 |  43600,  44960,  45496,  44343,  44232,  44021
   3 |  74780,  78098,  76207
   4 |  75800,  78180,  79958,  77915,  78199,  79979, 82001
   5 | 110891, 112709, 111130, 111107, 111090
   6 | 180164, 258316, 224791, 227119, 232727, 221172, 220107, 217990, 201781
   7 | 443600, 444960, 445496, 444343, 444232, 444021
   8 | 774780, 778098, 776207
   9 | 858699, 891929, 873052
  10 | 1110891, 1112709, 1111130, 1111107, 1111090
  11 | 3270071, 3427147, 3301514
  12 | 4381182, 4538258, 4412625
  13 | 4443600, 4444960, 4445496, 4444343, 4444232, 4444021
  14 | 5492293, 5649369, 5523736
  15 | 7774780, 7778098, 7776207
  16 | 8858699, 8891929, 8873052
  17 | 11110891, 11112709, 11111130, 11111107, 11111090
  18 | 33270071, 33427147, 33301514
  19 | 44381182, 44538258, 44412625
  20 | 44443600, 44444960, 44445496, 44444343, 44444232, 44444021
  21 | 55492293, 55649369, 55523736
  22 | 77774780, 77778098, 77776207
  23 | 85869922, 89192992, 87305285
  24 | 88858699, 88891929, 88873052
  25 | 111110891, 111112709, 111111130, 111111107, 111111090
  26 | 333270071, 333427147, 333301514
  27 | 444381182, 444538258, 444412625
  28 | 444443600, 444444960, 444445496, 444444343, 444444232, 444444021
  29 | 555492293, 555649369, 555523736
  30 | 615930235, 670393447, 653027344, 665352754, 664129233, 666446943,
     | 666244592, 665824445, 664462444, 666486644, 666728664, 666884866,
     | 667089286, 668871048, 670887192, 653085505, 640702450
  31 | 777774780, 777778098, 777776207
  32 | 809513051, 898955405, 887815260, 888989606, 889100972, 887290047,
     | 885711004, 888971108, 889097126, 891089740, 909270974
  33 | 858699257, 891929989, 873052978
  34 | 885869922, 889192992, 887305285
  35 | 888858699, 888891929, 888873052
  36 | 1111110891, 1111112709, 1111111130, 1111111107, 1111111090
  37 | 3333270071, 3333427147, 3333301514
  38 | 4444381182, 4444538258, 4444412625
  39 | 4444443600, 4444444960, 4444445496, 4444444343, 4444444232, 4444444021
  40 | 5461740619, 5587375277, 5618817627, 5461741482, 5587374828, 5618818294
  41 | 5555492293, 5555649369, 5555523736
  42 | 6615930235, 6670393447, 6653027344, 6665352754, 6664129233,
     | 6666446943, 6666244592, 6665824445, 6664462444, 6666486644,
     | 6666728664, 6666884866,
     | 6667089286, 6668871048, 6670887192, 6653085505, 6640702450
  43 | 7777774780, 7777778098, 7777776207
  44 | 8858699257, 8891929989, 8873052978
  45 | 8885869922, 8889192992, 8887305285
  46 | 8888858699, 8888891929, 8888873052
  47 | 11111110891, 11111112709, 11111111130, 11111111107, 11111111090
  48 | 31128941171, 33145094237, 33376689451, 33417710965, 33281649034,
     | 33114123103, 32910811890
  49 | 44444443600, 44444444960, 44444445496, 44444444343,
     | 44444444232, 44444444021
The smallest starting value for which the trajectory under A329200 does not end in a fixed point is n = 8059: This leads into a cycle of length 5, 11090 -> 10891 -> 12709 -> 11130 -> 11107 -> 11090. "Rotated" as to start with the smallest member, this yields the first row of this table, (10891, 12709, 11130, 11107, 11090).
Starting value n = 37908 leads after two steps into the next cycle (44232, 44021, 43600, 44960, 45496, 44343), of length 6. Again "rotating" this list as to start with the smallest member, it yields the second row of this table.
Starting value n = 68060 leads after 8 steps into a new cycle of length 7, (75800, 78180, 79958, 77915, 78199, 79979, 82001). However, this will NOT give row 3 but only row 4, because:
The starting value 70502 leads after 3 steps into the loop (74780, 78098, 76207) which comes lexicographically earlier than the previously mentioned cycle of length 7. Therefore this is row 3 of this table.
Starting value 70515 enters the loop (111090, 110891, 112709, 111130, 111107) after 15 steps. This becomes row 5.
This row 5 is the same as row 1 with the initial digit 1 duplicated in each term: it is the second member of this infinite family of cycles of length 5. Similarly, rows 2 and 3 (where all terms have the same length and initial digit) also lead to infinite families of cycles by successively duplicating the initial digit of each term.
The pattern 858699257(257|857)*84302(302|342)* also yields cycles. - _Lars Blomberg_, Nov 15 2019
		

Crossrefs

Cf. A329197 (row lengths), A329200, A329198.
Cf. A329342 (analog for the variant A329201).

Programs

  • PARI
    T(n,T=[n])={while(!setsearch(Set(T),n=A329200(n)), T=concat(T,n));T} /* trajectory; is a cycle when n is a member of it */
    {U=0; M=[]; for(n=9,oo, bittest(U>>=1,0) && next; if(M && n>M[1], print(T(M[1])); M=M[^1]); t=n; V=U; while( !bittest(U,-n+t=A329200(t)), t>n || next(2); U+=1<<(t-n)); bittest(V,t-n) || #Set(digits(t))==1 || M=setunion(M,[vecmin(T(t))]) )}

Extensions

Rows 9 through 35 from Scott R. Shannon, Nov 12 2019
Table of cycles extended by Lars Blomberg, Nov 15 2019

A328865 The first repeating term in the trajectory of n under iterations of A329623, or -1 if no such terms exists.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9
Offset: 1

Views

Author

Scott R. Shannon, Nov 24 2019

Keywords

Comments

A329623(n) = |n - A053392(n)|, where A053392 is the concatenation of the sums of pairs of consecutive digits.
This is the first number which appears twice for the iteration of A329623 starting with n. See A329624 for an explanation of the sequence, and for the number of iterations required before reaching this value. Terms a(9) to a(127) are all 9's, after which the sequence shows large jumps in value, e.g., a(1673) = 62626262626262626262626262637.
All -1 are so far conjectural, see A329624 and A329917 for more information.
The terms > 0 of this sequence are elements of cycles for A329623. Only 2-cycles and fixed points 1, 2, ..., 9 and 4...455 are known. Therefore a(n) is the earliest A329623^{k}(n) = A329623^{k+2}(n) if such k exist. See A328142 for the list of all possible values and more precise definitions. - M. F. Hasler, Dec 06 2019
The first escape value is a(1373) = -1. - Georg Fischer, Jul 16 2020

Examples

			a(10) = 9 as A329623(10) = 9, and A329623(9) = 9, thus 9 is the first repeating value.
a(128) = 182, as A329623(128) = 182, A329623(182) = 728, A329623(728) = 182, thus 182 is the first repeating value.
a(210) = 637, as A329623(210) = 179, A329623(179) = 637, A329623(637) = 273, A329623(273) = 637, thus 637 is the first repeating value.
		

Crossrefs

Programs

Extensions

Incorrect comment, link and program deleted following an observation by Scott R. Shannon, Nov 27 2019

A329917 Starting values for which iterations of A329623 diverge (conjectural).

Original entry on oeis.org

1373, 1374, 1375, 1376, 1377, 1378, 1379, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2382, 2383, 2384
Offset: 1

Views

Author

Scott R. Shannon, Nov 24 2019

Keywords

Comments

These are the starting values n for which the trajectory under iterations of A329623 grows without limit. See A329624 for an explanation of the sequence.
There are 466 terms below 10000.
From M. F. Hasler, Dec 02 2019: (Start)
There is no term below 10^3, but beyond 10^4 they become much more frequent: roughly 1/3 of all numbers between 10^4 and 5*10^4 are in the sequence.
The sequence consists mostly in runs of consecutive numbers ending with the next larger term with final digit 9: 1373..1379, 1382..1389, 1391..1399, 1591..1599, 1891..1899, 2373..2379, ... In some ranges, like a(152) = 4010 to a(240) = 4181, a(307) = 6010 to a(352) = 6391, a(467) = 10010 to a(556) = 11090, ..., this pattern is reversed: the runs start with a multiple of 10.
However, all these terms are so far only conjectural. We have no proof that the terms for which the trajectory seems to "explode" do not eventually end up in a cycle. For example, the 8th iterate of a(1) = 1373 is 5218725017016262626273. If the 2nd digit is changed from 2 to 0, then the further iterates grow to a length of 52 digits, but finally end up in a 2-cycle of 45-digit numbers (26...26273, 62...62637). (All members of cycles are listed in A328142.)
(End)

Examples

			The first term to diverge is n = 1373. The iterative sequence begins 1373, 39637, 1176273, 26962637, 8124626273, 85486262637, 13826662626273, 411094294626262637, 5218725017016262626273, 68697250170162626262637, 141346472501701626262626273, ... The digits '62637' reappear at the end of the terms every second iteration.
While 50, 500 and 5000 reach the fixed point 9, 455, resp. 4444455 after 5, 3, resp. 8 iterations, the starting value 50000 is in this sequence: after the 10th iteration, the result is of the form 991...903544444455 and keeps this form (prefix alternating with 1810....) with an ever growing string of 4's. - _M. F. Hasler_, Dec 02 2019
		

Crossrefs

Programs

  • PARI
    is_A329917(n, L=n^10, U=[n])=!for(i=1, oo, setsearch(U, n=A329623(n))&&return; nM. F. Hasler, Dec 02 2019

Extensions

Name and comment edited by M. F. Hasler, Dec 02 2019

A328680 The number of iterations before a repeated value appears when starting from n and performing the iterative cycle as described in the comments, which involves setting the next iterative number to either A053392 or A040115 depending on the current numbers' size relative to n.

Original entry on oeis.org

2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5
Offset: 1

Views

Author

Scott R. Shannon, Dec 03 2019

Keywords

Comments

This sequence is based on the following iterative cycle. Start with n, set m = A040115(n), the concatenation of the absolute values of differences between adjacent digits, and then repeat the following until the number m has been previously seen: if m is greater than n, let m = A040115(m), otherwise let m = A053392(m), the concatenation of the sums of pairs of adjacent digits.
For all starting values n the iteration eventually converges to 0 or else goes into a cycle of finite length. When the number m gets larger than the iteration's starting value n it will always have its magnitude decreased by the operation m = A040115(m), while m = A053392(m) can either increase or decrease its magnitude, depending on the digit values of m. This has the overall effect of never allowing the iterative values to increase without limit as is seen in the similar iterations A328975 and A329624.
All the values of A053393 are seen as repeating values in this sequence, although this sequence has significantly more; probably an infinite number, although this is unknown. The first nonzero repeating value is not seen until a(9090), which forms the two-member loop of 999 -> 1818 -> 999. The first starting value that leads to an m value greater than the initial starting value is a(10090), see examples below. A330159 lists the starting values which are also the first repeating value.
For the first 20 million terms the longest iterative sequence is seen for a(18505180) which takes 457 steps before reaching 0. See attached link. The longest found looping sequence is for a(14106482) which reaches 1040103 after 5 steps and then again after 116 steps, forming a loop of length 111. The largest number found which starts the repeating loop is for a(9265011) which reaches 1411131715 after 9 iterations and then again after 41 iterations.
From a(12) to a(99) the sequence repeats a pattern of ten 3's followed by a 2. After that, a(100) = 4 and the terms begin to show a slow average increase in value.

Examples

			a(10) = 3 as A040115(10) = 1, A053392(1) = 0, and A053392(0) = 0, taking three steps to repeat from 10.
a(1060) = 7 as A040115(1060) = 166, A053392(166) = 712, A053392(712) = 83, A053392(83) = 11, A053392(11) = 2, A053392(2) = 0, A053392(0) = 0, taking seven steps to repeat from 1060.
a(10090) = 11 as A040115(10090) = 1099, A053392(1099) = 1918, A053392(1918) = 10109, A040115(10109) = 1119, A053392(1119) = 2210, A053392(2210) = 431, A053392(431) = 74, A053392(74) = 11, A053392(11) = 2, A053392(2) = 0, A053392(0) = 0, taking eleven steps to repeat from 11090.
		

Crossrefs

A329340 Size of the orbit of n under "ghost iterations" A329201 (rule B).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 2, 3, 2, 3, 2, 4, 2, 5, 2, 1, 3, 2, 3, 2, 3, 2, 4, 2, 5, 2, 1, 3, 2, 3, 2, 3, 2, 4, 2, 5, 2, 1, 3, 2, 3, 2, 3, 2, 4, 2, 5, 2, 1, 3, 2, 3, 2, 3, 2, 4, 2, 5, 2, 1, 3, 2, 3, 2, 3, 2, 4, 2, 5, 2, 1, 3, 2, 3, 2, 3, 2, 4, 2, 5, 2, 1, 3, 2, 3, 2, 3, 2, 4, 2, 5, 2, 1, 3, 4, 3, 6, 3, 5, 3, 5, 3, 5, 2, 1, 3, 2, 3, 2, 5, 2, 9, 2, 4
Offset: 0

Views

Author

M. F. Hasler, Nov 11 2019

Keywords

Comments

Or: Number of iterations of A329201 until a number is seen for the second time in the trajectory of n.
A329201 consists of subtracting from or adding to n, depending on whether it is even or odd, the number A040115(n) whose digits are the differences of adjacent digits of n.
The trajectory of all numbers < 8000 ends in a repdigit (A010785), which are fixed points of this map. Some larger numbers enter nontrivial cycles, cf. A329342. In both cases, some number(s) will appear infinitely often in the trajectory. This sequence gives the number of iterations until a value is repeated for the first time in the trajectory of n. This is also the size of n's orbit, i.e. the total number of distinct values that will occur.
If n is part of a cycle (n in A329342), a(n) gives the length of the cycle; in particular a(n) = 1 for fixed points.
For 11 <= n <= 99 the pattern ( 1, 3, 2, 3, 2, 3, 2, 4, 2, 5, 2) of length 11 repeats. But the trajectory of those n with same a(n) does not always end in the corresponding repdigit.

Examples

			For repdigits A010785 and in particular single-digit numbers, {0, 1, ..., 9, 11, 22, ...}, A329201(n) = n, so O(n) = {n} and a(n) = 1.
For others we have:
10 -> 11, so a(10) = #{10, 11} = 2.
12 -> 13 -> 11, so a(10) = #{12, 13, 11} = 2. Also 23 -> 24 -> 22, so a(23) = 3, and similarly for 34, 45, 56, 67 and 78. But 89 -> 90 -> 99, the next *larger* repdigit!
20 -> 18 -> 25 -> 28 -> 22, whence a(20) = 5. Similarly, 31 -> 29 -> 36 -> 39 -> 33, a(31) = 5, too. But 42 -> 40 -> 36 -> 39 -> 33 goes to the next *lower* repdigit, yet still has a(42) = 5.
		

Crossrefs

Cf. A329201, A329197 (analog for A329200), A329342 (list of cycles), A329341 (length of cycles), A329196, A329197 (cycles for A329200).

Programs

  • PARI
    apply( A329340(n,M=oo,U=[n])={for(k=1,M,setsearch(U,n=A329201(n))&&return(k); U=setunion(U,[n]))}, [0..122])

Formula

a(n) = 1 <=> n is a fixed point of A329201 <=> n is a repdigit number (A010785).
a(n) = a(n') if 11 <= n, n' <= 99 and n == n' (mod 11).
a(n) = # orbit(n) where orbit(n) = { (A329201^k)(n); k >= 0 }.

A329341 Length of nontrivial cycles under the ghost iteration A329201, as listed in the table A329342.

Original entry on oeis.org

3, 7, 3, 6, 5, 3, 3, 6, 9, 12, 5, 3, 3, 3, 3, 6, 3, 5, 4, 3, 3, 3, 3, 3, 6, 3, 5, 4, 11, 3, 3, 3, 3, 17, 3, 3, 6, 3, 3, 5, 11
Offset: 1

Views

Author

M. F. Hasler, Nov 10 2019

Keywords

Comments

A329201 consists of adding or subtracting the number A040115(n) whose digits are the difference between adjacent digits of n, depending on its parity. Repdigits A010785 are fixed points of this map, but some numbers enter nontrivial cycles. Sequence A329342 lists these cycles, ordered by their smallest member which is always listed first. This sequence gives the row lengths.

Examples

			a(1) = 3 is the length of the first cycle, (8290, 8969, 9102).
a(2) = 7 is the length of the next cycle, (17998,  24199,  21819,  20041,  22084,  21800, 20020).
a(3) = 3 = a(7) is the length of all members of the family starting with (21901, 23792, 25219) and continued by duplicating the initial digit of each term.
a(4) = 6 = a(8) is the length of all members of the family starting with (54503,  55656,  55767,  55978,  56399,  55039), extended as above.
a(5) = 5 = a(11) is the length of all members of the family starting with (87290,  88869,  88892,  88909,  89108), extended as above.
		

Crossrefs

Cf. A329342 (table of cycles), A329201, A329197 (analog for A329200), A329198.

Extensions

a(12) - a(41) from Scott R. Shannon, Nov 12 2019

A330159 The self-repeating start values of the iterative sequence A328680.

Original entry on oeis.org

91711, 91712, 141691, 151481, 161271, 271161, 1310812, 5020232, 10117443, 11552816, 14118522, 14149412, 14821815, 31410828, 35523710, 41113743, 46211402, 84404483, 91186117
Offset: 1

Views

Author

Scott R. Shannon, Dec 03 2019

Keywords

Comments

This sequences lists the self-repeating starting values n for the iterative sequence defined in A328680 up to starting values of n = 10^8. Each number in this sequence, when acting as the starting value for the A328680 iteration, will be the first number repeated in the iteration. Note that the other numbers appearing in the iterative sequence for a given start value n will in general NOT be other entries of this sequence as the iteration depends critically on the start value of n itself. As can be seen these numbers are quite rare, there being only 19 entries for n up to 100 million. It is unknown if this is a finite or infinite sequence.

Examples

			91711 is in the sequence as A040115(91711) = 8660, A053392(8660) = 14126, A053392(14126) = 5538, A053392(5538) = 10811, A053392(10811) = 1892, A053392(1892) = 91711, repeating the starting value 91711.
		

Crossrefs

Showing 1-10 of 10 results.