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.

Previous Showing 21-30 of 32 results. Next

A134703 Powerful numbers (2b): a sum of nonnegative powers of its digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 24, 43, 63, 89, 132, 135, 153, 175, 209, 224, 226, 254, 258, 262, 263, 264, 267, 283, 308, 332, 333, 334, 347, 357, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 407, 445, 463, 472, 518, 538, 598, 629, 635, 653, 675, 730, 731, 732, 733, 734
Offset: 1

Views

Author

David W. Wilson, Sep 05 2009

Keywords

Comments

Here 0 digits may be used, with the convention that 0^0 = 1. Of course 0^1 = 0, so one is free to use the 0 digit to get an extra 1, or not.

Examples

			43 = 4^2 + 3^3; 254 = 2^7 + 5^3 + 4^0 = 128 + 125 + 1.
209 = 2^7 + 0^1 + 9^2.
732 = 7^0 + 3^6 + 2^1.
		

Crossrefs

Different from A007532 and A061862, which are variations.

Formula

If n = d_1 d_2 ... d_k in decimal then there are integers m_1 m_2 ... m_k >= 0 such that n = d_1^m_1 + ... + d_k^m_k.

A061862 Powerful numbers (2a): a sum of nonnegative powers of its digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 24, 43, 63, 89, 132, 135, 153, 175, 209, 224, 226, 254, 258, 262, 263, 264, 267, 283, 332, 333, 334, 347, 357, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 407, 445, 463, 472, 518, 538, 598, 629, 635, 653, 675, 730, 731, 732
Offset: 1

Views

Author

Erich Friedman, Jun 23 2001

Keywords

Comments

Zero digits cannot be used in the sum. - N. J. A. Sloane, Aug 31 2009
More precisely, digits 0 do not contribute to the sum, in contrast to A134703 where it is allowed to use 0^0 = 1. - M. F. Hasler, Nov 21 2019

Examples

			43 = 4^2 + 3^3; 254 = 2^7 + 5^3 + 4^0 = 128 + 125 + 1.
209 = 2^7 + 9^2.
732 = 7^0 + 3^6 + 2^1.
		

Crossrefs

Different from A007532 and A134703, which are variations.

