OFFSET
1,1
COMMENTS
These numbers are the Zombie Numbers.
Start with any negative (dead) number, add the digits (attaching the negative to the first digit), square the result and add it to the original number. If your answer is positive then you have a 'zombie number' which has 'risen from the dead'.
The list is finite with 26 terms.
Negative integer k such that (digitsum(-k) - 2*(1st digit of -k))^2 > -k. - Stefano Spezia, Nov 01 2019
LINKS
Ed Southall, Twitter post about Halloween maths, SolveMyMaths, Oct 31 2019.
EXAMPLE
-27 is not a zombie number because -2 + 7 = 5 and -27 + (5)^2 = -2.
-28 is a zombie number because -2 + 8 = 6 and -28 + (6)^2 = 8.
MATHEMATICA
-Select[Range[200], (Total[IntegerDigits[#]]-2*First[IntegerDigits[#]])^2-#>0&] (* Stefano Spezia, Nov 01 2019 *)
PROG
(PARI) f(n) = my(d=digits(n), s = sumdigits(n) - 2*d[1]); s^2 + n;
isok(n) = f(n) > 0;
forstep(n=-1, -10000, -1, if (isok(n), print1(n, ", "))) \\ Michel Marcus, Oct 31 2019
CROSSREFS
KEYWORD
sign,base,dumb,fini,full
AUTHOR
Andrew Toothill, Oct 31 2019
STATUS
approved