OFFSET
1,1
COMMENTS
k*R(k) is the square of the hypotenuse of a right triangle.
Palindromes in this sequence are 5, 55, 101, 111, 181, 202, 212, 222, 232, 272, 292, 303, 313, 323, 333, 353, 373, ... - Altug Alkan, Mar 26 2016
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..1000
EXAMPLE
For k=5, R(k)=5 and k*R(k)=25, which is 3^2 + 4^2.
For k=10, R(k)=1 and k*R(k)=10, which is 1^2 + 3^2.
For k=58, R(k)=85 and k*R(k)=4930, which is 13^2 + 69^2.
MATHEMATICA
Select[Range@ 222, Length[PowersRepresentations[# FromDigits@ Reverse@ IntegerDigits@ #, 2, 2] /. {0, _} -> Nothing] > 0 &] (* Michael De Vlieger, Mar 26 2016 *)
stnzsQ[{a_, b_}]:=AllTrue[{a, b}, IntegerQ[Sqrt[#]]&]; Select[Range[ 250], Length[ Select[IntegerPartitions[# IntegerReverse[#], {2}], stnzsQ]] >0&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 12 2020 *)
PROG
(PARI) isA000404(n) = {for( i=1, #n=factor(n)~%4, n[1, i]==3 && n[2, i]%2 && return); n && ( vecmin(n[1, ])==1 || (n[1, 1]==2 && n[2, 1]%2))}
lista(nn) = for(n=1, nn, if(isA000404(n*eval(concat(Vecrev(Str(n))))), print1(n, ", "))); \\ Altug Alkan, Mar 26 2016
(Python) # Soumil Mandal, Mar 27 2016
def isHypotenuse(num):
a, b = 1, 1
a2, b2 = a**2, b**2
while a2 + b2 <= num:
while a2 + b2 <= num:
if a2 + b2 == num:
return True
b += 1
b2 = b**2
a += 1
a2 = a**2
b = 1
b2 = b**2
return False
for x in range(20000):
if isHypotenuse(x * int(str(x)[::-1])):
print(x)
CROSSREFS
KEYWORD
base,nonn,easy
AUTHOR
Soumil Mandal, Mar 26 2016
EXTENSIONS
More terms from Altug Alkan, Mar 26 2016
STATUS
approved