login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A032799 Numbers n such that n equals the sum of its digits raised to the consecutive powers (1,2,3,...). 8
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 89, 135, 175, 518, 598, 1306, 1676, 2427, 2646798, 12157692622039623539 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

Lemma: The sequence is finite with all terms in the sequence having at most 22 digits. Proof: Let n be an m-digit natural number in the sequence for some m. Then 10^(m-1)<=n and n<=9+9^2+...9^m = 9(9^m-1)/8<(9^(m+1))/8. Thus 10^(m-1)<(9^(m+1))/8. Taking logarithms of both sides and solving yields m<22.97 QED. Note proof is identical to that for A208130. [Francis J. McDonnell, Apr 14 2012]

REFERENCES

J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 175, p. 55, Ellipses, Paris 2008.

Ken Follett, Code to Zero, Dutton, a Penguin Group, NY 2000, p. 84.

D. Wells, The Penguin Dictionary of Curious and Interesting Numbers, Penguin Books, London, 1986, Entry 175.

LINKS

Table of n, a(n) for n=1..20.

Eric Weisstein's World of Mathematics, Narcissistic Number

FORMULA

Let a(n)=Sum_{x=0,floor(log(n))} (floor(n/10^x)-10*floor(n/10^(x + 1)))^(floor(log10(n) + 1) - x) - n. If a(n)=0, then n is a number of this sequence. - José de Jesús Camacho Medina, Aug 07 2014

EXAMPLE

89 = 8^1 + 9^2.

175 = 1^1 + 7^2 + 5^3.

2427 = 2^1 + 4^2 + 2^3 + 7^4.

2646798 = 2^1 + 6^2 + 4^3 + 6^4 + 7^5 + 9^6 + 8^7.

MAPLE

N:= 10: # to get solutions of up to N digits

Branch:= proc(level, sofar)

  option remember;

  local Res, x, x0, lb, ub, y;

  Res:= NULL;

  if perm[level] = 1 then x0:= 1 else x0:= 0 fi;

  for x from x0 to 9 do

    lb:= sofar + b[x, perm[level]] + scmin[level];

    ub:= sofar + b[x, perm[level]] + scmax[level];

    if lb <= 0 and ub >= 0 then

       if level = n then Res:= Res, [x]

       else

         for y in Branch(level+1, sofar+b[x, perm[level]]) do

            Res:= Res, [x, op(y)]

         od

        fi

     fi

   od;

   [Res]

end:

count:= 0:

for n from 1 to N do

  printf("Looking for %d digit solutions\n", n);

  forget(Branch);

  for j from 1 to n do

    for x from 0 to 9 do

      b[x, j]:= x^j - x*10^(n-j)

    od

  od:

  for j from 1 to n do

    smin[j]:= min(seq(b[x, j], x=0..9));

    smax[j]:= max(seq(b[x, j], x=0..9));

  od:

  perm:= sort([seq(smax[j]-smin[j], j=1..n)], `>`, output=permutation):

  for j from 1 to n do

    scmin[j]:= add(smin[perm[i]], i=j+1..n);

    scmax[j]:= add(smax[perm[i]], i=j+1..n);

  end;

  for X in Branch(1, 0) do

    xx:= add(X[i]*10^(n-perm[i]), i=1..n);

    count:= count+1;

    A[count]:= xx;

    print(xx);

  od

od:

seq(A[i], i=1..count); # Robert Israel, Aug 07 2014

MATHEMATICA

f[n_] := Plus @@ (IntegerDigits[n]^Range[ Floor[ Log[10, n] + 1]]); Select[ Range[10^7], f[ # ] == # &] (* Robert G. Wilson v, May 04 2005 *)

PROG

(PARI) for(n=1, 10^22, d=digits(n); s=sum(i=1, #d, d[i]^i); if(s==n, print1(n, ", "))) \\ Derek Orr, Aug 07 2014

CROSSREFS

Sequence in context: A135480 A228326 A098766 * A208130 A160343 A250265

Adjacent sequences:  A032796 A032797 A032798 * A032800 A032801 A032802

KEYWORD

nonn,base,fini,full,nice

AUTHOR

Patrick De Geest, May 15 1998

EXTENSIONS

Corrected by Macsy Zhang (macsy(AT)21cn.com), Feb 17 2002

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified November 28 22:42 EST 2014. Contains 250440 sequences.