A076089 Essentially a duplicate of A046000.
9, 9, 27, 36, 46, 64, 68, 63, 81, 117, 108, 108, 146, 154, 199, 187, 216, 181, 207, 207
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.
1, 2, 3, 4, 5, 6, 7, 8, 9; 1, 9; 1, 8, 17, 18, 26, 27; (A046459, with 0) 1, 7, 22, 25, 28, 36; (A055575 " ) 1, 28, 35, 36, 46; (A055576 " ) 1, 18, 45, 54, 64; (A055577 " ) 1, 18, 27, 31, 34, 43, 53, 58, 68; (A226971 " ) 1, 46, 54, 63; 1, 54, 71, 81, 1, 82, 85, 94, 97, 106, 117, 1, 98, 107, 108, etc.
def ok(k, r): return sum(map(int, str(k**r))) == k def agen(rows, startrow=1, withzero=0): for r in range(startrow, rows + startrow): d, lim = 1, 1 while lim < r*9*d: d, lim = d+1, lim*10 yield from [k for k in range(1-withzero, lim+1) if ok(k, r)] print([an for an in agen(13)]) # Michael S. Branicky, May 23 2021
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) = 19683 = 27^3 and no bigger number can have this property. (This has been established in the Murthy reference.) a(4) = 1679616 = (1+6+7+9+6+1+6)^4 = 36^4.
meanDigit = 9/2; translate = 900; upperm[1] = translate; upperm[n_] := Exp[-ProductLog[-1, -Log[10]/(meanDigit*n)]] + translate; a[n_] := (For[max = m = 1, m <= upperm[n], m++, If[m == Total[ IntegerDigits[ m^n ] ], max = m]]; max^n); Array[a, 14] (* Jean-François Alcover, Jan 09 2018 *)
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
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
a(17)=4 -> sum-of-digits{x^17}=x for x=80,143,171 and 216 (x>1).
Triangle begins: n=0: 1; n=1: 1, 2, 3, 4, 5, 6, 7, 8, 9; n=2: 1, 2, 3, 9; n=3: 1, 2, 3, 8, 9, 17, 18, 26, 27; n=4: 1, 3, 6, 7, 9, 22, 25, 28, 36; n=5: 1, 3, 9, 28, 35, 36, 46; n=6: 1, 2, 3, 7, 9, 18, 23, 45, 54, 64; n=7: 1, 3, 6, 9, 12, 15, 18, 27, 31, 34, 43, 53, 58, 68; n=8: 1, 3, 5, 6, 9, 15, 27, 46, 54, 63; n=9: 1, 2, 3, 6, 7, 9, 16, 27, 36, 54, 71, 81; n=10: 1, 3, 5, 6, 9, 18, 36, 82, 85, 94, 97, 106, 117; ...
def ok(k, n): return sum(map(int, str(k**n)))%k==0 def row(n): d, lim = 1, 1 while lim < n*9*d: d, lim = d+1, lim*10 yield from [k for k in range(1, lim+1) if ok(k, n)] print([an for n in range(9) for an in row(n)]) # Michael S. Branicky, Jul 06 2022
Comments