cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A376272 Elated numbers: numbers whose trajectory under iteration of the A376270 map includes 1.

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