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

A007532 Handsome numbers: sum of positive powers of its digits; a(n) = Sum_{i=1..k} d[i]^e[i] where d[1..k] are the decimal digits of a(n), e[i] > 0.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 24, 43, 63, 89, 132, 135, 153, 175, 209, 224, 226, 262, 264, 267, 283, 332, 333, 334, 357, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 407, 445, 463, 518, 598, 629, 739, 794, 849, 935, 994, 1034
Offset: 1

Views

Author

Keywords

Comments

The previous name was "Powerful numbers, Definition (2). Cf. A001694, A023052. - N. J. A. Sloane, Jan 16 2022
J. Randle has suggested the name "powerful numbers" for the perfect digital invariants A023052, equal to the sum of a fixed power of the digits. However, "powerful" usually refers to a prime factorization related property, cf. A001694 (and references there as well as on the MathWorld page). C. Rivera has suggested the name "handsome" for these numbers (in view of narcissistic numbers A005188) in his prime puzzle #15: see also contributed comments concerning terminology on that page. - M. F. Hasler, Nov 21 2019

Examples

			43 = 4^2 + 3^3 is OK; 254 = 2^7 + 5^3 + 4^0 is not OK since one of the powers is 0.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Different from A061862.

Programs

  • Haskell
    a007532 n = a007532_list !! (n-1)
    a007532_list = filter f [1..] 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 d
                 where h p = p <= x && (g u' (v + p) || h (p * d))
                       (u', d) = divMod u 10
    -- Reinhard Zumkeller, Jun 02 2013
    
  • Maple
    N:= 10000; # to get all entries <= N
    Sums:= proc(L,N)
      option remember;
      local x1,L1;
      x1:= L[1];
      if x1 = 1 then L1:= {1}
      else L1:= {seq(x1^j,j=1..floor(log[x1](N)))};
      fi;
      if nops(L) = 1 then L1
      else select(`<=`,{seq(seq(a+b,a=L1),b=Sums(L[2..-1],N))},N)
      fi
    end proc;
    filter:= proc(x,N)
       local L;
       L:= sort(subs(0=NULL,convert(x,base,10))) ;
       member(x, Sums(L,N));
    end proc;
    A007532:= select(filter,[$1..N],N); # Robert Israel, Apr 13 2014
  • Mathematica
    Select[Range@1000,(s=#;MemberQ[Total/@(a^#&/@Tuples[Range@If[#==1||#==0,1,Floor[Log[#,s]]]&/@(a=IntegerDigits[s])]),s])&] (* Giorgos Kalogeropoulos, Aug 18 2021 *)
  • Python
    from itertools import count, takewhile
    def cands(n, d):
        return takewhile(lambda x: x<=n, (d**i for i in count(1)))
    def handsome(s, t):
        if s == "":
            return t == 0
        if s[0] in "01":
            return handsome(s[1:], t - int(s[0]))
        return any(handsome(s[1:], t - p) for p in cands(t, int(s[0])))
    def ok(n):
        return n and handsome(str(n), n)
    print(list(filter(ok, range(1035)))) # Michael S. Branicky, Aug 18 2021

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.

A050240 Handsome numbers (A007532) representable as a sum of any positive powers of their digits in two distinct ways, not counting different powers of duplicated digits as distinct.

Original entry on oeis.org

264, 373, 375, 2132, 2223, 2241, 2243, 2245, 2263, 2336, 2352, 2356, 2372, 2376, 2427, 2536, 2664, 2733, 2843, 2932, 3257, 3292, 3324, 3342, 3435, 3437, 3457, 3477, 3945, 4132, 4154, 4194, 4225, 4241, 4249, 4262, 4265, 4332, 4352, 4353
Offset: 1

Views

Author

Keywords

Examples

			From _R. J. Mathar_, Aug 18 2021: (Start)
264 = 2^1 + 6^1 + 4^4 = 2^5 + 6^3 + 4^2.
2536 = 2^3 + 5^3 + 3^7 + 6^3 = 2^7 + 5^1 + 3^7 + 6^3.
4262 = 4^6 + 2^1 + 6^2 + 2^7 = 4^6 + 2^5 + 6^1 + 2^7 (not regarded distinct = 4^6 + 2^7 + 6^1 + 2^5 = 4^6 + 2^7 + 6^2 + 2^1). (End)
		

Crossrefs

Extensions

Edited by Joerg Arndt and M. F. Hasler, Aug 11 2021

A173518 Solutions z of the Diophantine equation x^3 + y^3 = 6z^3.

Original entry on oeis.org

21, 960540, 16418498901144294337512360, 436066841882071117095002459324085167366543342937477344818646196279385305441506861017701946929489111120
Offset: 1

Views

Author

Michel Lagneau, Feb 20 2010

Keywords

Comments

A. Nitaj proved Erdős's conjecture (1975) and claimed that there exist infinitely many triples of 3-powerful numbers a,b,c with (a,b) = 1, such that a+b=c, because the equation x^3 + y^3 = 6z^3 admits an infinite number of solutions, and given by the recurrence equations (see formula). It is proved that a=x(k)^3, b=y(k)^3, and c=6c^3, and are 3-powerful numbers for each k >= 1.

Examples

			37^3 + 17^3 = 6*21^3.
		

References

  • J. M. De Koninck, Ces nombres qui nous fascinent, Ellipses, 2008, p. 348.
  • Mordell, L. J. (1969). Diophantine equations. Academic Press. ISBN 0-12-506250-8

Crossrefs

Programs

  • Maple
    x0:=37:y0:=17:z0:=21: for p from 1 to 5 do: x1:=x0*(x0^3+ 2*y0^3):y1:=-y0*(2*x0^3+ y0^3):z1:=z0*(x0^3- y0^3): print(z1) : x0 :=x1 :y0 :=y1 :z0 :=z1 :od :

Formula

We generate the solutions (x(k),y(k),z(k)) from the initial solution x(0) = 37, y(0)=17, z(0)=21 x(k+1) = x(k)*(x(k)^3 + 2*y(k)^3) y(k+1) = -y(k)*(2*x(k)^3 + y(k)^3) z(k+1) = z(k)*(x(k)^3 - y(k)^3).
Showing 1-3 of 3 results.