A076088 Duplicate of A061211.
9, 81, 19683, 1679616, 205962976, 68719476736, 6722988818432, 248155780267521
Offset: 1
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.
4913 = (4 + 9 + 1 + 3)^3.
Select[Range[20000],Total[IntegerDigits[#]]^3==#&] (* Harvey P. Dale, Apr 11 2015 *)
for(n=0,999999,sumdigits(n)^3==n&&print1(n",")) \\ M. F. Hasler, Apr 12 2015
614656 = ( 6+1+4+6+5+6)^4 =28^4.
Select[Range[0,17*10^5],#==Total[IntegerDigits[#]]^4&] (* Harvey P. Dale, Sep 22 2019 *)
isok(n) = n == sumdigits(n)^4; \\ Michel Marcus, Jan 22 2015
a(3) = 8 since 8^3 = 512 and 5+1+2 = 8; a(5) = 28 because 28 is least number > 1 with 28^5 = 17210368, 1+7+2+1+0+3+6+8 = 28. 53^7 = 1174711139837 -> 1+1+7+4+7+1+1+1+3+9+8+3+7 = 53. a(10) = 82 because 82^10 = 13744803133596058624 and 1 + 3 + 7 + 4 + 4 + 8 + 0 + 3 + 1 + 3 + 3 + 5 + 9 + 6 + 0 + 5 + 8 + 6 + 2 + 4 = 82. a(13) = 20: 20^13=81920000000000000, 8+1+9+2=20. a(17) = 80: 80^17=225179981368524800000000000000000, 2+2+5+1+7+9+9+8+1+3+6+8+5+2+4+8 = 80.
a[n_] := For[k = 2, k <= 20*n, k++, Which[k == Total[IntegerDigits[k^n]], Return[k], k == 20*n, Return[0]]]; Table[a[n] , {n, 1, 105}] (* Jean-François Alcover, May 23 2012 *) sdk[n_]:=Module[{k=2},While[k!=Total[IntegerDigits[k^n]],k++];k]; Array[sdk,70] (* Harvey P. Dale, Jan 07 2024 *)
from itertools import chain def c(k, n): return sum(map(int, str(k**n))) == k def a(n): if n == 0: return False d, lim = 1, 1 while lim < n*9*d: d, lim = d+1, lim*10 m = next(k for k in chain(range(2, lim+1), (0,)) if c(k, n)) return m print([a(n) for n in range(1, 66)]) # Michael S. Branicky, Jul 06 2022
a(3) = 27 because 27 is the largest number with 27^3 = 19683 and 1+9+6+8+3 = 27. a(5) = 46 because 46 is the largest number with 46^5 = 205962976 and 2+0+5+9+6+2+9+7+6 = 46.
meanDigit = 9/2; translate = 900; upperm[1] = translate; upperm[n_] := Exp[-ProductLog[-1, -Log[10]/(meanDigit*n)]] + translate; (* assuming that upper bound of m fits the implicit curve m = Log[10, m^n]*9/2 *) a[0] = 1; a[n_] := (For[max = m = 0, m <= upperm[n], m++, If[m == Total[IntegerDigits[m^n]], max = m]]; max); Table[a[n], {n, 0, 1000}] (* Jean-François Alcover, Jan 09 2018, updated Jul 07 2022 *)
def ok(k, n): return sum(map(int, str(k**n))) == k def a(n): d, lim = 1, 1 while lim < n*9*d: d, lim = d+1, lim*10 return next(k for k in range(lim, 0, -1) if ok(k, n)) print([a(n) for n in range(63)]) # Michael S. Branicky, Jul 06 2022
def ok(n): d, lim = 1, 1 while lim < n*9*d: d, lim = d+1, lim*10 return not any(sum(map(int, str(k**n))) == k for k in range(2, lim+1)) for k in range(195): if ok(k): print(k, end=", ") # Michael S. Branicky, Jul 06 2022
2401 is an element because 2401 = 7^4 is a power of its digit sum 7.
fQ[n_] := Block[{b = Plus @@ IntegerDigits[n]}, If[b > 1, IntegerQ[ Log[b, n]] ]]; Take[ Select[ Union[ Flatten[ Table[n^m, {n, 55}, {m, 9}]]], fQ[ # ] &], 31] (* Robert G. Wilson v, Jan 28 2005 *) Join[{0,1},Select[Range[0,1700000],IntegerQ[Log[Total[IntegerDigits[#]],#]]&]//Quiet] (* The program generates the first 21 terms of the sequence. *) (* Harvey P. Dale, Mar 30 2024 *)
is(n)={n<10||(!(n%s=sumdigits(n))&&s>1&&n==s^round(log(n)/log(s)))} \\ M. F. Hasler, Apr 13 2015
import math def is_valid(n): dsum = sum(map(int, str(n))); return dsum ** int(round(math.log(n, dsum))) == n if dsum > 1 else n < 2 # Victor Dumbrava, May 02 2018
205962976 = 46^5 = (2 + 0 + 5 + 9 + 6 + 2 + 9 + 7 + 6)^5.
Select[Range@ 210000000, Plus @@ IntegerDigits@ # ^ 5 == # &] (* Michael De Vlieger, Feb 25 2015 *)
lista(nn) = {for (n=0, nn, if (n^5 == sumdigits(n^5)^5, print1(n^5, ", ")););} \\ Michel Marcus, Feb 23 2015
68719476736 = (6+8+7+1+9+4+7+6+7+3+6)^6 = 64^6.
for (k=0, sqrtnint(10^13,6), if (k^6 == sumdigits(k^6)^6, print1(k^6, ", ")); )
Triangle begins: 1 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9; 2 | 0, 1, 81; 3 | 0, 1, 512, 4913, 5832, 17576, 19683; 4 | 0, 1, 2401, 234256, 390625, 614656, 1679616; 5 | 0, 1, 17210368, 52521875, 60466176, 205962976; 6 | 0, 1, 34012224, 8303765625, 24794911296, 68719476736; 7 | 0, 1, 612220032, 10460353203, 27512614111, 52523350144, 271818611107, 1174711139837, 2207984167552, 6722988818432; 8 | 0, 1, 20047612231936, 72301961339136, 248155780267521; 9 | 0, 1, 3904305912313344, 45848500718449031, 150094635296999121; ...
R(n) = for(j=2,oo, if((j*9)^n <10^j, return(j))); row(n) = my(L=List()); for (k=0, sqrtnint(10^R(n),n), if (k^n == sumdigits(k^n)^n, listput(L, k^n))); Vec(L)
Comments