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!)
A178354 Numbers m such that d(1)^1 + d(2)^2 + ... + d(p)^p = d(1)^p + d(2)^(p-1) +... + d(p)^1, where d(i), i=1..p, are the digits of m. 4
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 22, 33, 44, 55, 66, 77, 88, 99, 100, 101, 110, 111, 120, 121, 130, 131, 140, 141, 150, 151, 160, 161, 170, 171, 180, 181, 190, 191, 202, 212, 222, 232, 242, 252, 262, 272, 282, 292, 303, 313, 323, 333, 343, 353, 363, 373, 383, 393, 404, 414, 424, 434, 444, 454 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A179309 is included in this sequence.
All palindromes are in this sequence. - Harvey P. Dale, Mar 03 2013
LINKS
EXAMPLE
14603 is in the sequence because :
1 + 4^2 + 6^3 + 0^4 + 3^5 = 3 + 0^2 + 6^3 + 4^4 + 1^5 = 476.
MAPLE
with(numtheory):for n from 1 to 50000 do:l:=length(n):n0:=n:s1:=0:s2:=0:for
m from 1 to l do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10):n0:=v :s1:=s1+u^(l-m+1):s2:=s2+u^m:od:
if s1=s2 then printf(`%d, `, n):else fi:od:
MATHEMATICA
drQ[n_]:=Module[{id=IntegerDigits[n], len}, len=Length[id]; Total[ id^Range[ len]] == Total[id^Range[len, 1, -1]]]; Select[Range[500], drQ] (* Harvey P. Dale, Aug 04 2018 *)
PROG
(PARI) isok(m) = my(d=digits(m), p=#d); sum(k=1, p, d[k]^k) == sum(k=1, p, d[k]^(p-k+1)); \\ Michel Marcus, Mar 22 2021
(Python)
def digpow(s): return sum(int(d)**i for i, d in enumerate(s, start=1))
def aupto(limit):
alst = []
for k in range(1, limit+1):
s = str(k)
if digpow(s) == digpow(s[::-1]): alst.append(k)
return alst
print(aupto(454)) # Michael S. Branicky, Mar 23 2021
CROSSREFS
Sequence in context: A023792 A221221 A355224 * A179309 A032946 A273738
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Dec 21 2010
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 24 11:36 EDT 2024. Contains 371936 sequences. (Running on oeis4.)