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

A256590 Base-2 Reacher numbers: numbers that are powers of the sum of their base-2 digits.

Original entry on oeis.org

0, 1, 81, 625, 7776, 16807, 46656, 59049, 1679616, 1475789056, 6975757441, 137858491849, 576650390625, 41426511213649, 2384185791015625, 150094635296999121, 10260628712958602189, 32768000000000000000, 243569224216081305397, 655360000000000000000
Offset: 1

Views

Author

Jeffrey Shallit, Apr 03 2015

Keywords

Comments

Named for fictional character Jack Reacher in the series of novels by Lee Child.
There are 2709 terms with 10,000 or fewer digits; a(2709) = 15402^2388. - Charles R Greathouse IV, Nov 26 2016

References

  • Lee Child, Bad Luck and Trouble, Delacorte Press, 2007. In this book, the main character, Jack Reacher, likes the number 81 because it is the square of the sum of its base-10 digits.

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Block[{wt = DigitCount[n, 2, 1]},
    Which[n <= 1, True, wt <= 1, False, True, IntegerQ@ Log[wt, n]]]; Select[Range[10^5], fQ] (* Michael De Vlieger, Apr 04 2015 *)
  • PARI
    is(n)= n<=1 || (ispower(n,,&r) && (r==hammingweight(n) || (r^ispower(n=hammingweight(n))==n && n>1))) \\ Michel Marcus and M. F. Hasler, Apr 04 2015
    
  • PARI
    list(lim)=my(v=List([0,1]),H,t); for(e=3,logint(lim\=1,3), for(b=2,min(solve(x=e,lim,x-e*log(x)/log(2)-1),sqrtnint(lim,e)), H=hammingweight(t=b^e); if(H>1 && b^valuation(H,b)==H, listput(v,t)))); Set(v) \\ Charles R Greathouse IV, Nov 26 2016

Extensions

a(1) prepended and a(14)-a(20) added by Hiroaki Yamanouchi, Apr 03 2015

A381487 Numbers which are a power of their digital root.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 81, 128, 256, 512, 729, 2401, 6561, 8192, 16384, 32768, 59049, 78125, 524288, 531441, 823543, 1048576, 2097152, 4782969, 33554432, 43046721, 67108864, 134217728, 282475249, 387420489, 1220703125, 2147483648, 3486784401, 4294967296
Offset: 1

Views

Author

Stefano Spezia, Feb 25 2025

Keywords

Examples

			a(12) = 128 is a term since 128 = 2^7 = A010888(128)^7.
		

Crossrefs

Digital root of k^n: A000012 (1), A153130 (2), A100401 (3), A100402 (4), A070366 (5), A100403 (6), A070403 (7), A010689 (8), A010734 (9).

Programs

  • Mathematica
    A010888[n_]:=n - 9*Floor[(n-1)/9]; kmax=5*10^6; a={0,1}; For[k=2, k<=kmax, k++, If[A010888[k]!=1, If[IntegerQ[Log[A010888[k],k]], AppendTo[a,k]]]]; a
  • PARI
    isok(k) = if ((k==0) || (k==1), return(1)); my(d=(k-1)%9+1); if (d>1, d^logint(k, d) == k); \\ Michel Marcus, Feb 26 2025
    
  • PARI
    lista(nn) = my(list = List()); listput(list, 0); listput(list, 1); for (n=2, 9, for (k=1, logint(nn, n), if ((n^k-1)%9+1 == n, listput(list, n^k)););); vecsort(Vec(list)); \\ Michel Marcus, Feb 27 2025

Formula

a(n) = A381491(n)^A381492(n).

A038178 Numbers k such that k = (sum of digits of k)^(number of digits of k).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 81, 512, 2401
Offset: 1

Views

Author

Keywords

Comments

To prove completeness, consider that k^m contains more than m digits for every k >= 10 and check 1 <= k <= 9 explicitly. - Ulrich Schimke (ulrschimke(AT)aol.com)
Subset of A023106. - R. J. Mathar, Oct 20 2008

Examples

			512 is in the sequence because (5 + 1 + 2)^3 = 512.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2500],#==Total[IntegerDigits[#]]^IntegerLength[#]&] (* Harvey P. Dale, Oct 26 2011 *)

A128912 Numbers m of the form (sum of digits of m)^k, k > 1.

Original entry on oeis.org

0, 1, 81, 512, 2401, 4913, 5832, 17576, 19683, 234256, 390625, 614656, 1679616, 17210368, 34012224, 52521875, 60466176, 205962976, 612220032, 8303765625, 10460353203, 24794911296, 27512614111, 52523350144, 68719476736
Offset: 1

Views

Author

J. M. Bergot, Apr 23 2007

Keywords

Comments

Perfect powers m > 1 such that the sum of the digits of m equals one of its nontrivial roots.
Essentially a duplicate of A023106, where numbers 2 through 9 are allowed as solutions for k=1.

Examples

			234256 = 22^4 and 2+3+4+2+5+6 = 22, hence 234256 is a term.
390625 = 25^4 and 3+9+0+6+2+5 = 25, hence 390625 is a term.
		

Crossrefs

