A259313
Numbers m for which there exists a k>=2 such that m equals the average of digitsum(m^p) for p from 1 to k.
Original entry on oeis.org
1, 9, 12, 13, 16, 19, 21, 49, 61, 67, 84, 106, 160, 191, 207, 250, 268, 373, 436, 783, 2321, 3133, 3786, 3805, 4842, 5128, 8167, 13599, 29431, 35308
Offset: 1
Digitsum(9) is 9, digitsum(9^2) is 9. (9+9)/2 = 9. So 9 is in this sequence.
12^1 = 12, 12^2 = 144, 12^3 = 1728 and 12^4 = 20736. Digitsum(12) = 3, digitsum(144) = 9, digitsum(1728) = 18, digitsum(20736) = 18, (3+9+18+18)/4 = 12. So 12 is in this sequence.
-
fQ[n_] := If[ IntegerQ@ Log10@ n, False, Block[{pwr = 2, s = Plus @@ IntegerDigits@ n}, While[s = s + Plus @@ IntegerDigits[n^pwr]; s < n*pwr, pwr++]; If[s == n*pwr, True, False]]]; k = 1; lst = {1}; While[k < 100001, If[fQ@ k, AppendTo[lst, k]]; k++]; lst (* Robert G. Wilson v, Jul 30 2015 *)
-
def sod(n):
kk = 0
while n > 0:
kk= kk+(n%10)
n =int(n//10)
return kk
for c in range (2, 10**3):
bb=0
for a in range(1,200):
bb=bb+sod(c**a)
if bb==c*a:
print (c,a)
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,", ")))
A375343
Numbers which are the sixth powers of their digit sum.
Original entry on oeis.org
0, 1, 34012224, 8303765625, 24794911296, 68719476736
Offset: 1
68719476736 = (6+8+7+1+9+4+7+6+7+3+6)^6 = 64^6.
-
for (k=0, sqrtnint(10^13,6), if (k^6 == sumdigits(k^6)^6, print1(k^6, ", ")); )
A379767
Triangle read by rows: row n lists numbers which are the n-th powers of their digit sum.
Original entry on oeis.org
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 81, 0, 1, 512, 4913, 5832, 17576, 19683, 0, 1, 2401, 234256, 390625, 614656, 1679616, 0, 1, 17210368, 52521875, 60466176, 205962976, 0, 1, 34012224, 8303765625, 24794911296, 68719476736, 0, 1, 612220032, 10460353203, 27512614111, 52523350144, 271818611107, 1174711139837, 2207984167552, 6722988818432
Offset: 1
Triangle begins:
1 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9;
2 | 0, 1, 81;
3 | 0, 1, 512, 4913, 5832, 17576, 19683;
4 | 0, 1, 2401, 234256, 390625, 614656, 1679616;
5 | 0, 1, 17210368, 52521875, 60466176, 205962976;
6 | 0, 1, 34012224, 8303765625, 24794911296, 68719476736;
7 | 0, 1, 612220032, 10460353203, 27512614111, 52523350144, 271818611107, 1174711139837, 2207984167552, 6722988818432;
8 | 0, 1, 20047612231936, 72301961339136, 248155780267521;
9 | 0, 1, 3904305912313344, 45848500718449031, 150094635296999121;
...
-
R(n) = for(j=2,oo, if((j*9)^n <10^j, return(j)));
row(n) = my(L=List()); for (k=0, sqrtnint(10^R(n),n), if (k^n == sumdigits(k^n)^n, listput(L, k^n))); Vec(L)
A085754
Numbers n such that (digital sum of n)^3 = reversal of n. (Powers of 10 excluded.)
Original entry on oeis.org
215, 2150, 2385, 3194, 21500, 23850, 31940, 38691, 67571, 215000, 238500, 319400, 386910, 675710, 2150000, 2385000, 3194000, 3869100, 6757100, 21500000, 23850000, 31940000, 38691000, 67571000, 215000000, 238500000, 319400000
Offset: 1
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
A370250
Numbers k such that the sum of the digits times the square of the sum of the fourth powers of the digits equals k.
Original entry on oeis.org
0, 1, 5873656512, 7253758561, 29961747275
Offset: 1
7253758561 = (7+2+5+3+7+5+8+5+6+1)*(7^4 + 2^4 + 5^4 + 3^4 + 7^4 + 5^4 + 8^4 + 5^4 + 6^4 + 1^4)^2 = 49*148035889 = 7253758561.
-
niven142(k) = my(d=digits(k)); vecsum(d)*sum(i=1, #d, d[i]^4)^2 == k;
for(k=0,10^12,if(niven142(k)==1,print1(k, ", ")))
A385158
Numbers k such that the sum of the digits of k is a number that appears as a substring of k, and every nonzero digit of k appears in that sum.
Original entry on oeis.org
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 199, 200, 300, 400, 500, 600, 700, 800, 900, 919, 1000, 1188, 1818, 1881, 1909, 1990, 2000, 2999, 3000, 4000, 5000, 6000, 7000, 8000, 8118, 8181, 9000, 9019, 9190, 9299, 9929, 10000
Offset: 1
1818 is in the sequence because 1 + 8 + 1 + 8 = 18, and 18 appears within the number. Also, all nonzero digits (1 and 8) are found in the digit sum (18).
Cf.
A052018,
A007953,
A031286 (numbers containing a given substring),
A070939 (numbers equal to the sum of their digits concatenated),
A061209 (numbers containing their digit sum).
-
filter:= proc(k) local L,s,S,nL,nS,i;
L:= convert(k,base,10);
nL:= nops(L);
s:= convert(L,`+`);
S:= convert(s,base,10);
nS:= nops(S);
(convert(L,set) minus {0} = convert(S,set) minus {0}) and member(S, [seq(L[i..i+nS-1],i=1..nL-nS+1)])
end proc:
select(filter, [$1..10000]); # Robert Israel, Jul 23 2025
-
isok[n_] := Module[{digits, sum, sumStr},
digits = IntegerDigits[n];
sum = Total[digits];
sumStr = ToString[sum];
StringContainsQ[ToString[n], sumStr] &&
AllTrue[DeleteCases[digits, 0],
DigitCount[sum, 10, #] > 0 &]
];
Select[Range[9999], isok]
-
def ok(n):
digits = str(n)
digit_sum_str = str(sum(map(int, digits)))
return digit_sum_str in digits and all(d in digit_sum_str for d in set(digits) - {'0'})
print([k for k in range(1, 10001) if ok(k)])
Comments