login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A376483
Perfect squares k for which sqrt(k) = (Sum of digits of k) - 2.
0
4, 25, 64, 196, 289
OFFSET
1,1
COMMENTS
The corresponding square roots are 2, 5, 8, 14, 17.
These squares are connected via the Pythagorean quadruple 2^2 + 5^2 + 8^2 + 14^2 = 17^2.
These are the only such numbers. No additional solutions exist for k ≤ 34^2 = 1156, and sqrt(k) outpaces the sum of digits of k beyond this point.
EXAMPLE
k=25 is a term since sqrt(25) = 5 and sum of digits of 25 is 7 and 5 = 7 - 2.
PROG
(SageMath)
def find_numbers(limit=1156):
valid_numbers = []
for s in range(1, int(sqrt(limit)) + 1):
N = s**2
digit_sum = sum(int(d) for d in str(N))
if sqrt(N) == digit_sum - 2:
valid_numbers.append(N)
return valid_numbers
CROSSREFS
Cf. A000290 (squares), A002620 (squares sum of four squares).
Sequence in context: A065733 A368245 A212893 * A302324 A303017 A281339
KEYWORD
nonn,fini,full,base
AUTHOR
Lucas Sacramento, Sep 24 2024
STATUS
approved