|
|
A136967
|
|
Numbers k such that k and k^2 use only the digits 1, 2, 3 and 4.
|
|
0
|
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Generated with DrScheme.
No further terms up to 444444444444. Conjecture: these are all the terms. - Robert Israel, Mar 01 2017
|
|
LINKS
|
|
|
EXAMPLE
|
21^2 = 441, so 21 is a term.
|
|
MAPLE
|
dmax:= 8: # to get all terms of up to dmax digits
f:= proc(n) local L; L:= convert(n^2, base, 10); min(L) >= 1 and max(L) <= 4 end proc:
A:= NULL:
for d from 1 to dmax do
for i from 0 to 4^d-1 do
R:= convert(i+4^d, base, 4);
n:= add((R[i]+1)*10^(i-1), i=1..d);
if filter(n) then A:= A, n fi
od
od:
|
|
PROG
|
(PARI) isok(n) = {vno = [0, 5, 6, 7, 8, 9]; !#setintersect(Set(digits(n)), vno) && !#setintersect(Set(digits(n^2)), vno); } \\ Michel Marcus, Mar 01 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn,fini,full,changed
|
|
AUTHOR
|
Jonathan Wellons (wellons(AT)gmail.com), Jan 22 2008
|
|
STATUS
|
approved
|
|
|
|