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

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

A328142 Elements of cycles for iterations of A329623: n -> |n - concat(sum of adjacent digits of n)|.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 182, 273, 364, 455, 546, 637, 728, 1728, 2637, 3546, 4455, 5364, 6273, 7182, 17182, 26273, 35364, 44455, 53546, 62637, 71728, 171728, 262637, 353546, 444455, 535364, 626273, 717182, 1717182, 2626273, 3535364, 4444455, 5353546, 6262637, 7171728
Offset: 1

Views

Author

M. F. Hasler, Dec 02 2019

Keywords

Comments

Equivalently: range of A328865 \ {-1}.
By a k-cycle (or cycle of length k) of A329623 we mean a vector (x_1, ..., x_k) such that A329623(x_i) = x_{i+1} for i < k, and A329623(x_k) = x_1. We include here the cycles of length k = 1 which are the fixed points of A329623, viz A329623(x_1) = x_1. No cycle with k > 2 is known.
There are 7 infinite subsequences: for initial digit 1 <= d <= 7, alternate digit d and 8-d to form an undulating (A033619) number of arbitrary length L >= 3, then add 11.
The terms with initial digit d > 4 are the larger member of a 2-cycle having a term with d < 4 as smaller member. The terms with d = 4 (and those <= 9) are fixed points. So far no other fixed points or other cycles are known. As far as this remains valid, the terms of this sequence are characterized by A329623(A329623(x)) = x.
Sequence A328279 lists the smallest member of each cycle.

Examples

			The single-digit numbers 1, ..., 9 and the numbers f(k) = 4*(10^k-1)/9 + 11, k >= 3, are fixed points of A329623.
Indeed, for f(k) = 4...455 we have A053392(f(k)) = 8...910 = 2*f(k), so A329623(f(k)) = 2*f(k) - f(k) = f(k).
For a(10) = 182, we have A329623(182) = 728 and A329623(728) = 182, so these are members of the 2-cycle (182, 728).
For a(11) = 273, we have A329623(273) = 637 and A329623(637) = 273, so these are members of the 2-cycle (273, 637).
Similarly for all subsequent terms except the f(k) of the form 4...455.
		

Crossrefs

Cf. A329623, A053392 (concatenate sums of adjacent digits of n), A328865, A329624.
See A328279 for the smallest representative of each cycle.

Programs

  • PARI
    apply( {A328142(n)=if(n>9,fromdigits(vector((n+8)\/7,i,n=if(i>1, 8-n,(n+4)%7+1)))+11,n)}, [1..40]) \\ As far as there are no other terms than those described in COMMENTS. - M. F. Hasler, Dec 06 2019, replacing earlier code.

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

A328279 Smallest elements of the cycles of (iterations of) A329623: n -> |concat(sum of adjacent digits of n) - n|.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 182, 273, 364, 455, 1728, 2637, 3546, 4455, 17182, 26273, 35364, 44455, 171728, 262637, 353546, 444455, 1717182, 2626273, 3535364, 4444455, 17171728, 26262637, 35353546, 44444455, 171717182, 262626273, 353535364, 444444455, 1717171728, 2626262637, 3535353546
Offset: 1

Views

Author

M. F. Hasler, Dec 02 2019

Keywords

Comments

By a k-cycle (or: cycle of length k) of A329623 we mean a vector (x_1, ..., x_k) such that A329623(x_i) = x_{i+1} for i < k, and A329623(x_k) = x_1. We include here the cycles of length k = 1 which are the fixed points of A329623, viz: A329623(x_1) = x_1.
Differs from A328142 = range of A328865 \ {-1} in that only the smallest element of a cycle is listed here.
Infinite subsequences include: 1{71}*82, 2{62}*73, 3{53}*64, 4+55, {17}+28, {26}+37 and {35}+46, where "*" (resp. "+") means 0 (resp. 1) or more occurrences. As long as there are no other terms, we have a simple formula for a(n), cf. PARI code.
So far the known fixed points of A329623 are the single-digit numbers and numbers of the form 4...455: {4*(10^k-1)/9 + 11; k >= 3}. All other known terms of this sequence and A328142 are part of 2-cycles, i.e., A329623(A329623(a(n))) = a(n) for all n. No other cycles are known so far.

Examples

			The single-digit numbers 1, ..., 9 as well as numbers f(k) = 4*(10^k-1)/9 + 11, k >= 3, are fixed points of A329623.
Indeed, A053392(f(k)) = A053392(4...455) = 8...8910 = 8*(10^k-1)/9 + 22 = 2*f(k), and therefore A329623(f(k)) = A053392(f(k)) - f(k) = f(k).
For a(10) = 182, we have A329623(182) = 728 and A329623(728) = 182, so this is the smallest member of the 2-cycle (182, 728).
For a(11) = 273, we have A329623(273) = 637 and A329623(637) = 273, so this is the smallest member of the 2-cycle (273, 637).
Similarly for all subsequent terms except the f(k) of the form 4...455.
		

Crossrefs

Cf. A328142, A329623, A053392 (concatenate sums of adjacent digits of n), A328865.

Programs

  • PARI
    is_A328279(n)={n==vecmin(vector(9,i,n=A329623(n)))}
    
  • PARI
    apply( A328279(n)={if(n<10,n, bittest((n=divrem(n-10,4)+[1,2]~)[1],0), (n[2]*9-1)*10^(n[1]-1)\99*1000+n[2]*91, (-1+n[2]*=9)*10^n[1]\99*100+10+n[2])}, [1..40]) \\ Valid as long as there is no other term > 9 than those of the 7 infinite subfamilies mentioned in the comment.

Formula

Conjectures from Colin Barker, Dec 05 2019: (Start)
G.f.: x*(1 + x + x^2 + x^3 - 8*x^4 - 8*x^5 - 8*x^6 - 8*x^7 - 18*x^8 + 154*x^9 + 72*x^10 + 72*x^11 + 72*x^12 - 294*x^13 + 80*x^14 + 80*x^15 + 80*x^16 - 460*x^17) / ((1 - x)*(1 + x^4)*(1 - 10*x^4)).
a(n) = a(n-1) + 9*a(n-4) - 9*a(n-5) + 10*a(n-8) - 10*a(n-9) for n>17.
(End)

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

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