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.

A136985 Numbers k such that k and k^2 use only the digits 1, 2, 3 and 9.

This page as a plain text file.
%I A136985 #38 Sep 13 2024 15:28:33
%S A136985 1,3,11,111,139
%N A136985 Numbers k such that k and k^2 use only the digits 1, 2, 3 and 9.
%C A136985 Generated with DrScheme.
%C A136985 No additional terms < 10^11. - _Harvey P. Dale_, Oct 21 2019
%C A136985 From _David A. Corneth_, Oct 21 2019: (Start)
%C A136985 No additional terms < 10^31.
%C A136985 The final digits of 1^2, 2^2, 3^2 and 9^2 are 1, 4, 9 and 1 respectively, of which only 1 and 9 are allowed. So a term must end in 1, 3 or 9.
%C A136985 Checking two digits, we see that only numbers ending in 11, 23, 39 or 99 squared have the last two digits allowed.
%C A136985 Similar for three digits, a term must end in one of 111, 911, 123, 323, 923, 139, 239, 339 or 999.
%C A136985 We can recursively see how a number must end and hence reduce the numbers that must be checked. For example, we only have to check 4204352 31-digit numbers to know there are no 31-digit terms.
%C A136985 (End)
%C A136985 No additional terms < 10^38. - _Michael S. Branicky_, Jul 05 2021
%H A136985 David A. Corneth, <a href="/A136985/a136985.gp.txt">PARI program</a>
%H A136985 Jonathan Wellons, <a href="https://web.archive.org/web/20090206165028/http://jonathanwellons.com/shared-digits/">Tables of Shared Digits</a> [archived]
%e A136985 139^2 = 19321.
%t A136985 With[{c={1,2,3,9}},Select[Flatten[Table[FromDigits/@Tuples[c,n],{n,3}]],SubsetQ[ c,IntegerDigits[#^2]]&]] (* _Harvey P. Dale_, Oct 21 2019 *)
%o A136985 (PARI) \\ See Corneth link. _David A. Corneth_, Oct 21 2019
%Y A136985 Cf. A077439, A136809, A136813, A137028, A137105, A137144, A137147.
%K A136985 base,nonn,more
%O A136985 1,2
%A A136985 Jonathan Wellons (wellons(AT)gmail.com), Jan 22 2008