%I #37 Apr 12 2024 09:51:27
%S 1,5,11,15,35,111,115,235,335,715,1235,2715,3335,3511,3515,3711,12335,
%T 27115,33335,33515,35711,37115,72335,75711,111235,123335,132335,
%U 177515,333335,333515,357115,572115,575515,577515,723335,757115,1233335,1312335,1323335,3333335,3333515,3512511,5227115,5772115,7233335,11212115,11277115,11735515
%N Numbers k such that k and k^2 use only the digits 1, 2, 3, 5 and 7.
%C Generated with DrScheme.
%C Sequence is infinite; e.g., it contains 3...35 = (10^n-1)/3 + 2 for all n. - _Robert Israel_, Nov 24 2015
%C a(n) mod 100 can be only 11, 15 or 35 for n > 2. So if a(n) is a prime number, a(n) mod 100 = 11 for n > 2. Initial prime values of a(n) are 11, 3511 and 12375511 for n > 2. - _Altug Alkan_, Nov 25 2015
%H Jonathan Wellons, <a href="/A136975/b136975.txt">Table of n, a(n) for n = 1..330</a>
%H J. Wellons, <a href="https://web.archive.org/web/20090206165028/http://jonathanwellons.com/shared-digits/">Tables of Shared Digits</a> [archived]
%e 757313127132715^2 = 573523172527531752317223271225.
%p f2:= proc(n) local L; convert(convert(n^2,base,10),set) intersect {4,6,8,9,0} = {} end proc:
%p S:= {0}: A:= {}:
%p for d from 1 to 8 do
%p S:={seq(seq(10*s+j,j=[1,2,3,5,7]),s=S)};
%p A:= select(f2,S) union A;
%p od:
%p sort(convert(A,list)); # _Robert Israel_, Nov 24 2015, corrected Sep 03 2020
%t w = {1, 2, 3, 5, 7}; Select[Range[1, 10^7, 2], Union[IntegerDigits@ #, IntegerDigits[#^2], w] == w &] (* _Michael De Vlieger_, Nov 25 2015 *)
%Y Cf. A001742, A034905.
%K base,nonn,changed
%O 1,2
%A Jonathan Wellons (wellons(AT)gmail.com), Jan 22 2008
|