0, 1, 0, 1, 2, 1, 2, 0, 3, 2, 5, 2, 4, 1, 3, 3, 3, 2, 3, 4, 1, 5, 3, 7, 2, 3, 3, 3, 4, 4, 5, 3, 6, 12, 2, 1, 3, 2, 6, 10, 4, 8, 6, 3, 4, 2, 3, 1, 3, 4, 9, 3, 2, 2, 5, 7, 4, 8, 7, 5, 6, 6, 6, 1, 8, 7, 4, 6, 6, 2, 5, 7, 5, 5, 4, 5, 3, 4, 3, 5, 2, 4, 7, 8, 3, 7, 7
Offset: 2
A377088
Number of attractors under iteration of the map sending a positive integer to the product of its leading base-n digit and the sum of the squares of its base-n digits.
Original entry on oeis.org
1, 5, 2, 3, 8, 6, 11, 4, 16, 14, 23, 18, 42, 7, 24, 34, 26, 58, 98, 51, 99, 88, 51, 57, 103, 72, 89, 60, 69, 35, 78, 146, 39, 90, 73, 11, 109, 113, 71, 156, 220, 93, 176, 101, 132, 172, 187, 10, 160, 95, 221, 226, 69, 55, 163, 110, 137, 287, 168, 69, 260, 194, 208
Offset: 2
N. Bradley Fox, Nathan Fox, Helen Grundman, Rachel Lynn, Changningphaabi Namoijam, Mary Vanderschoot, Oct 15 2024
A375212
a(n) is the product of the leading base-3 digit of n and the sum of the squares of its base-3 digits.
Original entry on oeis.org
1, 8, 1, 2, 5, 8, 10, 16, 1, 2, 5, 2, 3, 6, 5, 6, 9, 8, 10, 16, 10, 12, 18, 16, 18, 24, 1, 2, 5, 2, 3, 6, 5, 6, 9, 2, 3, 6, 3, 4, 7, 6, 7, 10, 5, 6, 9, 6, 7, 10, 9, 10, 13, 8, 10, 16, 10, 12, 18, 16, 18, 24, 10, 12, 18, 12, 14, 20, 18, 20, 26, 16, 18, 24, 18, 20
Offset: 1
N. Bradley Fox, Nathan Fox, Helen Grundman, Rachel Lynn, Changningphaabi Namoijam, Mary Vanderschoot, Oct 16 2024
A376273
a(n) is the smallest elated number of height n.
Original entry on oeis.org
1, 10, 13, 51, 67, 97, 668, 77, 746, 92, 717, 5369, 8888999999
Offset: 0
- N. Bradley Fox et al., Elated Numbers, arXiv:2409.09863 [math.NT], 2024.
A007013 is the analog for base 2 (with shifted offset).
-
f(n) = if (n, my(d=digits(n)); d[1]*norml2(d), 0); \\ A376270
g(n) = my(list=List()); listput(list, n); while(1, my(m=f(n)); if (m==1, return(#list)); if (#select(x->(x==m), Vec(list)), return(0)); listput(list, m); n=m); -1;
a(n) = if (n==0, 1, my(k=2); while(g(k) != n, k++); k);
-
from itertools import count, islice, combinations_with_replacement as mc
def f(n): return (d:=list(map(int, str(n))))[0] * sum(di*di for di in d)
def iters(n):
if n == 1: return 0
traj, c = {n}, 0
while (n:=f(n)) not in traj: traj.add(n); c += 1
return c if 1 in traj else float('inf')
def bgen():
yield from (int(f+"".join(m)) for d in count(1) for f in "123456789" for m in mc("0123456789", d-1))
def agen(): # generator of terms
adict, n = dict(), 0
for k in bgen():
v = iters(k)
if v not in adict:
adict[v] = k
while n in adict: yield adict[v]; n += 1
print(list(islice(agen(), 13))) # Michael S. Branicky, Sep 18 2024
A377083
Number of iterations required for elated number A376272(n) to converge to 1.
Original entry on oeis.org
0, 1, 2, 2, 2, 3, 4, 7, 4, 9, 5, 1, 2, 4, 3, 2, 3, 4, 4, 2, 2, 5, 4, 3, 5, 3, 4, 5, 4, 3, 3, 3, 3, 5, 2, 2, 4, 4, 3, 3, 3, 3, 3, 3, 7, 9, 7, 4, 5, 9, 5, 6, 4, 6, 9, 4, 7, 10, 5, 5, 8, 10, 8, 6, 8, 8, 7, 10, 6, 4, 5, 6, 7, 6, 2, 5, 7, 2, 7, 4, 7, 9, 5, 9, 5, 5
Offset: 1
N. Bradley Fox, Nathan Fox, Helen Grundman, Rachel Lynn, Changningphaabi Namoijam, Mary Vanderschoot, Oct 15 2024
21 is the 4th elated number and iterating the map A376270 yields 10 then 1, so a(4)=2.
A090425 is the analog for happy numbers, with a different convention used.
-
from itertools import count, islice
def f(n): return (d:=list(map(int, str(n))))[0] * sum(di*di for di in d)
def ok_count(n):
if n == 1: return True, 0
traj, c = {n}, 0
while (n:=f(n)) not in traj: traj.add(n); c += 1
return 1 in traj, c
def agen(): # generator of terms
for n in count(1):
elated, iterations = ok_count(n)
if elated: yield iterations
print(list(islice(agen(), 90))) # Michael S. Branicky, Oct 16 2024
A377089
Numbers that are both happy (A007770) and elated (A376272).
Original entry on oeis.org
1, 10, 13, 97, 100, 103, 130, 226, 262, 319, 356, 365, 391, 556, 565, 907, 970, 1000, 1003, 1030, 1122, 1177, 1188, 1212, 1221, 1222, 1277, 1300, 1339, 1393, 1448, 1478, 1484, 1487, 1557, 1575, 1717, 1727, 1748, 1755, 1771, 1772, 1784, 1818, 1844, 1847, 1874
Offset: 1
N. Bradley Fox, Nathan Fox, Helen Grundman, Rachel Lynn, Changningphaabi Namoijam, Mary Vanderschoot, Oct 15 2024
-
def ssd(n): return sum(int(d)**2 for d in str(n))
def f(n): return (d:=list(map(int, str(n))))[0] * sum(di*di for di in d)
def happy(n):
if n == 1: return True
s = list(map(int, str(n)))
while n not in [1, 4]: n = ssd(n) # iterate until fixed point or cycle
return n == 1
def elated(n):
if n == 1: return True
traj = {n}
while (n:=f(n)) not in traj: traj.add(n)
return 1 in traj
def ok(n): return happy(n) and elated(n)
print([k for k in range(1, 2001) if ok(k)]) # Michael S. Branicky, Oct 16 2024
Showing 1-8 of 8 results.
Comments
Examples
Links
Crossrefs