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 #7 Feb 27 2023 11:30:01
%S 1,5,43,7,2,32,1,4,125,1,4,16,1,2,75,2,4,64,1,5,49,2,1,8,4,5,44,1,7,
%T 43,1,1,34,2,2,32,24,5,28,7,2,26,2,1,25,5,2,4,1,2,22,4,17,22,8,5,16,8,
%U 4,32,11,5,21,3,2,17,7,1,22,1,13,16,3,12,15,8,11
%N a(n) is the least k such that k*n is a happy number (A007770).
%C This sequence is well defined (see A360941).
%H Rémy Sigrist, <a href="/A360942/b360942.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A360941(n) / n.
%F a(n) = 1 iff n belongs to A007770.
%o (PARI) a(n) = { forstep (m = n, oo, n, my (h = m, d); while (h > 6, d = digits(h); h = sum(k = 1, #d, d[k]^2)); if (h == 1, return (m / n))) }
%Y Cf. A007770, A360941.
%K nonn,base
%O 1,2
%A _Rémy Sigrist_, Feb 26 2023