A130680
Numbers n such that n = (a_1 + a_2 + ... + a_p)*(a_1^3 + a_2^3 + ... + a_p^3), where n has the decimal expansion a_1a_2...a_p.
Original entry on oeis.org
1, 1215, 3700, 11680, 13608, 87949
Offset: 1
87949 = (8+7+9+4+9)*(8^3+7^3+9^3+4^3+9^3).
-
For[n = 1, n < 1000000, n++, b = IntegerDigits[n]; If[Sum[b[[i]], {i, 1, Length[b]}] * Sum[b[[i]]^3, {i, 1, Length[b]}] == n, Print[n]]]
ffQ[n_]:=Module[{c=IntegerDigits[n]},Total[c]Total[c^3]==n]; Select[ Range[ 90000],ffQ] (* Harvey P. Dale, Oct 18 2013 *)
A257784
Numbers n such that the sum of the digits squared times the sum of the digits of n to some power equals n.
Original entry on oeis.org
0, 1, 512, 2511, 4913, 5832, 17576, 19683, 24624, 32144, 37000, 111616, 382360, 415000, 420224, 2219400, 14041600, 16328000, 19300032, 30681423, 39203125, 62025728, 78535423, 186836625, 214292000, 432265248, 1120141312, 3479669440, 18529084125, 25342447725
Offset: 1
For power 2: 24624 = (2+4+6+2+4)^2*(2^2+4^2+6^2+2^2+4^2).
For power 3: 111616 = (1+1+1+6+1+6)^2*(1^3+1^3+1^3+6^3+1^3+6^3).
-
# 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 =int(n//10)
return kk
def sod(n):
kk = 0
while n > 0:
kk= kk+(n%10)
n =int(n//10)
return kk
for a in range (1, 10):
for c in range (1, 10**8):
if c==sod(c)**2*moda(c,a):
print(c, end=",")
A257766
Numbers n such that the sum of the digits of n times the square of the sum of the digits squared of n equals n.
Original entry on oeis.org
1, 2023, 2400, 52215, 615627, 938600, 1648656
Offset: 1
52215 is in the sequence because 52215 = (5+2+2+1+5)*(5^2+2^2+2^2+1^2+5^2)^2.
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.
Original entry on oeis.org
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
Offset: 1
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).
-
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
-
# 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=",")
A366507
Numbers k such that the sum of the digits of k times the square of the sum of the digits cubed of k equals k.
Original entry on oeis.org
1, 4147200, 12743163, 21147075, 39143552, 52921472, 156754936, 205889445, 233935967
Offset: 1
4147200 = (4+1+4+7+2)*(4^3+1+4^3+7^3+2^3)^2 = 18*230400.
-
niven12()={for(a=0,9,for(b=0,9,for(c=0,9,for(d=0,9,for(e=0,9,for(f=0,9,for(g=0,9,for(h=0,9,for(i=0,9,for(j=0,9,if((a+b+c+d+e+f+g+h+i+j)*(a^3+b^3+c^3+d^3+e^3+f^3+g^3+h^3+i^3+j^3)^2==1000000000*a+100000000*b+10000000*c+1000000*d+100000*e+10000*f+1000*g+100*h+10*i+j,print1(1000000000*a+100000000*b+10000000*c+1000000*d+100000*e+10000*f+1000*g+100*h+10*i+j,";"))))))))))))}
-
isok(k) = my(d=digits(k)); vecsum(d)*sum(i=1, #d, d[i]^3)^2 == k; \\ Michel Marcus, Oct 12 2023
A366512
Numbers k such that the square of the sum of the digits times the sum of the cubes of the digits equals k.
Original entry on oeis.org
1, 32144, 37000, 111616, 382360
Offset: 1
32144 = ((3+2+1+4+4)^2)*(3^3 + 2^3 + 1^3 + 4^3 + 4^3) = 196*164.
-
Select[Range[10^6], #1 == Total[#2]^2*Total[#2^3] & @@ {#, IntegerDigits[#]} &] (* Michael De Vlieger, Mar 25 2024 *)
-
niven23()={for(a=0,9,for(b=0,9,for(c=0,9,for(d=0,9,for(e=0,9,for(f=0,9,for(g=0,9,for(h=0,9,if((a+b+c+d+e+f+g+h)^2*(a^3+b^3+c^3+d^3+e^3+f^3+g^3+h^3)==10000000*a+1000000*b+100000*c+10000*d+1000*e+100*f+10*g+h,print1(10000000*a+1000000*b+100000*c+10000*d+1000*e+100*f+10*g+h,", "))))))))))}
-
isok(k) = my(d=digits(k)); vecsum(d)^2*sum(i=1, #d, d[i]^3) == k; \\ Michel Marcus, Oct 12 2023
A257787
Numbers n such that the sum of the digits of n to some power divided by the sum of the digits equal n.
Original entry on oeis.org
1, 2, 3, 4, 5, 6, 7, 8, 9, 37, 48, 415, 231591, 3829377463694454, 56407086228259246207394322684
Offset: 1
37 = (3^3+7^3)/(3+7).
231591 = (2^7+3^7+1^7+5^7+9^7+1^7)/(2+3+1+5+9+1).
-
def moda(n,a):
kk = 0
while n > 0:
kk= kk+(n%10)**a
n =int(n//10)
return kk
def sod(n):
kk = 0
while n > 0:
kk= kk+(n%10)
n =int(n//10)
return kk
for a in range (1, 10):
for c in range (1, 10**6):
if c*sod(c)==moda(c, a):
print (a,c, moda(c,a),sod(c))
A368939
Numbers k such that the sum of the digits times the sum of the fourth powers of the digits equals k.
Original entry on oeis.org
0, 1, 182380, 444992
Offset: 1
182380 = (1+8+2+3+8)*(1^4 + 8^4 + 2^4 + 3^4 + 8^4) = 22*8290.
-
Select[Range[0,10^7],#==Total[IntegerDigits[#]]*Total[IntegerDigits[#]^4]&] (* James C. McMahon, Jan 11 2024 *)
-
niven14(k) = my(d=digits(k)); vecsum(d)*sum(i=1, #d, d[i]^4) == k;
for(k=1,10^7,if(niven14(k)==1,print1(k,", ")))
A257786
Numbers n such that the square root of the sum of the digits times the sum of the digits of n in some power equal n.
Original entry on oeis.org
0, 1, 27, 376, 13131, 234595324075, 54377519037479592374299, 8326623359858152426050700, 1513868951125582592290131113769528
Offset: 1
376 = sqrt(3+7+6)*(3^2+7^2+6^2).
13131 = sqrt(1+3+1+3+1)*(1^7+3^7+1^7+3^7+1^7).
-
def moda(n,a):
kk = 0
while n > 0:
kk= kk+(n%10)**a
n =int(n//10)
return kk
def sod(n):
kk = 0
while n > 0:
k= kk+(n%10)
n =int(n//10)
return kk
for a in range (1, 10):
for c in range (1, 10**8):
if c**2==sod(c)*moda(c,a)**2:
print (a,c, sod(c),moda(c,a))
A257969
Numbers m such that the sum of the digits (sod) of m, m^2, m^3, ..., m^9 are in arithmetic progression: sod(m^(k+1)) - sod(m^k) = f for k=1..8.
Original entry on oeis.org
1, 10, 100, 1000, 7972, 10000, 53941, 79720, 100000, 134242, 539410, 698614, 797200, 1000000, 1342420, 5394100, 6986140, 7525615, 7972000, 9000864, 10000000, 10057054, 13424200, 15366307, 17513566, 20602674, 23280211, 24716905, 25274655, 25665559, 32083981, 34326702, 34446204, 34534816
Offset: 1
7972 is in the sequence, because the difference between the successive sum-of-digit values is 15:
sod(7972) = 25;
sod(7972^2) = 40;
sod(7972^3) = 55;
sod(7972^4) = 70;
sod(7972^5) = 85;
sod(7972^6) = 100;
sod(7972^7) = 115;
sod(7972^8) = 130;
sod(7972^9) = 145;
sod(7972^10) = 178, where the increment is no longer 15.
But there are seven numbers below 10^9 with a longer sequence (namely, 134242, 23280211, 40809168, 46485637, 59716223, 66413917, and 97134912) where sod(m^(k+1)) - sod(m^k) = f for k=1..9.
sod(134242) = 16;
sod(134242^2) = 40;
sod(134242^3) = 64;
sod(134242^4) = 88;
sod(134242^5) = 112;
sod(134242^6) = 136;
sod(134242^7) = 160;
sod(134242^8) = 184;
sod(134242^9) = 208;
sod(134242^10) = 232;
sod(134242^11) = 283, where the increment is no longer 24.
-
fQ[n_] := Block[{g}, g[x_] := Power[x, #] & /@ Range@ 9; Length@ DeleteDuplicates@ Differences[Total[IntegerDigits@ #] & /@ g@ n] == 1]; Select[Range@ 1000000, fQ] (* Michael De Vlieger, Jun 12 2015 *)
Select[Range[35*10^6],Length[Union[Differences[Total/@IntegerDigits[ #^Range[9]]]]] ==1&] (* Harvey P. Dale, Aug 23 2017 *)
-
isok(n) = {my(osod = sumdigits(n^2)); my(f = osod - sumdigits(n)); for (k=3, 9, my(nsod = sumdigits(n^k)); if (nsod - osod != f, return (0)); osod = nsod;); return (1);} \\ Michel Marcus, May 28 2015
Showing 1-10 of 11 results.
Comments