# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/
Search: id:a358984
Showing 1-1 of 1
%I A358984 #45 Jan 07 2023 04:32:49
%S A358984 3,8,19,0,169,896,1496,3334,21789,79403,239439,651236,1670022,3015650,
%T A358984 27292097,55608749,234846164,366081231,2594727780,6395506991
%N A358984 The number of n-digit numbers k such that k + digit reversal of k (A056964) is a square.
%C A358984 Number of terms of A061230 which are n digits long.
%H A358984 Nicolay Avilov, Problem of the Moscow Mathematical Olympiad, 1945 (in Russian).
%H A358984 Index to sequences related to Olympiads.
%H A358984 Index entries for sequences related to Reverse and Add!
%e A358984 a(1) = 3 because there are 3 single-digit numbers: 0, 2, 8 such that b + b = m^2, for example, 8 + 8 = 16 = 4^2;
%e A358984 a(2) = 8 because there are 8 two-digit numbers: 29, 38, 47, 56, 65, 74, 83, 92 such that bc + cb = m^2, for example, 29 + 92 = 121 = 11^2.
%t A358984 a[n_]:=Length[Select[Table[k, {k, 10^(n-1),10^n-1}],IntegerQ[Sqrt[#+FromDigits[Reverse[IntegerDigits[#]]]]]&]]; Array[a,10] (* _Stefano Spezia_, Dec 09 2022 *)
%o A358984 (Python)
%o A358984 from math import isqrt
%o A358984 def s(n): return isqrt(n)**2 == n
%o A358984 def c(n): return s(n + int(str(n)[::-1]))
%o A358984 def a(n): return 3 if n == 1 else sum(1 for k in range(10**(n-1), 10**n) if c(k))
%o A358984 print([a(n) for n in range(1, 7)]) # _Michael S. Branicky_, Dec 08 2022
%Y A358984 Cf. A056964, A061230, A356648.
%K A358984 nonn,base,more
%O A358984 1,1
%A A358984 _Nicolay Avilov_, Dec 08 2022
%E A358984 a(9)-a(10) from _Michael S. Branicky_, Dec 08 2022
%E A358984 a(11)-a(20) from _Talmon Silver_, Dec 25 2022
# Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE