|
|
A136845
|
|
Numbers k such that k and k^2 use only the digits 0, 1, 3, 5 and 8.
|
|
2
|
|
|
0, 1, 10, 100, 1000, 10000, 58151, 100000, 550501, 581510, 1000000, 5505010, 5815100, 5818151, 10000000, 55050100, 55055001, 58151000, 58181510, 100000000, 183031501, 550501000, 550550010, 555005001, 581510000, 581815100, 1000000000, 1000550501, 1005055001, 1830315010, 3180155001, 3318358151, 5505010000, 5505500100, 5505550001
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Generated with DrScheme.
|
|
LINKS
|
|
|
EXAMPLE
|
58151^2 = 3381538801.
581858058583151^2 = 338558800338153581101581088801.
|
|
PROG
|
(Python)
from itertools import product
for l in range(15):
....for a in ('1', '3', '5', '8'):
........for b in product('01358', repeat=l):
............for c in ('0', '1', '5'):
................n = int(''.join([a]+list(b)+[c]))
................if set(str(n*n)) <= {'0', '1', '3', '5', '8'}:
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn,changed
|
|
AUTHOR
|
Jonathan Wellons (wellons(AT)gmail.com), Jan 22 2008
|
|
STATUS
|
approved
|
|
|
|