The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
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 * A114441 A354023 A043046
KEYWORD
nonn,base
AUTHOR
Oliver Bel, Mar 29 2014
EXTENSIONS
More terms from Jon E. Schoenfield, Mar 29 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 23 00:54 EDT 2024. Contains 372758 sequences. (Running on oeis4.)