Programs

  • Haskell
    a061862 n = a061862_list !! (n-1)
    a061862_list = filter f [0..] where
       f x = g x 0 where
         g 0 v = v == x
         g u v = if d <= 1 then g u' (v + d) else v <= x && h 1
                 where h p = p <= x && (g u' (v + p) || h (p * d))
                       (u', d) = divMod u 10
    -- Reinhard Zumkeller, Jun 02 2013
  • Mathematica
    f[ n_ ] := Module[ {}, a=IntegerDigits[ n ]; e=g[ Length[ a ] ]; MemberQ[ Map[ Apply[ Plus, a^# ] &, e ], n ] ] g[ n_ ] := Map[ Take[ Table[ 0, {n} ]~Join~#, -n ] &, IntegerDigits[ Range[ 10^n ], 10 ] ] For[ n=0, n >= 0, n++, If[ f[ n ], Print[ n ] ] ]

Formula

If n = d_1 d_2 ... d_k in decimal then there are integers m_1 m_2 ... m_k >= 0 such that n = d_1^m_1 + ... + d_k^m_k.

A226063 Number of fixed points in base n for the sum of the fourth power of its digits.

Original entry on oeis.org

1, 1, 3, 4, 1, 1, 7, 3, 4, 3, 1, 2, 1, 7, 2, 2, 1, 4, 2, 6, 2, 3, 1, 3, 1, 11, 3, 3, 2, 2, 7, 4, 1, 4, 3, 1, 3, 4, 1, 2, 2, 2, 3, 4, 2, 2, 1, 2, 1, 2, 1, 2, 4, 3, 3, 2, 2, 1, 3, 2, 5, 2, 9, 2, 1, 2, 1, 1, 3, 2, 2, 1, 2, 5, 1, 5, 5, 4, 2, 5, 3, 2, 2, 3, 3, 1, 2
Offset: 2

Views

Author

Keywords

Comments

All fixed points in base n have at most 5 digits. Proof: In order to be a fixed point, a number with d digits in base n must meet the condition n^d <= d*(n-1)^4, which is only possible for d < 5.
For 5-digit numbers vwxyz in base n, only numbers where v*n^4 + n^3 - 1 <= v^4 + 3*(n-1)^4 or v*n^4 + n^4 - 1 <= v^4 + 4*(n-1)^4 are possible fixed points. v <= 2 for n <= 250.

Examples

			For a(8)=7, the solutions are {1,16,17,256,257,272,273}. In base 8, these are written as {1, 20, 21, 400, 401, 420, 421}. Because 1^4 = 1, 2^4 + 0^4 = 16, 2^4 + 1^4 = 17, 4^4 + 0^4 + 0^4 = 256, etc., these are the fixed points in base 8.
		

Crossrefs

Cf. A226064 (greatest fixed point).
Cf. A052455 (fixed points in base 10).

Programs

  • R
    inbase=function(n,b) { x=c(); while(n>=b) { x=c(n%%b,x); n=floor(n/b) }; c(n,x) }
    yn=rep(NA,20)
    for(b in 2:20) yn[b]=sum(sapply(1:(1.5*b^4),function(x) sum(inbase(x,b)^4))==1:(1.5*b^4)); yn

A226064 Largest fixed point in base n for the sum of the fourth power of its digits.

Original entry on oeis.org

1, 1, 243, 419, 1, 1, 273, 1824, 9474, 10657, 1, 8194, 1, 53314, 47314, 36354, 1, 246049, 53808, 378690, 170768, 185027, 1, 247507, 1, 1002324, 722739, 278179, 301299, 334194, 1004643, 959859, 1, 1538803, 1798450, 1, 4168450, 2841074, 1, 1877793, 5556355
Offset: 2

Views

Author

Keywords

Comments

All fixed points in base n have at most 5 digits. Proof: In order to be a fixed point, a number with d digits in base n must meet the condition n^d <= d*(n-1)^4, which is only possible for d < 5.
For 5-digit numbers vwxyz in base n, only numbers where v*n^4 + n^3 - 1 <= v^4 + 3*(n-1)^4 or v*n^4 + n^4 - 1 <= v^4 + 4*(n-1)^4 are possible fixed points. v <= 2 for n <= 250.

Examples

			The fixed points in base 8 are {1,16,17,256,257,272,273}, because in base 8, these are written as {1,20,21,400,401,420,421} and 1^4 = 1, 2^4 + 0^4 = 16, 2^4 + 1^4 = 17, 4^4 + 0^4 + 0^4 = 256, etc. The largest of these is 273 = a(8).
		

Crossrefs

Cf. A226063 (number of fixed points).
Cf. A052455 (fixed points in base 10).

Programs

  • R
    for(b in 2:50) {
        fp=c()
        for(w in 1:b-1) for(x in 1:b-1) if((v1=w^4+x^4)<=(v2=w*b^3+x*b^2))
            for(y in 1:b-1) if((u1=v1+y^4)<=(u2=v2+y*b) & u1+b^4>u2+b-1) {
                z=which(u1+(1:b-1)^4==u2+(1:b-1))-1
                if(length(z)) fp=c(fp,u2+z)
            }
        cat("Base",b,":",fp[-1],"\n")
    }

A257814 Numbers n such that k times the sum of the digits (d) to the power k equal n, so n=k*sum(d^k), for some positive integer k, where k is smaller than sum(d^k).

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 50, 298, 130004, 484950, 3242940, 4264064, 5560625, 36550290, 47746195, 111971979, 129833998, 9865843497, 46793077740, 767609367921, 4432743262896, 42744572298532, 77186414790914, 99320211963544, 99335229415136, 456385296642870
Offset: 1

Views

Author

Pieter Post, May 10 2015

Keywords

Comments

The first nine terms are trivial, but then the terms become scarce. The exponent k must be less than the "sum of the digits" raised to the k-th power, otherwise there will be infinitely many terms containing 1's and 0's, like 11000= 5500*(1^5500+1^5500+0^5500+0^5500+0^5500). It appears this sequence is finite, because there is a resemblance with the Armstrong numbers (A005188).

Examples

			50 = 2*(5^2+0^2);
484950 = 5*(4^5+8^5+4^5+9^5+5^5+0^5).
		

Crossrefs

Programs

  • PARI
    sdk(d, k) = sum(j=1, #d, d[j]^k);
    isok(n) = {d = digits(n); k = 1; while ((val=k*sdk(d,k)) != n, k++; if (val > n, return (0))); k < sdk(d,k);} \\ Michel Marcus, May 30 2015
  • Python
    def mod(n,a):
        kk = 0
        while n > 0:
            kk= kk+(n%10)**a
            n =int(n//10)
        return kk
    for a in range (1, 10):
        for c in range (1, 10**7):
            if c==a*mod(c,a) and a
    				

Extensions

a(16)-a(28) from Giovanni Resta, May 10 2015

A258484 Numbers m such that m equals a fixed number raised to the powers of the digits.

Original entry on oeis.org

1, 10, 12, 100, 101, 111, 1000, 1010, 1033, 1100, 2112, 4624, 10000, 10001, 11101, 20102, 31301, 100000, 100010, 100011, 100100, 100101, 100110, 101000, 101001, 101010, 101100, 101110, 101111, 101121, 110000, 110001, 110010, 110100, 110110, 110111, 111000
Offset: 1

Views

Author

Pieter Post, May 31 2015

Keywords

Comments

Let m = abcde... and z is a fixed radix -> m = z^a +z^b +z^c +z^d +z^e...
A number m made of k ones and h zeros is a member if m-h is divisible by k. Several other large members exist, including 12095925296900865188 (base = 113) and 115330163577499130079377256005 (base = 1500). - Giovanni Resta, Jun 01 2015

Examples

			12 = 3^1 + 3^2;
31301 = 25^3 + 25^1 + 25^3 + 25^0 + 25^1;
595968 = 4^5 + 4^9 + 4^5 + 4^9 + 4^6 + 4^8;
13177388 = 7^1 + 7^3 + 7^1 + 7^7 + 7^7 + 7^3 + 7^8 + 7^8.
		

Crossrefs

Programs

  • Mathematica
    okQ[v_] := Block[{b, d=IntegerDigits@ v, y, t}, t = Last@ Tally@ Sort@d; b = Floor[ (v/t[[2]]) ^ (1/t[[1]])]; While[(y = Total[b^d]) > v, b--]; v==y]; Select[Range[10^5],okQ] (* Giovanni Resta, Jun 01 2015 *)
  • PARI
    for(n=1,10^5,d=digits(n);for(m=1,n,s=sum(i=1,#d,m^d[i]);if(s==n,print1(n,", ");break);if(s>n,break))) \\ Derek Orr, Jun 12 2015
  • Python
    def moda(n,a,m):
        kk = 0
        while n > 0:
            na=int(n%m)
            kk= kk+a**na
            n =int(n//m)
        return kk
    for c in range (1, 10**8):
        for a in range (1,20):
            if  c==moda(c,a,10):
                print (a,c)
    

Extensions

More terms from Giovanni Resta, Jun 01 2015

A302649 Numbers that are the sum of some fixed power of the digits of their ten's complement.

Original entry on oeis.org

5, 8, 14, 3953, 33626, 89843301, 71341793655800, 245916794707565, 19429639306542698, 36106092555634673, 1818632037625982420, 4099389352522800257, 51096092690519702666, 1361788669288181208317, 80939622935362328928524, 3061856409269150191916609
Offset: 1

Views

Author

Paolo P. Lava, Apr 11 2018

Keywords

Comments

No other term up to 3*10^12. - Giovanni Resta, Apr 12 2018

Examples

			(10 - 5) = 5 and 5^1 = 5;
(10 - 8) = 2 and 2^3 = 8;
(100 - 14) = 86 and 8^1 + 6^1 = 14;
(10000 - 3953) = 6047 and 6^4 + 0^4 + 4^4 + 7^4 = 3953;
(100000 - 33626) = 66374 and 6^5 + 6^5 + 3^5 + 7^5 + 4^5 = 33626;
(100000000 - 89843301) = 10156699 and 1^8 + 0^8 + 1^8 + 5^8 + 6^8 + 6^8 + 9^8 + 9^8 = 89843301.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local a,b,i,j,k,n;
    for n from 1 to q do a:=convert(10^(ilog10(n)+1)-n,base,10);
    b:=convert(a,`+`); j:=1; i:=0; while n>b do
    if i=b then break; else i:=b; j:=j+1; b:=add(a[k]^j,k=1..nops(a)); fi; od;
    if n=b then print(n); fi; od; end: P(10^9);

Extensions

a(7)-a(16) from Chai Wah Wu, Jun 06 2018

A192636 Powerful sums of two powerful numbers.

Original entry on oeis.org

8, 9, 16, 25, 32, 36, 64, 72, 81, 100, 108, 121, 125, 128, 144, 169, 196, 200, 216, 225, 243, 256, 288, 289, 324, 343, 361, 392, 400, 432, 441, 484, 500, 512, 576, 625, 648, 675, 676, 729, 784, 800, 841, 864, 900, 961, 968, 972, 1000, 1024, 1089, 1125, 1152, 1156, 1225
Offset: 1

Views

Author

Keywords

Comments

Browning & Valckenborgh conjecture that a(n) ~ kn^2 with k approximately 0.139485255. See their Conjecture 1 and equation (14). Their Theorems 1 and 2 establish upper and lower asymptotic bounds.

Crossrefs

Programs

  • Mathematica
    With[{m = 1225}, pow = Select[Range[m], # == 1 || Min[FactorInteger[#][[;; , 2]]] > 1 &]; Intersection[pow, Plus @@@ Tuples[pow, {2}]]] (* Amiram Eldar, Feb 12 2023 *)
  • PARI
    isPowerful(n)=if(n>3,vecmin(factor(n)[,2])>1,n==1)
    sumset(a,b)={
      my(c=vectorsmall(#a*#b));
      for(i=1,#a,
        for(j=1,#b,
          c[(i-1)*#b+j]=a[i]+b[j]
        )
      );
      vecsort(c,,8)
    }; selfsum(a)={
      my(c=vectorsmall(binomial(#a+1,2)),k);
      for(i=1,#a,
        for(j=i,#a,
          c[k++]=a[i]+a[j]
        )
      );
      vecsort(c,,8)
    };
    list(lim)={
      my(v=select(isPowerful, vector(floor(lim),i,i)));
      select(n->n<=lim && isPowerful(n), Vec(selfsum(v)))
    };

Formula

Numbers k such that there exists some a, b, c with A001694(a) + A001694(b) = k = A001694(c).

Extensions

Corrected (on the advice of Donovan Johnson) by Charles R Greathouse IV, Sep 25 2012

A302651 Numbers that are the product of some fixed power of the digits of their ten's complement.

Original entry on oeis.org

5, 8, 81, 2016, 2205
Offset: 1

Views

Author

Paolo P. Lava, Apr 11 2018

Keywords

Comments

No other terms up to 10^40. - Giovanni Resta Apr 12 2018
No other terms up to 10^51 - Chai Wah Wu, Jun 06 2018

Examples

			(10 - 5) = 5 and 5^1 = 5;
(10 - 8) = 2 and 2^3 = 8;
(100 - 81) = 19 and 1^2 * 9^2 = 81;
(10000 - 2016) = 7984 and 7^1 * 9^1 * 8^1 * 4^1 = 2016;
(10000 - 2205) = 7795 and 7^1 * 7^1 * 9^1 * 5^1 = 2205;
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local a,b,i,j,k,n;
    for n from 1 to q do a:=convert(10^(ilog10(n)+1)-n,base,10);
    b:=convert(a,`*`); j:=1; i:=0; while n>b do
    if i=b then break; else i:=b; j:=j+1; b:=add(a[k]^j,k=1..nops(a)); fi; od;
    if n=b then print(n); fi; od; end: P(10^9);

A307417 Numbers that can be expressed in a base in such a way that the sum of cubes of their digits in this base equals the original number.

Original entry on oeis.org

8, 9, 16, 17, 27, 28, 29, 35, 43, 54, 55, 62, 64, 65, 72, 91, 92, 99, 118, 125, 126, 127, 128, 133, 134, 152, 153, 189, 190, 216, 217, 224, 243, 244, 250, 251, 280, 307, 341, 342, 343, 344, 351, 370, 371, 407, 432, 433, 468, 469, 512, 513, 514, 520, 539, 559
Offset: 1

Views

Author

César Eliud Lozada, Apr 07 2019

Keywords

Comments

There are infinitely many such numbers (proof in the second Johnson link).

Examples

			a(1) = 8 = [2, 0] (base 4) =  2^3 + 0^3
a(2) = 9 = [2, 1] (base 4) =  2^3 + 1^3
a(3) = 16 = [2, 2] (base 7) =  2^3 + 2^3
a(4) = 17 = [1, 2, 2] (base 3) =  1^3 + 2^3 + 2^3
		

Crossrefs

Programs

  • Maple
    sqn:= []; lis:=[];
    for n to 1000 do
      b := 2;
      while b < n do #needs to be adjusted
        q := convert(n, base, b);
        s := convert(map(proc (X) options operator, arrow; X^3 end proc, q), `+`);
        if evalb(s = n) then
          sqn := [op(sqn), n];
          lis := [op(lis), [n, b, ListTools[Reverse](q)]];
          break
        end if;
        b := b+1
      end do
    end do;
    lis := lis; #list of decompositions [number, base, conversion]
    sqn := sqn; #sequence
Previous Showing 21-30 of 32 results. Next