Displaying 31-40 of 54 results found.
Numbers n such that the sum of digits of 3n equals 6.
+10
8
2, 5, 8, 11, 14, 17, 20, 35, 38, 41, 44, 47, 50, 68, 71, 74, 77, 80, 101, 104, 107, 110, 134, 137, 140, 167, 170, 200, 335, 338, 341, 344, 347, 350, 368, 371, 374, 377, 380, 401, 404, 407, 410, 434, 437, 440, 467, 470, 500, 668, 671, 674, 677, 680, 701
MATHEMATICA
Select[Range@ 720, Total@ IntegerDigits[3 #] == 6 &] (* Michael De Vlieger, Dec 23 2016 *)
PROG
(PARI) select( is(n)=sumdigits(3*n)==6, [1..999])
CROSSREFS
Cf. A005349 (Niven or Harshad numbers), A245062 (arranged in rows by digit sums).
Numbers with given digital sum: A011557 (1), A052216 (2), A052217 (3), A052218 (4), A052219 (5), A052220 (6), A052221 (7), A052222 (8), A052223 (9), A052224 (10), A166311 (11), A235151 (12), A143164 (13), A235225 (14), A235226 (15), A235227 (16), A166370 (17), A235228 (18), A166459 (19), A235229 (20).
Numbers n such that the sum of digits of 4n equals 8.
+10
8
2, 11, 20, 29, 38, 56, 65, 83, 101, 110, 128, 155, 200, 254, 263, 281, 290, 308, 326, 335, 353, 380, 425, 506, 515, 533, 551, 560, 578, 605, 650, 758, 776, 785, 803, 830, 875, 1001, 1010, 1028, 1055, 1100, 1253, 1280, 1325, 1505, 1550, 1775
MATHEMATICA
Select[Range@ 2000, Total@ IntegerDigits[4 #] == 8 &] (* Michael De Vlieger, Dec 23 2016 *)
PROG
(PARI) select( is(n)=sumdigits(4*n)==8, [1..1999])
CROSSREFS
Cf. A005349 (Niven or Harshad numbers), A245062 (arranged in rows by digit sums).
Numbers with given digital sum: A011557 (1), A052216 (2), A052217 (3), A052218 (4), A052219 (5), A052220 (6), A052221 (7), A052222 (8), A052223 (9), A052224 (10), A166311 (11), A235151 (12), A143164 (13), A235225 (14), A235226 (15), A235227 (16), A166370 (17), A235228 (18), A166459 (19), A235229 (20).
Numbers n such that the sum of digits of 6n equals 12.
+10
8
8, 11, 14, 23, 26, 29, 32, 38, 41, 44, 47, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80, 86, 89, 92, 95, 101, 104, 107, 110, 119, 122, 125, 134, 137, 140, 152, 155, 173, 176, 179, 182, 188, 191, 194, 197, 203, 206, 209, 212, 215, 218, 221, 224, 227, 230, 236
MATHEMATICA
Select[Range@ 240, Total@ IntegerDigits[6 #] == 12 &] (* Michael De Vlieger, Dec 23 2016 *)
PROG
(PARI) is(n)=sumdigits(6*n)==12
CROSSREFS
Cf. A005349 (Niven or Harshad numbers), A245062 (arranged in rows by digit sums).
Numbers with given digital sum: A011557 (1), A052216 (2), A052217 (3), A052218 (4), A052219 (5), A052220 (6), A052221 (7), A052222 (8), A052223 (9), A052224 (10), A166311 (11), A235151 (12), A143164 (13), A235225 (14), A235226 (15), A235227 (16), A166370 (17), A235228 (18), A166459 (19), A235229 (20).
2, 6, 10, 26, 30, 50, 126, 130, 150, 250, 626, 630, 650, 750, 1250, 3126, 3130, 3150, 3250, 3750, 6250, 15626, 15630, 15650, 15750, 16250, 18750, 31250, 78126, 78130, 78150, 78250, 78750, 81250, 93750, 156250, 390626, 390630, 390650, 390750, 391250, 393750
FORMULA
a(n) = 5^(n-trinv(n))+5^trinv(n), where trinv(n) = floor((1+sqrt(1+8*n))/2) = A002262(n) and n-trinv(n) = A003056(n).
Regarded as a triangle T(n, k) = 5^n + 5^k, so as a sequence a(n) = 5^ A002262(n) + 5^ A003056(n).
MATHEMATICA
t = 5^Range[0, 9]; Select[Union[Flatten[Table[i + j, {i, t}, {j, t}]]], # <= t[[-1]] + 1 &] (* T. D. Noe, Oct 09 2011 *)
Total/@Tuples[5^Range[0, 9], 2]//Union (* Harvey P. Dale, Jan 29 2017 *)
2, 8, 14, 50, 56, 98, 344, 350, 392, 686, 2402, 2408, 2450, 2744, 4802, 16808, 16814, 16856, 17150, 19208, 33614, 117650, 117656, 117698, 117992, 120050, 134456, 235298, 823544, 823550, 823592, 823886, 825944, 840350, 941192, 1647086, 5764802, 5764808
FORMULA
a(n) = 7^(n-trinv(n))+7^trinv(n), where trinv(n) = floor((1+sqrt(1+8*n))/2) = A002262(n) and n-trinv(n) = A003056(n)
Regarded as a triangle T(n, k) = 7^n + 7^k, so as a sequence a(n) = 7^ A002262(n) + 7^ A003056(n).
MATHEMATICA
t = 7^Range[0, 9]; Select[Union[Flatten[Table[i + j, {i, t}, {j, t}]]], # <= t[[-1]] + 1 &] (* T. D. Noe, Oct 09 2011 *)
Total/@Tuples[7^Range[0, 10], 2]//Union (* Harvey P. Dale, Dec 31 2017 *)
2, 5, 8, 17, 20, 32, 65, 68, 80, 128, 257, 260, 272, 320, 512, 1025, 1028, 1040, 1088, 1280, 2048, 4097, 4100, 4112, 4160, 4352, 5120, 8192, 16385, 16388, 16400, 16448, 16640, 17408, 20480, 32768, 65537, 65540, 65552, 65600, 65792, 66560, 69632, 81920, 131072
FORMULA
a(n) = 4^(n-trinv(n))+4^trinv(n), where trinv(n) = floor((1+sqrt(1+8*n))/2) = A002262(n) and n-trinv(n) = A003056(n).
Regarded as a triangle T(n, k) = 4^n + 4^k, so as a sequence a(n) = 4^ A002262(n) + 4^ A003056(n).
MATHEMATICA
t = 4^Range[0, 9]; Select[Union[Flatten[Table[i + j, {i, t}, {j, t}]]], # <= t[[-1]] + 1 &] (* T. D. Noe, Oct 09 2011 *)
Union[Total/@Tuples[4^Range[0, 9], 2]] (* Harvey P. Dale, Mar 25 2012 *)
2, 7, 12, 37, 42, 72, 217, 222, 252, 432, 1297, 1302, 1332, 1512, 2592, 7777, 7782, 7812, 7992, 9072, 15552, 46657, 46662, 46692, 46872, 47952, 54432, 93312, 279937, 279942, 279972, 280152, 281232, 287712, 326592, 559872, 1679617, 1679622, 1679652, 1679832
FORMULA
a(n) = 6^(n-trinv(n))+6^trinv(n), where trinv(n) = floor((1+sqrt(1+8*n))/2) = A002262(n) and n-trinv(n) = A003056(n)
Regarded as a triangle T(n, k) = 6^n + 6^k, so as a sequence a(n) = 6^ A002262(n) + 6^ A003056(n).
MATHEMATICA
t = 6^Range[0, 9]; Select[Union[Flatten[Table[i + j, {i, t}, {j, t}]]], # <= t[[-1]] + 1 &] (* T. D. Noe, Oct 09 2011 *)
2, 9, 16, 65, 72, 128, 513, 520, 576, 1024, 4097, 4104, 4160, 4608, 8192, 32769, 32776, 32832, 33280, 36864, 65536, 262145, 262152, 262208, 262656, 266240, 294912, 524288, 2097153, 2097160, 2097216, 2097664, 2101248, 2129920, 2359296, 4194304, 16777217
FORMULA
a(n) = 8^(n-trinv(n))+8^trinv(n), where trinv(n) = floor((1+sqrt(1+8*n))/2) = A002262(n) and n-trinv(n) = A003056(n)
Regarded as a triangle T(n, k) = 8^n + 8^k, so as a sequence a(n) = 8^ A002262(n) + 8^ A003056(n).
MATHEMATICA
Union[Total/@Tuples[8^Range[0, 10], {2}]] (* Harvey P. Dale, Mar 13 2011 *)
PROG
(Python)
def valuation(n, b):
v = 0
while n > 1: n //= b; v += 1
return v
def aupto(lim):
pows8 = [8**i for i in range(valuation(lim-1, 8) + 1)]
sum_pows8 = sorted([a+b for i, a in enumerate(pows8) for b in pows8[i:]])
return [s for s in sum_pows8 if s <= lim]
2, 10, 18, 82, 90, 162, 730, 738, 810, 1458, 6562, 6570, 6642, 7290, 13122, 59050, 59058, 59130, 59778, 65610, 118098, 531442, 531450, 531522, 532170, 538002, 590490, 1062882, 4782970, 4782978, 4783050, 4783698, 4789530, 4842018, 5314410, 9565938, 43046722
FORMULA
a(n) = 9^(n-trinv(n))+9^trinv(n), where trinv(n) = floor((1+sqrt(1+8*n))/2) = A002262(n) and n-trinv(n) = A003056(n)
Regarded as a triangle T(n, k) = 9^n + 9^k, so as a sequence a(n) = 9^ A002262(n) + 9^ A003056(n).
MATHEMATICA
t = 9^Range[0, 9]; Select[Union[Flatten[Table[i + j, {i, t}, {j, t}]]], # <= t[[-1]] + 1 &] (* T. D. Noe, Oct 09 2011 *)
Total/@Tuples[9^Range[0, 10], 2]//Union (* Harvey P. Dale, Jul 03 2019 *)
PROG
(Python)
def valuation(n, b):
v = 0
while n > 1: n //= b; v += 1
return v
def aupto(lim):
pows = [9**i for i in range(valuation(lim-1, 9) + 1)]
sum_pows = sorted([a+b for i, a in enumerate(pows) for b in pows[i:]])
return [s for s in sum_pows if s <= lim]
Sums of two powers of 16.
+10
5
2, 17, 32, 257, 272, 512, 4097, 4112, 4352, 8192, 65537, 65552, 65792, 69632, 131072, 1048577, 1048592, 1048832, 1052672, 1114112, 2097152, 16777217, 16777232, 16777472, 16781312, 16842752, 17825792, 33554432, 268435457
FORMULA
a(n) = 16^(n-trinv(n))+16^trinv(n), where trinv(n) = floor((1+sqrt(1+8*n))/2) = A002262(n) and n-trinv(n) = A003056(n).
Regarded as a triangle T(n, k)=16^n+16^k, so as a sequence a(n) =16^ A002262(n)+16^ A003056(n).
MAPLE
local p1, p2;
p1:= floor((sqrt(8*n-7)-1)/2);
p2:= n - 1 - p1*(p1+1)/2;
16^p1 + 16^p2
Search completed in 0.035 seconds
|