OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
26 = 2*13 is a 2-digit squarefree number whose arithmetic mean of digits is (2 + 6)/2 = 4. Hence, 26 is a term.
165 = 3 * 5 * 11 is a 3-digit squarefree number whose arithmetic mean of digits is (1 + 6 + 5)/3 = 4. Hence, 165 is a term.
MAPLE
filter:= proc(n) local L;
if not numtheory:-issqrfree(n) then return false fi;
L:= convert(n, base, 10);
convert(L, `+`)=4*nops(L)
end proc:
select(filter, [$1..1000]); # Robert Israel, Jul 06 2018
MATHEMATICA
Select[Range[5000], Mean[IntegerDigits[#]] == 4 && SquareFreeQ[#] &]
PROG
(Magma) [k:k in [4..1200]| IsSquarefree(k) and &+Intseq(k) eq 4*#Intseq(k)]; // Marius A. Burtea, Dec 19 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Jul 06 2018
STATUS
approved
