Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #17 Apr 12 2024 09:51:26
%S 0,1,10,100,1000,10000,58151,100000,550501,581510,1000000,5505010,
%T 5815100,5818151,10000000,55050100,55055001,58151000,58181510,
%U 100000000,183031501,550501000,550550010,555005001,581510000,581815100,1000000000,1000550501,1005055001,1830315010,3180155001,3318358151,5505010000,5505500100,5505550001
%N Numbers k such that k and k^2 use only the digits 0, 1, 3, 5 and 8.
%C Generated with DrScheme.
%H Jonathan Wellons and Chai Wah Wu, <a href="/A136845/b136845.txt">Table of n, a(n) for n = 1..237</a> (first 174 terms from Jonathan Wellons).
%H J. Wellons, <a href="https://web.archive.org/web/20090206165028/http://jonathanwellons.com/shared-digits/">Tables of Shared Digits</a> [archived]
%e 58151^2 = 3381538801.
%e 581858058583151^2 = 338558800338153581101581088801.
%o (Python)
%o from itertools import product
%o A136845_list = [0,1]
%o for l in range(15):
%o ....for a in ('1','3','5','8'):
%o ........for b in product('01358',repeat=l):
%o ............for c in ('0','1','5'):
%o ................n = int(''.join([a]+list(b)+[c]))
%o ................if set(str(n*n)) <= {'0','1','3','5','8'}:
%o ....................A136845_list.append(n) # _Chai Wah Wu_, May 25 2015
%K base,nonn
%O 1,3
%A Jonathan Wellons (wellons(AT)gmail.com), Jan 22 2008