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.

A166623 Irregular triangle read by rows, in which row n lists the Münchhausen numbers in base n, for 2 <= n.

This page as a plain text file.
%I A166623 #61 Mar 20 2025 10:01:22
%S A166623 1,2,1,5,8,1,29,55,1,1,3164,3416,1,3665,1,1,28,96446,923362,1,3435,1,
%T A166623 34381388,34381640,1,20017650854,1,93367,30033648031,8936504649405,
%U A166623 8936504649431,1,31,93344,17852200903304,606046687989917
%N A166623 Irregular triangle read by rows, in which row n lists the Münchhausen numbers in base n, for 2 <= n.
%C A166623 Let N = Sum_i d_i b^i be the base b expansion of N. Then N has the Münchhausen property in base b if and only if N = Sum_i (d_i)^(d_i).
%C A166623 Convention: 0^0 = 1.
%H A166623 Karl W. Heuer, <a href="/A166623/b166623.txt">Rows n = 2..35, flattened</a> (each row starts with 1)
%H A166623 John D. Cook, <a href="http://www.johndcook.com/blog/2016/09/19/munchausen-numbers/">Münchausen numbers</a> (2016)
%H A166623 Daan van Berkel, <a href="http://arxiv.org/abs/0911.3038">On a curious property of 3435</a>, arXiv:0911.3038 [math.HO], 2009.
%H A166623 Shyam Sunder Gupta, <a href="https://doi.org/10.1007/978-981-97-2465-9_21">Digital Invariants and Narcissistic Numbers</a>, Exploring the Beauty of Fascinating Numbers, Springer (2025) Ch. 21, 513-526.
%H A166623 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/MuenchhausenNumber.html">Münchhausen Number</a>.
%e A166623 For example: the base 4 representation of 29 is [1,3,1] (29 = 1*4^2 + 3*4^1 + 1*4^0). Furthermore, 29 = 1^1 + 3^3 + 1^1. Therefore 29 has the Münchhausen property in base 4.
%e A166623 Because 1 = 1^1 in every base, a 1 in the sequence signifies a new base.
%e A166623 So the sequence can best be read in the following form:
%e A166623   1, 2;
%e A166623   1, 5, 8;
%e A166623   1, 29, 55;
%e A166623   1;
%e A166623   1, 3164, 3416;
%e A166623   1, 3665;
%e A166623   1;
%e A166623   1, 28, 96446, 923362;
%e A166623   1, 3435;
%o A166623 (GAP) next := function(result, n) local i; result[1] := result[1] + 1; i := 1; while result[i] = n do result[i] := 0; i := i + 1; if (i <= Length(result)) then result[i] := result[i] + 1; else Add(result, 1); fi; od; return result; end; munchausen := function(coefficients) local sum, index; sum := 0; for index in coefficients do sum := sum + index^index; od; return sum; end; for m in [2..10] do max := 2*m^m; n := 1; coefficients := [1]; while n <= max do sum := munchausen(coefficients); if (n = sum) then Print(n, "\n"); fi; n := n + 1; coefficients := next(coefficients, m); od; od;
%o A166623 (Python)
%o A166623 from itertools import combinations_with_replacement
%o A166623 from sympy.ntheory.factor_ import digits
%o A166623 A166623_list = []
%o A166623 for b in range(2,20):
%o A166623     sublist = []
%o A166623     for l in range(1,b+2):
%o A166623         for n in combinations_with_replacement(range(b),l):
%o A166623             x = sum(d**d for d in n)
%o A166623             if tuple(sorted(digits(x,b)[1:])) == n:
%o A166623                 sublist.append(x)
%o A166623     A166623_list.extend(sorted(sublist)) # _Chai Wah Wu_, May 20 2017
%Y A166623 See A046253 for base 10.
%K A166623 nonn,base,tabf
%O A166623 2,2
%A A166623 Daan van Berkel (daan.v.berkel.1980(AT)gmail.com), Oct 18 2009
%E A166623 Edited (but not checked) by _N. J. A. Sloane_, Nov 10 2009
%E A166623 More terms from _Karl W. Heuer_, Aug 06 2011