login

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”).

A350533
Happy Niven (or happy harshad) numbers.
1
1, 7, 10, 70, 100, 133, 190, 192, 230, 280, 320, 392, 440, 644, 700, 736, 820, 874, 888, 910, 912, 1000, 1088, 1090, 1092, 1122, 1125, 1128, 1141, 1148, 1152, 1185, 1188, 1212, 1215, 1233, 1251, 1274, 1275, 1300, 1323, 1330, 1332, 1512, 1521, 1547, 1679, 1725
OFFSET
1,2
COMMENTS
Numbers that are divisible by the sum of their digits and whose trajectory under iteration of sum of squares of digits map includes 1.
LINKS
Wikipedia, Happy number
Wikipedia, Harshad number
FORMULA
{ A005349 } intersect { A007770 }.
EXAMPLE
133 is a term because 133/7 = 19 and its trajectory under iteration of sum of squares of digits map is 133 -> 19 -> 82 -> 68 -> 100 -> 1.
MAPLE
q:= proc(n) local m, s; m, s:= n, {};
if irem(n, add(i, i=convert(n, base, 10)))>0 then return false fi;
do if m=1 then return true
elif m in s then return false
else s, m:= s union {m}, add(i^2, i=convert(m, base, 10))
fi
od
end:
select(q, [$1..2000])[];
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Alois P. Heinz, Jan 03 2022
STATUS
approved