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.

Showing 1-9 of 9 results.

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

Original entry on oeis.org

1, 2, 1, 5, 8, 1, 29, 55, 1, 1, 3164, 3416, 1, 3665, 1, 1, 28, 96446, 923362, 1, 3435, 1, 34381388, 34381640, 1, 20017650854, 1, 93367, 30033648031, 8936504649405, 8936504649431, 1, 31, 93344, 17852200903304, 606046687989917
Offset: 2

Views

Author

Daan van Berkel (daan.v.berkel.1980(AT)gmail.com), Oct 18 2009

Keywords

Comments

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).
Convention: 0^0 = 1.

Examples

			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.
Because 1 = 1^1 in every base, a 1 in the sequence signifies a new base.
So the sequence can best be read in the following form:
  1, 2;
  1, 5, 8;
  1, 29, 55;
  1;
  1, 3164, 3416;
  1, 3665;
  1;
  1, 28, 96446, 923362;
  1, 3435;
		

Crossrefs

See A046253 for base 10.

Programs

  • 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;
    
  • Python
    from itertools import combinations_with_replacement
    from sympy.ntheory.factor_ import digits
    A166623_list = []
    for b in range(2,20):
        sublist = []
        for l in range(1,b+2):
            for n in combinations_with_replacement(range(b),l):
                x = sum(d**d for d in n)
                if tuple(sorted(digits(x,b)[1:])) == n:
                    sublist.append(x)
        A166623_list.extend(sorted(sublist)) # Chai Wah Wu, May 20 2017

Extensions

Edited (but not checked) by N. J. A. Sloane, Nov 10 2009
More terms from Karl W. Heuer, Aug 06 2011

