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”).
%I #13 Jan 25 2017 23:11:00
%S 1,7,10,28,70,91,100,167,236,280,329,379,397,638,655,656,700,709,836,
%T 899,910,1000,1067,1114,1177,1212,1288,1299,1332,1444,1447,1528,1547,
%U 1574,1587,1670,1679,1717,1727,1733,1745,1748,1752,1758,1814,1844,1851,2109
%N Happy numbers which when squared give another happy number.
%C If x is a member then so is 10*x. - _Robert Israel_, Jan 25 2017
%H Robert Israel, <a href="/A280966/b280966.txt">Table of n, a(n) for n = 1..10000</a>
%p ishappy:= proc(n) option remember;
%p procname(convert(map(`^`,convert(n,base,10),2),`+`))
%p end proc:
%p ishappy(1):= true:
%p ishappy(37):= false:
%p select(t -> ishappy(t) and ishappy(t^2), [$1..10000]); # _Robert Israel_, Jan 25 2017
%Y Cf. A007770.
%K nonn,base
%O 1,2
%A _Sam Turley_, Jan 11 2017