cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A270926 Numbers k such that k*R(k) can be represented as the sum of two nonzero squares, where R(k) is the reverse of the decimal expansion of k.

This page as a plain text file.
%I A270926 #58 Mar 03 2024 10:14:36
%S A270926 5,10,15,16,18,20,25,30,37,40,50,51,52,55,58,60,61,70,73,78,80,81,85,
%T A270926 87,89,90,98,100,101,104,106,109,110,111,122,125,128,145,146,148,149,
%U A270926 150,159,160,162,164,165,168,169,174,176,180,181,192,195,198,200,202,208,212,220,221,222
%N A270926 Numbers k such that k*R(k) can be represented as the sum of two nonzero squares, where R(k) is the reverse of the decimal expansion of k.
%C A270926 k*R(k) is the square of the hypotenuse of a right triangle.
%C A270926 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
%H A270926 Paolo P. Lava, <a href="/A270926/b270926.txt">Table of n, a(n) for n = 1..1000</a>
%e A270926 For k=5, R(k)=5 and k*R(k)=25, which is 3^2 + 4^2.
%e A270926 For k=10, R(k)=1 and k*R(k)=10, which is 1^2 + 3^2.
%e A270926 For k=58, R(k)=85 and k*R(k)=4930, which is 13^2 + 69^2.
%t A270926 Select[Range@ 222, Length[PowersRepresentations[# FromDigits@ Reverse@ IntegerDigits@ #, 2, 2] /. {0, _} -> Nothing] > 0 &] (* _Michael De Vlieger_, Mar 26 2016 *)
%t A270926 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 *)
%o A270926 (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))}
%o A270926 lista(nn) = for(n=1, nn, if(isA000404(n*eval(concat(Vecrev(Str(n))))), print1(n, ", "))); \\ _Altug Alkan_, Mar 26 2016
%o A270926 (Python) # _Soumil Mandal_, Mar 27 2016
%o A270926 def isHypotenuse(num):
%o A270926     a, b = 1, 1
%o A270926     a2, b2 = a**2, b**2
%o A270926     while a2 + b2 <= num:
%o A270926         while a2 + b2 <= num:
%o A270926             if a2 + b2 == num:
%o A270926                 return True
%o A270926             b += 1
%o A270926             b2 = b**2
%o A270926         a += 1
%o A270926         a2 = a**2
%o A270926         b = 1
%o A270926         b2 = b**2
%o A270926     return False
%o A270926 for x in range(20000):
%o A270926     if isHypotenuse(x * int(str(x)[::-1])):
%o A270926         print(x)
%Y A270926 Cf. A000404, A004086, A061205.
%K A270926 base,nonn,easy
%O A270926 1,1
%A A270926 _Soumil Mandal_, Mar 26 2016
%E A270926 More terms from _Altug Alkan_, Mar 26 2016