A028839 Sum of digits of n is a square.
1, 4, 9, 10, 13, 18, 22, 27, 31, 36, 40, 45, 54, 63, 72, 79, 81, 88, 90, 97, 100, 103, 108, 112, 117, 121, 126, 130, 135, 144, 153, 162, 169, 171, 178, 180, 187, 196, 202, 207, 211, 216, 220, 225, 234, 243, 252, 259, 261, 268, 270, 277, 286, 295, 301, 306, 310
Offset: 1
Examples
234511 belongs to the sequence as its sum of digits is 16, a square.
Links
- Carmine Suriano, Table of n, a(n) for n = 1..1242
Programs
-
Magma
[n: n in [1..400] | IsSquare(&+Intseq(n))]; // Bruno Berselli, May 26 2011
-
Mathematica
Select[ Range[ 500 ], IntegerQ[ Sqrt[ Apply[ Plus, IntegerDigits[ # ] ] ] ]& ]
-
PARI
isok(n) = issquare(sumdigits(n)); \\ Michel Marcus, Oct 30 2014
Extensions
More terms from Erich Friedman
Comments