login
A239937
Numbers k such that DigitSum(k^2) > DigitSum((k+1)^2).
0
3, 7, 8, 9, 14, 17, 19, 24, 26, 28, 29, 31, 33, 34, 37, 38, 39, 43, 44, 47, 48, 53, 54, 57, 59, 63, 64, 67, 69, 70, 74, 77, 78, 79, 83, 84, 87, 88, 89, 93, 94, 97, 98, 99, 104, 107, 109, 114, 117, 118, 119, 122, 124, 126, 128, 129, 133, 134, 137, 138, 141, 143
OFFSET
1,1
EXAMPLE
For k=3, we have DigitSum(3^2) = 9 > 7 = DigitSum(4^2).
MATHEMATICA
lis = Table[Total[IntegerDigits[n^2, 10]], {n, 1, 100}];
Flatten[Position[Greater @@@ Partition[lis, 2, 1], True]]
Position[Partition[Total[IntegerDigits[#]]&/@(Range[150]^2), 2, 1], _?(#[[1]]> #[[2]]&), 1, Heads->False]//Flatten (* Harvey P. Dale, Feb 19 2020 *)
PROG
(PARI) isok(k) = sumdigits(k^2) > sumdigits((k+1)^2); \\ Michel Marcus, Jul 03 2021
CROSSREFS
Cf. A007953 (sum of digits of n), A004159 (sum of digits of n^2).
Sequence in context: A298984 A094551 A342006 * A375019 A114441 A354023
KEYWORD
nonn,base
AUTHOR
Oliver Bel, Mar 29 2014
EXTENSIONS
More terms from Jon E. Schoenfield, Mar 29 2014
STATUS
approved