A357894 Integers k such that the sum of some number of initial decimal digits of sqrt(k) is equal to k.
0, 1, 6, 10, 14, 18, 27, 33, 41, 43, 46, 55, 56, 62, 66, 69, 70, 77, 80, 87, 93, 98, 102, 108, 110, 123, 124, 145, 147, 149, 150, 154, 157, 162, 164, 165, 168, 176, 177, 179, 180, 182, 183, 197, 204, 213, 214, 219, 224, 236, 237, 242, 248, 251, 252, 261, 262, 263, 271, 274, 285, 295
Offset: 1
Examples
41 is a term because sqrt(41) = 6.4031242374328... and 6+4+0+3+1+2+4+2+3+7+4+3+2 = 41. 42 is not a term because sqrt(42) = 6.480740698407860... and 6+4+8+0+7+4+0+6 = 35 and 6+4+8+0+7+4+0+6+9 = 44 (no sum of initial digits = 42). 144 is not a term because sqrt(144) = 12 (no digits to the right of the decimal), and 1+2 is not equal to 144.
Crossrefs
Cf. A106039.
Programs
-
PARI
is(n) = { my (d=digits(sqrtint(n)), s=0); for (i=1, #d, s+=d[i]; if (s==n, return (1), s>n, return (0););); if (issquare(n), return (n==0);); my (n0=n); while (1, s+=sqrtint(n0*=100)%10; if (s==n, return (1), s>n, return (0););); } \\ Rémy Sigrist, Oct 19 2022
Comments