OFFSET
1,1
EXAMPLE
383177 = 29 * 73 * 181 is in the sequence because 29 = 3+8+3+1+7+7 and 181 = 3^2+8^2+3^2+1^2+7^2+7^2.
MAPLE
with(numtheory):A:= proc(n) add(u, u=convert(n, base, 10)) ; end proc: B:= proc(m) add(v^2, v=convert(m, base, 10)) ; end proc: for i from 2 to 1000000 do:x:=factorset(i):n1:=nops(x):if x[1]=A(i) and x[n1]=B(i) then print(i):else fi:od:
PROG
(PARI) is_A217690(n)={my(d=digits(n), s=norml2(d), f); (n%s || !isprime(s) || n%(d=sum(i=1, #d, d[i])) || !isprime(d)) & return; !(f=factor(n/(d*s))[, 1]) || (d <= f[1] & s >= f[#f])} \\ Charles R Greathouse IV and M. F. Hasler, Oct 11 2012
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Oct 11 2012
STATUS
approved