login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
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,...). 11
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
Eric Weisstein's World of Mathematics, Narcissistic Number
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 *)
Join[{0}, Select[Range[10^7], Total[IntegerDigits[#]^Range[ IntegerLength[ #]]] == #&]] (* Harvey P. Dale, Oct 13 2015 *)
sdcpQ[n_]:=n==Inner[Power, IntegerDigits[n], Range[IntegerLength[n]], Plus]; Join[{0}, Select[Range[27*10^5], sdcpQ]] (* Harvey P. Dale, May 30 2020 *)
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: A289979 A228326 A098766 * A208130 A160343 A250265
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 | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 27 02:24 EDT 2024. Contains 372004 sequences. (Running on oeis4.)