A328933 For any negative number, add the digits (assigning the negative sign just to the first digit), square the result and add it to the original number. This sequence shows negative numbers which give a positive answer.
-2, -3, -4, -5, -6, -7, -8, -9, -15, -16, -17, -18, -19, -28, -29, -159, -168, -169, -178, -179, -187, -188, -189, -197, -198, -199
Offset: 1
Examples
-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.
Links
- Ed Southall, Twitter post about Halloween maths, SolveMyMaths, Oct 31 2019.
Programs
-
Mathematica
-Select[Range[200],(Total[IntegerDigits[#]]-2*First[IntegerDigits[#]])^2-#>0&] (* Stefano Spezia, Nov 01 2019 *)
-
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
Comments