A329201 The ghost iteration (B): add or subtract the number formed by absolute differences of digits (A040115), according to parity (odd or even).
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 11, 13, 11, 17, 11, 21, 11, 25, 11, 18, 22, 22, 24, 22, 28, 22, 32, 22, 36, 33, 29, 33, 33, 35, 33, 39, 33, 43, 33, 36, 44, 40, 44, 44, 46, 44, 50, 44, 54, 55, 47, 55, 51, 55, 55, 57, 55, 61, 55, 54, 66, 58, 66, 62, 66, 66, 68, 66, 72, 77, 65, 77, 69, 77, 73, 77
Offset: 0
Examples
For n = 101, the number formed by the absolute differences of digits is 11. Since this is odd it is added to n, so a(101) = 101 + 11 = 112.
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( A329201(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