%I #14 Sep 24 2024 02:56:25
%S 1,10,13,21,43,51,67,77,88,92,97,100,103,117,124,130,142,155,171,201,
%T 210,226,237,256,262,265,273,319,322,337,356,365,373,391,403,430,438,
%U 483,501,510,514,541,556,565,579,588,597,607,616,639,661,668,670,686,693,699,707,717,724,742,746
%N Elated numbers: numbers whose trajectory under iteration of the A376270 map includes 1.
%H Alois P. Heinz, <a href="/A376272/b376272.txt">Table of n, a(n) for n = 1..10000</a>
%H N. Bradley Fox et al., <a href="https://arxiv.org/abs/2409.09863">Elated Numbers</a>, arXiv:2409.09863 [math.NT], 2024.
%p b:= proc(n) b(n):= (l-> l[-1]*add(i^2, i=l))(convert(n, base, 10)) end:
%p q:= proc(n) option remember; local k, s; k, s:= n, {};
%p while not (k=1 or k in s) do s, k:= {s[], k}, b(k) od: is(k=1)
%p end:
%p select(q, [$1..1000])[]; # _Alois P. Heinz_, Sep 18 2024
%o (PARI) f(n) = if (n, my(d=digits(n)); d[1]*norml2(d), 0); \\ A376270
%o isok(n) = my(list=List()); while(1, my(m=f(n)); if (m==1, return(1)); if (#select(x->(x==m), Vec(list)), return(0)); listput(list, m); n=m); 0;
%o (Python)
%o def f(n): return (d:=list(map(int, str(n))))[0] * sum(di*di for di in d)
%o def ok(n):
%o if n == 1: return True
%o traj = {n}
%o while (n:=f(n)) not in traj: traj.add(n)
%o return 1 in traj
%o print([k for k in range(750) if ok(k)]) # _Michael S. Branicky_, Sep 18 2024
%Y Cf. A376270, A376273.
%Y b-elated numbers: A000027 (2), A376272 (10).
%K nonn,base
%O 1,2
%A _Michel Marcus_, Sep 18 2024