A045512 If decimal expansion of n is ab...d, a(n) = a^a + b^b + ... + d^d (ignoring any 0's).

Original entry on oeis.org

0, 1, 4, 27, 256, 3125, 46656, 823543, 16777216, 387420489, 1, 2, 5, 28, 257, 3126, 46657, 823544, 16777217, 387420490, 4, 5, 8, 31, 260, 3129, 46660, 823547, 16777220, 387420493, 27, 28, 31, 54, 283, 3152, 46683, 823570, 16777243, 387420516, 256, 257, 260
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A045503.
See A046253 for fixed points.

Programs

  • Maple
    a:= n-> add(`if`(i=0, 0, i^i), i=convert(n,base,10)):
    seq(a(n), n=0..42);  # Alois P. Heinz, Apr 29 2022
  • Mathematica
    p[n_]:=Module[{idn=Select[IntegerDigits[n],#>0&]},Total[idn^idn]]; Array[p, 40,0] (* Harvey P. Dale, Dec 13 2012 *)
  • PARI
    apply( {A045512(n)=vecsum([d^d|d<-digits(n),d])}, [0..44]) \\ M. F. Hasler, Oct 01 2024

Extensions

Checked by Neven Juric (neven.juric(AT)apis-it.hr), Feb 04 2008

A276170 Let n have j digits {d_j, d_(j-1), ..., d_2, d_1}. Sequence lists numbers n such that n = d_j^b_j + d_(j-1)^b_(j-1) + ... + d_2^b_2 + d_1^b_1 for some permutation {b_j, b_(j-1), ..., b_2, b_1} of the digits.

Original entry on oeis.org

1, 1364, 3435, 4155, 4316, 4355, 17463, 48625, 63725, 78215, 117693, 136775, 137456, 137529, 164726, 184746, 196753, 264719, 326617, 326671, 397612, 423858, 516974, 637395, 652812, 653285, 653957, 687523, 834272, 936627, 1374962, 1617349, 1679812, 1683397, 1683514
Offset: 1

Views

Author

Paolo P. Lava, Aug 23 2016

Keywords

Comments

0^0 is not admitted.
652812 is the first number with two essentially different permutations:
6^1 + 5^8 + 2^5 + 8^6 + 1^2 + 2^2 = 6^2 + 5^8 + 2^1 + 8^6 + 1^5 + 2^2 = 652812.

Examples

			One of the permutations of {1,3,6,4} is {6,1,4,3} and 1^6+3^1+6^4+4^3 = 1364.
		

Crossrefs

Programs

  • Maple
    with(combinat); P:= proc(q) local a,b,c,d,j,k,ok,n;
    for n from 1 to q do ok:=1; d:=ilog10(n)+1; a:=convert(n,base,10); b:=permute(a,d);
    for k from 1 to nops(b) do c:=0; for j from 1 to d do
    if a[j]=0 and b[k][j]=0 then ok:=0; break; else c:=c+a[j]^b[k][j];  fi; od;
    if ok=1 then if c=n then print(n); break; fi; fi; od; od; end: P(10^6);

A243507 Consider a decimal number, n, with k digits. n = d(k)*10^(k-1) + d(k-1)*10^(k-2) + … + d(2)*10 + d_(1). Sequence lists the numbers n that divide s = Sum_{i=1..k} d(i)^d(i).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 63, 64, 93, 377, 643, 699, 760, 2428, 3435, 13073, 46864, 184405, 208858, 1313290, 2326990, 2868720, 2868741, 18273988, 25265859, 33690905, 87889176, 194123725, 589957694
Offset: 1

Views

Author

Keywords

Comments

Since 0^0 is indeterminate, but for all other Xs, X^0 is 1, we define 0^0 here to be 1. (Since 0 does not divide 1, 0 is not a member.)
For Münchhausen numbers (A046253) the ratio is 1. [Paolo P. Lava, Apr 08 2016]

Examples

			63 is in the sequence because 6^6+3^3 = 46683 and 46683/63 = 741, an integer.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local a,b,k,n; for n from 1 to q do a:=[]; b:=n; while b>0 do a:=[op(a),b mod 10]; b:=trunc(b/10); od; b:=0; for k from 1 to nops(a) do if a[k]=0 then b:=b+1; else b:=b+a[k]^a[k]; fi; od; if type(b/n,integer) then print(n); fi; od; end: P(10^10);
  • Mathematica
    fQ[n_] := Block[{id = IntegerDigits@ n /. {0 -> 1}}, Mod[ Total[ id^id], n] == 0]; k = 1; lst = {}; While[k < 10000000001, If[ fQ@ k, AppendTo[ lst, k]; Print@ k]; k++]; lst

A276241 Let n have j digits {d_j, d_(j-1), ..., d_2, d_1}. Sequence lists numbers n such that R(n) = d_j^b_j + d_(j-1)^b_(j-1) + ... + d_2^b_2 + d_1^b_1 for some permutation {b_j, b_(j-1), ..., b_2, b_1} of the digits, where R(n) is the digits reverse of n.

Original entry on oeis.org

1, 10, 4631, 5343, 5514, 5534, 6134, 36471, 45130, 51287, 52684, 52736, 85200, 176623, 216793, 218256, 272438, 325786, 357691, 396711, 479615, 512870, 577631, 582356, 593736, 627461, 647481, 654731, 716623, 726639, 759356, 858324, 917462, 925731, 945630, 1075785
Offset: 1

Views

Author

Paolo P. Lava, Aug 25 2016

Keywords

Comments

0^0 is not admitted.

Examples

			One of the permutations of {4,6,3,1} is {3,4,1,6} and 4^3 + 6^4 + 3^1 + 1^6 = 1364 = R(4631).
		

Crossrefs

Programs

  • Maple
    with(combinat):  R:=proc(w) local x, y, z; x:=w; y:=0; for z from 1 to ilog10(x)+1 do y:=10*y+(x mod 10); x:=trunc(x/10); od; y; end:
    P:= proc(q) local a,b,c,d,i,j,k,n,ok,x;
    for n from 1 to q do i:=R(n); x:=convert(n,base,10); d:=ilog10(n)+1; b:=permute(x,d); a:={}; ok:=1;
    for k from 1 to nops(x) do a:={op(a),x{d-k+1}}; od; for k from 1 to nops(b) do c:=0;
    for j from 1 to d do if a{j}=0 and b{k}{j}=0 then ok:=0; break; else c:=c+a{j}^b{k}{j}; fi; od;
    if ok=1 then if i=c then print(n); break; fi; fi; od; od;  end: P(10^12);

A334828 Numbers that divide the multiplication of its digits raised to their own powers.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 16, 25, 36, 64, 96, 125, 128, 135, 162, 175, 216, 250, 256, 375, 378, 384, 432, 486, 567, 576, 625, 648, 672, 675, 729, 735, 756, 768, 784, 864, 875, 972, 1024, 1176, 1250, 1296, 1372, 1715, 1764, 1944, 2048, 2304, 2500, 2744, 2916, 3087, 3125, 3375, 3456, 3645, 3675, 4096
Offset: 1

Views

Author

Scott R. Shannon, May 13 2020

Keywords

Comments

As in A045503 we take 0^0 = 1.
Numbers m that divide A061510(m).

Examples

			5 is a term as 5^5 = 3125 which is divisible by 5.
16 is a term as 1^1*6^6 = 46656 which is divisible by 16.
375 is a term as 3^3*7^7*5^5 = 69486440625 which is divisible by 375.
1176 is a term as 1^1*1^1*7^7*6^6 = 38423222208 which is divisible by 1176.
		

Crossrefs

Programs

  • Mathematica
    pow[n_] := If[n == 0, 1, n^n]; Select[Range[2^12], Divisible[Times @@ (pow /@ IntegerDigits[#]), #] &] (* Amiram Eldar, May 13 2020 *)
  • PARI
    isok(m) = my(d=digits(m)); (prod(k=1, #d, d[k]^d[k]) % m) == 0; \\ Michel Marcus, May 14 2020

A378246 Integers that are equal to the product of their nonzero digits raised to their own power.

Original entry on oeis.org

1, 1024, 12500
Offset: 1

Views

Author

Jason Hammerman, Nov 20 2024

Keywords

Comments

If one accepts 0^0 = 1, the "nonzero" part of the description is unnecessary.
From Michael S. Branicky, Nov 25 2024: (Start)
Terms must be 7-smooth (A002473).
a(4) > 10^200 if it exists. (End)

Examples

			1024  = 1^1 * 2^2 * 4^4.
12500 = 1^1 * 2^2 * 5^5.
		

Crossrefs

Fixed points of A061510.
Inspired by A046253.
Cf. A002473.

Programs

  • Mathematica
    F[a_]:=If[a==0,1,a^a];Select[Range[10^5],#==Times@@F/@IntegerDigits[#]&] (* James C. McMahon, Dec 14 2024 *)
  • PARI
    isok(k) = my(d=digits(k)); k == vecprod(vector(#d, i, d[i]^d[i])); \\ Michel Marcus, Nov 22 2024
  • Python
    # See Python program link.
    
  • Python
    from math import prod
    def ok(n): return n == prod(d**d for d in map(int, str(n)) if d > 1)
    print([k for k in range(10**5) if ok(k)]) # Michael S. Branicky, Nov 24 2024
    

A048341 Equal to the sum of its digits raised to its reversed digits power (0^0=1).

Original entry on oeis.org

1, 48625, 397612
Offset: 0

Views

Author

Patrick De Geest, Feb 15 1999

Keywords

Examples

			48625 = 4^5 + 8^2 + 6^6 + 2^8 + 5^4.
		

Crossrefs

Programs

  • Mathematica
    sdrdp[n_]:=Module[{idn=IntegerDigits[n]},Total[#[[1]]^#[[2]]&/@(Thread[ {idn,Reverse[idn]}]/.{0,0}->{1,1})]]; Select[Range[400000],# == sdrdp[#]&] (* Harvey P. Dale, Jul 31 2013 *)

A214301 Smallest limiting value of n under iteration of "Sum of its digits raised to its digits power" (A045512).

Original entry on oeis.org

1, 288, 288, 288, 288, 288, 288, 288, 288, 1, 288, 288, 288, 288, 50119, 3439, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 3439, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 50119
Offset: 1

Views

Author

Sergio Pimentel, Jul 11 2012

Keywords

Comments

Numbers that yield a fixed value after adding its digits raised to its digits power are called "Munchhausen Numbers" (A046253); i.e. 3435 = 3^3 + 4^4 + 3^3 + 5^5.
Since (9^9)*n < 10^n for n > 12; every initial value should eventually reach a "Munchhausen Number" or a cycle.
This sequence assigns to n that Munchhausen number or the lowest member of the cycle.
About 80% of the numbers reach the 288 cycle; 15% the 3439 cycle; 5% the 50119 cycle and less than 0.1% the fixed value 438579088; only few sporadic numbers reach 1 or 3435.
It has been proved that there are only four Munchhausen numbers (0, 1, 3435 and 438579088) with the convention of 0^0 = 0.
Open questions: are there any other cycles than those described here? What is the % of numbers < 10^n reaching a specific limiting value for n = 1, 2, 3, etc...?

Crossrefs

Programs

  • Mathematica
    f[n_] := Module[{d = IntegerDigits[n]}, Sum[If[i == 0, 0, i^i], {i, d}]]; Table[s = NestWhileList[f, n, UnsameQ[##] &, All]; Min[Drop[s, Position[s, s[[-1]], 1, 1][[1, 1]]]], {n, 100}] (* T. D. Noe, Jul 12 2012 *)
Showing 1-9 of 9 results.