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-4 of 4 results.

A124359 Numbers n for which the sum of the digits of n^k, for some k, is equal to n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 17, 18, 20, 22, 25, 26, 27, 28, 31, 34, 35, 36, 40, 43, 45, 46, 53, 54, 58, 63, 64, 68, 71, 80, 81, 82, 85, 86, 90, 91, 94, 97, 98, 103, 104, 106, 107, 108, 117, 118, 126, 127, 133, 134, 135, 136, 140, 142, 143, 146, 152, 154, 155, 157, 160, 163, 169, 170
Offset: 1

Views

Author

Keywords

Comments

Most of the values are conjectural. So far not much is proved about the function A247889. - M. F. Hasler and Robert Israel, May 18 2017

Examples

			18^3 = 5832 and 5 + 8 + 3 + 2 = 18 (also 18^6 = 34012224 and 18^7 = 612220032).
Again 46^5 = 205962976 and 2 + 0 + 5 + 9 + 6 + 2 + 9 + 7 + 6 = 46.
		

Crossrefs

Complement of A124367. Numbers for which A247889 is nonzero.

Programs

Extensions

Prepended a(1) = 0, offset corrected and more terms added by Derek Orr, Sep 25 2014
Edited by M. F. Hasler, May 18 2017

A125526 Numbers k for which the sum of the digits of k raised to the sum of the digits of k itself is equal to k. If "sumdigit" denotes the sum of the digits of a number then these are the numbers k such that k = sumdigit(k^sumdigit(k)).

Original entry on oeis.org

1, 22, 34, 43, 54, 81, 82, 169, 187
Offset: 1

Views

Author

Keywords

Comments

There are no other terms. Proof: Assume the next term has d digits. 10^d > k >= 10^(d-1); sumdigit(k) >= 9d; k^sumdigit(k) < (10^d)^(9d) < 10^(9d^2); 9*(9d^2+1) > sumdigit(k^sumdigit(k)); 9*(9d^2+1) > k 9*(9d^2+1) > 10^(d-1). So d < 5. - Fung Cheok Yin (cheokyin_restart(AT)yahoo.com.hk), Mar 11 2007

Examples

			a(2)=22 because 2 + 2 = 4, 22^4 = 234256, 2 + 3 + 4 + 2 + 5 + 6 = 22.
		

Crossrefs

Programs

  • Maple
    P:=proc(n) local i,j,k,w; for i from 1 by 1 to n do w:=0; k:=i; while k>0 do w:=w+k-trunc(k/10)*10; k:=trunc(k/10); od; k:=i^w; w:=0; while k>0 do w:=w+k-trunc(k/10)*10; k:=trunc(k/10); od; if (i=w) then print(w); fi; od; end: P(200);
    sod := proc(n,b) convert(convert(n,base,b),`+`) end; b:=10: L:=[]: for w to 1 do for n from 1 to 10^3 do x:=sod(n^sod(n,b),b); if x=n then print(n); L:=[op(L),n]; fi; od od; L; # Walter Kehowski, Feb 12 2007
    sd:=proc(n) local nn: nn:=convert(n,base,10): sum(nn[j],j=1..nops(nn)) end: a:=proc(n) if sd(n^sd(n))=n then n else fi end: seq(a(n),n=1..500); # Emeric Deutsch, Feb 16 2007
  • Mathematica
    Select[Range[200],Total[IntegerDigits[#^Total[IntegerDigits[#]]]]==#&] (* Harvey P. Dale, Jul 26 2019 *)

A247889 Least number k > 0 such that digsum(n^k) = n, or 0 if no such k exists.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 13, 0, 4, 0, 0, 4, 3, 3, 4, 0, 0, 7, 0, 0, 7, 5, 4, 0, 0, 0, 13, 0, 0, 7, 0, 6, 5, 0, 0, 0, 0, 0, 0, 7, 6, 0, 0, 0, 7, 0, 0, 0, 0, 8, 6, 0, 0, 0, 7, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 17, 9, 10, 0, 0, 10, 13, 0, 0, 0, 19, 14, 0, 0, 10, 0, 0, 10, 11, 0, 0
Offset: 0

Views

Author

Derek Orr, Sep 25 2014

Keywords

Comments

a(10^n) = 0 for all n > 0.
a(n) = 0 if and only if n is in A124367, complement of A124359.
The PARI code uses that, if sumdigit(n^k) <> n until sumdigits(n^k) > 2n for the first time, then sumdigits(n^k) <> n for all larger k. This might not be true for all n, although statistically sumdigits(n^k) ~ 4.5*log_10(n')*k within a few % (n' = n with trailing 0's removed), when k is not too small. - M. F. Hasler, May 18 2017

Crossrefs

Cf. A124359 (a(n) > 0), A124367 (a(n) = 0), A007953, A152147.

Programs

  • PARI
    A247889(n,L=2*n)= if(n<10||vecmin(digits(n-1))==9,return(n<10));k=1;while(L >= s=sumdigits(n^k),if(s,return(k));k++) \\ Renamed to A247889 for use in A124359, A124367 (and elsewhere?), and minor edits by M. F. Hasler, May 18 2017
    apply(A247889,[0..100])

Extensions

Data corrected (initial 1 removed, terminal 0 added) by Hans Havermann, Jul 13 2018

A124053 Numbers n that can be expressed as the sum of the digits of both m^k and k^m for distinct numbers m and k which are not both equal to powers of 10.

Original entry on oeis.org

7, 18, 45, 61, 72, 85, 90, 145, 270, 306, 315, 367, 376, 448, 477, 540, 547, 585, 667, 733, 756, 765, 943, 1152, 1377, 1899, 1971, 2106, 2133, 2155, 2215, 2224, 2349, 2628, 2822, 2871, 2968, 3123, 3139, 3181, 3204, 3355, 3546, 3553, 3775, 3780, 4131, 4455
Offset: 1

Views

Author

Paolo P. Lava and Giorgio Balzarotti, Nov 03 2006, Nov 29 2006

Keywords

Comments

If "sumdigit" denotes the sum of the digits of a number then these are the numbers n such that n=sumdigit(m^k)=sumdigit(k^m).
Two banal cases are not considered: 1) m=k because m^k=k^m and the sum of the digits is automatically equal for both the numbers; 2) powers of 10 because sumdigit(10^a)=1 for any integer a. The same number can be generated by different pairs: 477 cames from sumdigit(54^63)=sumdigit(63^54) and sumdigit(90^120)=sumdigit(120^90) 2349 cames from sumdigit(216^222)=sumdigit(222^216), sumdigit(216^225)=sumdigit(225^216) and sumdigit(219^222)=sumdigit(222^219)

Examples

			270 = sumdigit(36^39) = sumdigit(39^36);
1152 = sumdigit(114^126) = sumdigit(126^114);
2133 = sumdigit(204^213) = sumdigit(213^204).
		

Crossrefs

Programs

  • Maple
    P:=proc(n)local i,j,k,w,x,y; for i from 1 by 1 to n do for j from 1 by 1 to n do w:=0; x:=0; k:=i^j; y:=j^i; while k>0 do w:=w+k-trunc(k/10)*10; k:=trunc(k/10); od; while y>0 do x:=x+y-trunc(y/10)*10; y:=trunc(y/10); od; if (w=x) and (w<>1) and (i
    				
Showing 1-4 of 4 results.