A329200 The ghost iteration (A): add or subtract the number formed by absolute differences of digits (A040115), according to parity (even or odd).
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
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.
Links
- E. Angelini, The ghost iteration, SeqFan list, Nov 2019
- E. Angelini, The ghost iteration, SeqFan list, Nov 2019 [Cached copy, with permission]
- E. Angelini, The Ghost Iteration, Personal blog "Cinquante signes", Nov 2019
- E. Angelini, The Ghost Iteration, Personal blog "Cinquante signes", Nov 2019 [Cached copy, pdf file, with permission]
Crossrefs
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.
Comments