The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A329198 Size of the orbit of n under "ghost iterations" A329200. 7
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,11
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.
LINKS
FORMULA
a(n) = 1 <=> n is a fixed point of A329200 <=> n is a repdigit number (A010785).
EXAMPLE
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.
PROG
(PARI) A329198(n, M=oo, U=[n])={for(k=1, M, setsearch(U, n=A329200(n))&&return(k); U=setunion(U, [n]))}
CROSSREFS
Cf. A329200, A329196 (cycles), A329197 (length of cycles).
Cf. A329340 (analog for the variant A329201).
Sequence in context: A337222 A095149 A218579 * A182436 A064192 A284553
KEYWORD
nonn
AUTHOR
M. F. Hasler, Nov 10 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 30 06:57 EDT 2024. Contains 372961 sequences. (Running on oeis4.)