Cf. A001597 (perfect powers), A007953 (sum of digits).

Programs

  • PARI
    {m=10^5; z=10^11; v=[]; for(n=0, m, k=2; while((p=n^k)<=z, s=sumdigits(p); if(n==s, v=concat(v, p)); k++)); v=vecsort(v); print(v)} \\ Klaus Brockhaus, Apr 24 2007, edited by M. F. Hasler, Apr 14 2015
    
  • PARI
    is(n)=ispower(n)&&(1M. F. Hasler, Apr 14 2015

Extensions

Edited, corrected and extended by Klaus Brockhaus, Apr 24 2007
Definition simplified and initial terms 0, 1 added by M. F. Hasler, Apr 14 2015

A283034 Numbers k such that k = (sum of digits of k)^(last digit of k).

Original entry on oeis.org

1, 4913, 19683, 52521875, 24794911296, 68719476736, 271818611107, 1174711139837
Offset: 1

Views

Author

Shmelev Aleksei, Feb 27 2017

Keywords

Comments

The check must be done up to 10^22 (then for 23 digits in a number max result can be (23*10)^9 = 4, 6*10^20 < 10^22).

Examples

			1 = 1^1,
4913 = (4+9+1+3)^3,
19683 = (1+9+6+8+3)^3,
52521875 = (5+2+5+2+1+8+7+5)^5.
		

Crossrefs

Programs

  • Mathematica
    Union[Reap[nd=1; Sow[1]; While[Ceiling[(10^(nd-1))^(1/9)] <= 9 nd, Do[ Do[v = s^e; If[Mod[v, 10] == e && Plus @@ IntegerDigits@ v == s, Sow[v]], {s, Ceiling[ (10^(nd-1))^(1/e)], Min[ Floor[10^(nd/e)], 9 nd]}], {e, 2, 9}]; nd++]][[2, 1]]] (* all terms, Giovanni Resta, Feb 27 2017 *)
  • VBA
    Sub calcul()
       Sheets("Result").Select
       Range("A1").Select
       For i = 1 To 10000000
          Sum = 0
          For k = 1 To Len(i)
             Sum = Sum + Mid(i, k, 1)
          Next
          If Sum ^Mid(i, len(i), 1)= i Then
             ActiveCell.Value = i
             ActiveCell.Offset(1, 0).Select
          End If
       Next
    End Sub

Extensions

a(5)-a(8) from Giovanni Resta, Feb 27 2017

A368245 Numbers k such that there is a positive integer r for which k^(1/r) = digsum(k) - r.

Original entry on oeis.org

4, 25, 64, 125, 196, 216, 289, 343, 2744, 3375, 4096, 3518743761, 13537086546263552, 15633814156853823
Offset: 1

Views

Author

Stefano Spezia, Jan 23 2024

Keywords

Comments

Some other terms: 50714860157241037295616, 188031682201497672618081, 4817904819828488880132096, 13214788658781797667045376, 45587487211290846582931833112449, 112410921330388974282595778471993, 282429536481000000000000000000000000, 21936950640377856000000000000000000000. - Chai Wah Wu, Jan 30 2024

Examples

			The terms 4, 25, 64, 196, and 289 are obtained for r = 2:
  4^(1/2) = sqrt(4) = 2 = digsum(4) - 2;
  25^(1/2) = sqrt(25) = 5 = digsum(25) - 2 = 7 - 2;
  64^(1/2) = sqrt(64) = 8 = digsum(64) - 2 = 10 - 2;
  196^(1/2) = sqrt(196) = 14 = digsum(196) - 2 = 16 - 2;
  289^(1/2) = sqrt(289) = 17 = digsum(289) - 2 = 19 - 2.
The terms 125, 216, 343, 2744, 3375, and 4096 are obtained for r = 3:
  125^(1/3) = 5 = digsum(125) - 3 = 8 - 3;
  216^(1/3) = 6 = digsum(216) - 3 = 9 - 3;
  343^(1/3) = 7 = digsum(343) - 3 = 10 - 7;
  2744^(1/3) = 14 = digsum(2744) - 3 = 17 - 3;
  3375^(1/3) = 15 = digsum(3375) - 3 = 18 - 3;
  4096^(1/3) = 16 = digsum(4096) - 3 = 19 - 3.
The term 3518743761 is obtained for r = 6:
  3518743761^(1/6) = 39 = digsum(3518743761) - 6 = 45 - 6.
		

Crossrefs

Cf. A001597 (supersequence), A007953, A029837.

Programs

  • Mathematica
    min = 0; max = 10^8; list=Union@ Flatten@ Table[ n^expo, {expo, Prime@ Range@ PrimePi@ Log2@ max}, {n, Floor[1 + min^(1/expo)], max^(1/expo)}]; (* A001597 *)
    a = {};  For[k = 1, k <=Length[list], k++, For[r = 2, r <= Ceiling[Log2[Part[list,k]]], r++, If[Part[list,k]^(1/r) == Total[IntegerDigits[Part[list,k]]]-r, AppendTo[a, Part[list,k]]]]]; a

Extensions

a(13)-a(14) from Chai Wah Wu, Jan 30 2024
Showing 1-6 of 6 results.