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!)
A257768 Numbers m such that for some power k, m is the sum of d + d^k as d runs through the digits of m. 3
12, 18, 30, 90, 666, 870, 960, 1998, 7816, 42648, 119394, 302034, 360522, 1741752, 12051036, 909341082, 931186956, 1136424308, 1145082306, 8390370196, 49388550660, 52927388760, 100552730520, 41845367362266, 51671446297908, 245917854035004, 607628544623816, 858683110606660, 4023730658941192 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The power k of most terms in this sequence is equal to or one more or one less than the number of digits in the term. One exception is 302034: 302034 = 3^9 + 0^9 + 2^9 + 0^9 + 3^9 + 4^9 + 3+0+2+0+3+4.
LINKS
EXAMPLE
666 = (6+6+6) + (6^3 + 6^3 + 6^3).
7816 = (7+8+1+6) + (7^4 + 8^4 + 1^4 + 6^4).
360522 = (3+6+0+5+2+2) + (3^7 + 6^7 + 0^7 + 5^7 + 2^7 + 2^7).
MAPLE
mmax:= 10: # to get all terms < 10^mmax
Res:= NULL:
score:= (c, p) -> add(c[i+1]*(i+i^p), i=0..9):
for m from 2 to mmax do
comps:= convert(map(`-`, combinat:-composition(10+m, 10), [1$10]), list):
for c in comps do
cL:= [seq(i$c[i+1], i=0..9)];
if max(c[3..-1]) = 0 then slim:= 0 else slim:= 10^m fi;
for p from 1 do
s:= score(c, p);
L:= sort(convert(s, base, 10));
if L = cL then Res:= Res, s; break fi;
if s >= slim then break fi;
od:
od:
od:
sort([Res]); # Robert Israel, May 08 2015
PROG
(Python)
# WARNING: this prints numbers in the sequence, but not in increasing order.
def moda(n, a):
kk = 0
while n > 0:
kk= kk+(n%10)**a
n = n//10
return kk
def sod(n):
kk = 0
while n > 0:
kk += n % 10
n = n//10
return kk
for a in range (1, 10):
for c in range (10, 10**6):
if c == moda(c, a)+sod(c):
print(c, end=", ")
CROSSREFS
Sequence in context: A075281 A171179 A333869 * A007371 A277725 A319746
KEYWORD
base,nonn
AUTHOR
Pieter Post, May 07 2015
EXTENSIONS
a(14)-a(29) from Giovanni Resta, May 08 2015
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 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)