[go: up one dir, main page]

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!)
A329200 The ghost iteration (A): add or subtract the number formed by absolute differences of digits (A040115), according to parity (even or odd). 15
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
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.
LINKS
E. Angelini, The ghost iteration, SeqFan list, Nov 2019
E. Angelini, The Ghost Iteration, Personal blog "Cinquante signes", Nov 2019
FORMULA
a(n) = n + (-1)^d*d where d = A040115(n), 0 for n < 10.
EXAMPLE
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.
PROG
(PARI) apply( A329200(n)={n+(-1)^(n=fromdigits(abs((n=digits(n+!n))[^-1]-n[^1])))*n}, [1..199])
CROSSREFS
Cf. A040115, A329201 (variant B: add/subtract if odd/even).
Cf. A329196 (cycles), A329197 (lengths), A329198 (size of orbit of n).
Sequence in context: A261914 A261423 A262040 * A122638 A297235 A090175
KEYWORD
nonn,base,easy
AUTHOR
Eric Angelini and M. F. Hasler, Nov 09 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 August 29 11:15 EDT 2024. Contains 375512 sequences. (Running on oeis4.)