找回密码
 欢迎注册
楼主: 王守恩

[原创] 数字串的通项公式

 火... [复制链接]
 楼主| 发表于 2024-10-13 19:10:43 | 显示全部楼层
求助!

{1120, 1280, 1360, 1520, 2000, 3440, 3760, 5840, 6480, 7440, 8560, 8880, 9840, 10640,
11760, 12720, 14160, 19920, 23280, 23520, 31584, 88032, 102480, 112560, 183120, 285600, ...
  1. Union@Flatten@Table[n/. FindInstance[{y^2 == x^2 + z^2 - x z, v^2 == (x + a y/b)^2 + (c y/d + z)^2 - (x + a y/b) (c y/d + z),
  2. x + a(y + z)/b == a x/b + y + c z/d == c(x + y)/d + z == n, y + z > x > y > z > 0}, {n, x, y, z, v}, Integers], {a, 9}, {b, 9}, {c, 9}, {d, 9}]
复制代码

{1120, 1280, 1360, 1520, 1600, 1760, 1840, 2000, 2480, 3440, 3760, 5840, 6480, 7440, 7680, 7920, 8560, 8880, 9840, 10640,
11760, 12720, 14160, 19920, 20400, 23280, 23520, 31584, 34320, 36960, 47712, 49056, 81312, 88032, 102480, 112560, 137760,
155760, 183120, 199920, 203280, 242880, 285600, 310800, 324240, 325920, 504240, 567840, 678480, 1212750, 1280160, 2391840, ...
  1. Union@Flatten@Table[n/. FindInstance[{y^2 == x^2 + z^2 - x z, v^2 == (x + a y/b)^2 + (c y/d + z)^2 - (x + a y/b) (c y/d + z),
  2. x + a(y + z)/b == a x/b + y + c z/d == c(x + y)/d + z == n, y + z > x > y > z > 0}, {n, x, y, z, v}, Integers], {a, 12}, {b, 12}, {c, 12}, {d, 12}]
复制代码

{1120, 1280, 1360, 1520, 1600, 1760, 1840, 2000, 2080, 2240, 2320, 2480, 2560, 2720, 2960, 3440, 3760, 5840, 6160, 6480, 7120, 7440, 7680, 7920, 8560, 8880,
9120, 9840, 10640, 11760, 12720, 13360, 14160, 16080, 16880, 18480, 19920, 20400, 22800, 23280, 23520, 30960, 31584, 34320, 35616, 36960, 37680, 47712, 47760,
49056, 53088, 73248, 80880, 81312, 88032, 102480, 112560, 127680, 137760, 155760, 163680, 174720, 183120, 199920, 203280, 204960, 240240, 242880, 250320, 285600, ...
  1. Union@Flatten@Table[n/. FindInstance[{y^2 == x^2 + z^2 - x z, v^2 == (x + a y/b)^2 + (c y/d + z)^2 - (x + a y/b) (c y/d + z),
  2. x + a(y + z)/b == a x/b + y + c z/d == c(x + y)/d + z == n, y + z > x > y > z > 0}, {n, x, y, z, v}, Integers], {a, 15}, {b, 15}, {c, 15}, {d, 15}]
复制代码

{1120, 1280, 1360, 1520, 1600, 1760, 1840, 2000, 2080, 2240, 2320, 2480, 2560, 2720, 2800, 2960, 3040, 3200, 3280, 3440, 3600, 3760, 3920, 5520, 5840, 6000, 6160, 6240, 6480, 6720, 6960, 7120, 7440,
7680, 7920, 8560, 8880, 9120, 9840, 10640, 11760, 11920, 12000, 12720, 13360, 14160, 15440, 16080, 16880, 18160, 18480, 18960, 19920, 20240, 20400, 22800, 23280, 23520, 23760, 29040, 30960, 31440, 31584,
34320, 35616, 36960, 37680, 41040, 45360, 47712, 47760, 48720, 49056, 52080, 53088, 61152, 71904, 73248, 80880, 81312, 88032, 91920, 101472, 102480, 112560, 127680, 137760, 149520, 151200, 155760, 163680,
174720, 183120, 187440, 187488, 199920, 200928, 203280, 204960, 240240, 242880, 250320, 267120, 285600, 287760, 300720, 304080, 310800, 311520, 324240, 325920, 354480, 381360, 433290, 465360, 480480, 504240,
522480, 527520, 567840, 581280, 596310, 628320, 647920, 678480, 682080, 702240, 843360, 850080, 866320, 889680, 1033890, 1063920, 1106560, 1125600, 1212750, 1280160, 1337490, 1390480, 1437150, 1573110, 1739430,
  1. Union@Flatten@Table[n/. FindInstance[{y^2 == x^2 + z^2 - x z, v^2 == (x + a y/b)^2 + (c y/d + z)^2 - (x + a y/b) (c y/d + z),
  2. x + a(y + z)/b == a x/b + y + c z/d == c(x + y)/d + z == n, y + z > x > y > z > 0}, {n, x, y, z, v}, Integers], {a, 18}, {b, 18}, {c, 18}, {d, 18}]
复制代码
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2024-10-17 11:44:58 | 显示全部楼层
这方程怎么编排?答案出来快一些?
  1. Flatten@Table[Solve[{y^2 == x^2 + z^2 - x z, n == x + (y + z) ((n - x)/(y + z)), v^2 == ((n y + x z)^2 (x^2 + y^2 + x (y - z) + y z + z^2))/((x + y)^2 (y + z)^2),
  2. (w (n - x) y)/(v (n y + x z)) == (w^2 + (y ((n - x)/(y + z)))^2 - x^2)/(v^2 + (x + y ((n - x)/(y + z)))^2 - ( y ((n - z)/(x + y)) + z)^2),
  3. ((v - w) y (n - z))/(v (n y + x z)) == ((v - w)^2 + (y ((n - z)/(y + x)))^2 - z^2)/(v^2 + (y ((n - z)/(x + y)) + z)^2 - ( x + y ((n - x)/(y + z)))^2),
  4. n > 0, v > 0, w > 0}, {n, v, w}, Integers], {z, 2000, 2999}, {y, z + 1, Sqrt[3] z}, {x, y + 1, 2 z}]
复制代码

譬如。详见《[原创] 折“正三角形”纸片 》——13楼。
  1. Table[Solve[{y^2 == x^2 + z^2 - x z, n == x + (y + z) ((n - x)/(y + z)), v^2 == ((n y + x z)^2 (x^2 + y^2 + x (y - z) + y z + z^2))/((x + y)^2 (y + z)^2),
  2. (w (n - x) y)/(v (n y + x z)) == (w^2 + (y ((n - x)/(y + z)))^2 - x^2)/(v^2 + (x + y ((n - x)/(y + z)))^2 - ( y ((n - z)/(x + y)) + z)^2),
  3. ((v - w) y (n - z))/(v (n y + x z)) == ((v - w)^2 + (y ((n - z)/(y + x)))^2 - z^2)/(v^2 + (y ((n - z)/(x + y)) + z)^2 - ( x + y ((n - x)/(y + z)))^2),
  4. n > 0, v > 0, w > 0}, {n, v, w}, Integers], {z, 30104151, 30104151}, {y, 47045881, 47045881}, {x, 54213536, 54213536}]
复制代码

{{{{{n -> 96864768, v -> 72581938, w -> 68582514}}}}}这答案是最小了吗?
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2024-10-19 07:43:32 | 显示全部楼层
对于集合{1, 2, 3, ..., n}, 有多少种子集, 能满足其中所有元素的和能被a整除。

a=1,  {2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864},
a=2,  {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432},
a=3,  {1, 2, 4, 6, 12, 24, 44, 88, 176, 344, 688, 1376, 2736, 5472, 10944, 21856, 43712, 87424, 174784, 349568, 699136, 1398144, 2796288, 5592576, 11184896, 22369792},
a=4,  {1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216},
a=5,  {1, 1, 2, 4, 8, 14, 26, 52, 104, 208, 412, 820, 1640, 3280, 6560, 13112, 26216, 52432, 104864, 209728, 419440, 838864, 1677728, 3355456, 6710912, 13421792},
a=6,  {1, 1, 2, 3, 6, 12, 22, 44, 88, 172, 344, 688, 1368, 2736, 5472, 10928, 21856, 43712, 87392, 174784, 349568, 699072, 1398144, 2796288, 5592448, 11184896},
a=7,  {1, 1, 1, 3, 5, 10, 20, 38, 74, 146, 294, 586, 1172, 2344, 4684, 9364, 18724, 37452, 74900, 149800, 299600, 599192, 1198376, 2396744, 4793496, 9586984},
a=8,  {1, 1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608},
a=9,  {1, 1, 1, 2, 4, 8, 15, 30, 60, 116, 230, 458, 912, 1824, 3648, 7286, 14572, 29144, 58264, 116524, 233044, 466048, 932096, 1864192, 3728300, 7456600},
a=10,{1, 1, 1, 2, 4, 7, 13, 26, 52, 104, 206, 410, 820, 1640, 3280, 6556, 13108, 26216, 52432, 104864, 209720, 419432, 838864, 1677728, 3355456, 6710896},
a=11,{1, 1, 1, 1, 3, 6, 12, 24, 47, 94, 188, 374, 746, 1490, 2978, 5958, 11916, 23832, 47664, 95326, 190652, 381304, 762604, 1525204, 3050404, 6100804},
a=12,{1, 1, 1, 1, 3, 6, 11, 22, 44, 86, 172, 344, 684, 1368, 2736, 5464, 10928, 21856, 43696, 87392, 174784, 349536, 699072, 1398144, 2796224, 5592448},
a=13,{1, 1, 1, 1, 2, 5, 10, 20, 39, 79, 158, 316, 632, 1262, 2522, 5042, 10082, 20164, 40330, 80660, 161320, 322638, 645278, 1290556, 2581112, 5162224},
  1. Table[Count[Subsets[Range[n]], _?(Divisible[Total[#], a] &)], {a, 13}, {n, 26}]
复制代码
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2024-10-21 08:50:29 | 显示全部楼层
接楼上。

对于集合{0, 1, 2, 3, ..., n}, 有多少种子集, 能满足其中所有元素的和能被9整除。

1, 1, 1, 1, 2, 4, 8, 15, 30, 60, 116, 230, 458, 912, 1824, 3648, 7286, 14572, 29144, 58264, 116524, 233044, 466048, 932096, 1864192, 3728300, 7456600, 14913200, 29826224, 59652440, 119304872, 238609408, 477218816, 954437632, ...,

用楼上的公式给不出33个。

OEIS——A068030——给出了3321个——佩服点赞!
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2024-10-22 16:15:57 | 显示全部楼层
OEIS——A068030——给出了3321个——佩服点赞!
58394654153604632263199801266558038027784551734091191988732887341129715290454988363642988441459641241927467680759233692800855353376830663420504805672523873100194358316
44919566685170937124448191412429775601306330601483813877586022514928454439541325500555570103630400214276784935847900420667644835426868924691605841333647938562783906324
82025310457323179171393424909606743975498305026090221373215020638932522162158622443499494928518763798454761356868209462352329262094719665464094986896561683268721746103
07752969469717799333583655385194200383177318442786634743973251670193883444161580780504136570108734932485888012618187794153039710510120518016730415584134721223320480707
13231036275655243364220510422054845775500833100580220860893649004615673270951321547586910376281434791417611686271158059069427593006352031094696240225738699183571788116
98462375536686631510642540726840336351822851890305756347438172524993007189519137972076665801184450108699755503537594803201001286955487211418963129435948261593579520.
  1. CoefficientList[Series[(1 - x - x^2 - 3 x^3 + 2 x^4 + 2 x^5 + 2 x^6 - x^7 - 2 x^9 + 4 x^12)/((1 - 2 x) (1 - 2 x^3) (1 - 2 x^9)), {x, 0, 7788}], x]
复制代码

293334889662272071698952536351588796262966924355107577436180852487658897420887939820416419815154075372969333669744807445726636091823105159332111793819062726090709778183
356372428080397618710255457109547405723683392028597294863002736363200228585591764639976515751187994877288205382576542478333017256817057477427612833896319751882845548632
488252649522407302065245310239513593875378795708176820441035544194989887981064013115419177686101095789124234154523105270043925356370461762166836488109028531389253066561
657804596559225243918777662196542636480678408218887937279384419867002250796599145956661568390483847081961537121947368248944724027149480719239106683568176270345450169623
436847995751367376154490057524044409851521636074874533763244661396098133012526619568436432444987476770012591662628908445603049187242808444636862031799379770968226715290
488465443525939035843329109632586422639889219695765684078766715917659186985990944983306860455437657449293741207745468541289070913282485879964681683693270429902998223446
181504240058076577849958296707409852169223655337029370379863593511705378459323490673030806561270262988489496980508935812178769063420310342526204989351334899260806209197
255378274403662783093466360306948751295434483544666173996983534638690814460752316171644653134471485756902620813861864277903104275274479065098247027726947377716967493388
781199572842449774720496370081791161646539826322539144830113956803602839243080567019423580274762959874844016892072017263928190538322404212887086445841595978756905909179
471152403899168588011391227427949986501426707193366721140618222159865373281047704805553902058475974050707567770408559526727150074057144839016250471441316962142340121608
431588346196255325450980554390186561050462148879745338393959988995493178228416782157594722117203192046047796758608644034069886341291750844528938150381153973194643656255
369212631362430257183128955153126603520275991837312129646451669301642170732421073741739191421848572562286034937021559539671419707389782438822375629837291239700506767008
604064997515732706351076255302204004553482622799998151961502590560239642081520763527763646734679418138737622598105094027704834656845063545729136421214534144579187215176
1970557556426519263776996767250531759211765048921370580713277701958529462567961025794011553928071181520922909260263613363507385878892774550728435102800253288448.

毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2024-10-26 17:56:56 | 显示全部楼层
n种有序元素应有n!个不同排列, 若所有元素都不在原来位置上, 是这样一串数:

0, 1, 2, 9, 44, 265, 1854, 14833, 133496, 1334961, 14684570, 176214841, 2290792932, 32071101049, 481066515734, 7697064251745, 130850092279664, 2355301661033953, 44750731559645106,
  1. Table[Round[n!/E], {n, 20}]
复制代码

若每种元素有相同(无区别)的2个, 则所有元素都不在原来位置上, 是怎样的一串数?
a(1)=0,
a(2)=1,
2211,
a(3)=3,
223311,
231312,——不同元素在相同位置,只算1次。
331122,
a(4)=33,
22114433,-
22134413
22141433,
22334411,-
22341413,
22441133,-
23114423,
23134412,
23141423,
23142413,
23341412,
23342411,
23441123,
23441213,
33114422,-
33141422,
33441122,-
33441212,
33442211,-
34112423,
34131422,
34132412,
34141223,
34142213,
34341122,
34341212,
34342211,
44112233,-
44131223,
44132213,
44331122,-
44331212,
44332211,-
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2024-10-29 16:08:40 | 显示全部楼层
  1. Table[ContinuedFraction[Power[E, (a)^-1], 50], {a, 2, 10}]
复制代码

{1, 1, 1, 1, 05, 1, 1, 09, 1, 1, 13, 1, 1, 17, 1, 1, 021, 1, 1, 025, 1, 1, 029, 1, 1, 033, 1, 1, 037, 1, 1, 041, 1, 1, 045, 1, 1, 049, 1, 1, 053, 1, 1, 057, 1, 1, 061, 1, 1, 065},
{1, 2, 1, 1, 08, 1, 1, 14, 1, 1, 20, 1, 1, 26, 1, 1, 032, 1, 1, 038, 1, 1, 044, 1, 1, 050, 1, 1, 056, 1, 1, 062, 1, 1, 068, 1, 1, 074, 1, 1, 080, 1, 1, 086, 1, 1, 092, 1, 1, 098},
{1, 3, 1, 1, 11, 1, 1, 19, 1, 1, 27, 1, 1, 35, 1, 1, 043, 1, 1, 051, 1, 1, 059, 1, 1, 067, 1, 1, 075, 1, 1, 083, 1, 1, 091, 1, 1, 099, 1, 1, 107, 1, 1, 115, 1, 1, 123, 1, 1, 131},
{1, 4, 1, 1, 14, 1, 1, 24, 1, 1, 34, 1, 1, 44, 1, 1, 054, 1, 1, 064, 1, 1, 074, 1, 1, 084, 1, 1, 094, 1, 1, 104, 1, 1, 114, 1, 1, 124, 1, 1, 134, 1, 1, 144, 1, 1, 154, 1, 1, 164},
{1, 5, 1, 1, 17, 1, 1, 29, 1, 1, 41, 1, 1, 53, 1, 1, 065, 1, 1, 077, 1, 1, 089, 1, 1, 101, 1, 1, 113, 1, 1, 125, 1, 1, 137, 1, 1, 149, 1, 1, 161, 1, 1, 173, 1, 1, 185, 1, 1, 197},
{1, 6, 1, 1, 20, 1, 1, 34, 1, 1, 48, 1, 1, 62, 1, 1, 076, 1, 1, 090, 1, 1, 104, 1, 1, 118, 1, 1, 132, 1, 1, 146, 1, 1, 160, 1, 1, 174, 1, 1, 188, 1, 1, 202, 1, 1, 216, 1, 1, 230},
{1, 7, 1, 1, 23, 1, 1, 39, 1, 1, 55, 1, 1, 71, 1, 1, 087, 1, 1, 103, 1, 1, 119, 1, 1, 135, 1, 1, 151, 1, 1, 167, 1, 1, 183, 1, 1, 199, 1, 1, 215, 1, 1, 231, 1, 1, 247, 1, 1, 263},
{1, 8, 1, 1, 26, 1, 1, 44, 1, 1, 62, 1, 1, 80, 1, 1, 098, 1, 1, 116, 1, 1, 134, 1, 1, 152, 1, 1, 170, 1, 1, 188, 1, 1, 206, 1, 1, 224, 1, 1, 242, 1, 1, 260, 1, 1, 278, 1, 1, 296},
{1, 9, 1, 1, 29, 1, 1, 49, 1, 1, 69, 1, 1, 89, 1, 1, 109, 1, 1, 129, 1, 1, 149, 1, 1, 169, 1, 1, 189, 1, 1, 209, 1, 1, 229, 1, 1, 249, 1, 1, 269, 1, 1, 289, 1, 1, 309, 1, 1, 329},
......

这些1可以删除吗?
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2024-10-29 17:03:54 | 显示全部楼层
王守恩 发表于 2024-10-29 16:08
{1, 1, 1, 1, 05, 1, 1, 09, 1, 1, 13, 1, 1, 17, 1, 1, 021, 1, 1, 025, 1, 1, 029, 1, 1, 033, 1, 1, 03 ...

???

  1. Table[Cases[ContinuedFraction[Power[E, (a)^-1], 50], Except@1], {a, 2, 10}]
复制代码


{{5,9,13,17,21,25,29,33,37,41,45,49,53,57,61,65},
{2,8,14,20,26,32,38,44,50,56,62,68,74,80,86,92,98},{3,11,19,27,35,43,51,59,67,75,83,91,99,107,115,123,131},{4,14,24,34,44,54,64,74,84,94,104,114,124,134,144,154,164},{5,17,29,41,53,65,77,89,101,113,125,137,149,161,173,185,197},{6,20,34,48,62,76,90,104,118,132,146,160,174,188,202,216,230},{7,23,39,55,71,87,103,119,135,151,167,183,199,215,231,247,263},{8,26,44,62,80,98,116,134,152,170,188,206,224,242,260,278,296},{9,29,49,69,89,109,129,149,169,189,209,229,249,269,289,309,329}}

评分

参与人数 1威望 +9 金币 +9 贡献 +9 经验 +9 鲜花 +9 收起 理由
王守恩 + 9 + 9 + 9 + 9 + 9 这些按钮学不好了。

查看全部评分

毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2024-10-29 18:30:39 | 显示全部楼层

{0, 02, 04, 06, 08, 010, 012, 014, 016, 018, 020, 022, 024, 026, 028, 030, 032, 034, 036, 038, 040, 042, 044, 046, 048, 050, 052, 054, 056, 058, 060, 062, 064, 066, 068, 070, 072, 074, 076},
{1, 05, 09, 13, 17, 021, 025, 029, 033, 037, 041, 045, 049, 053, 057, 061, 065, 069, 073, 077, 081, 085, 089, 093, 097, 101, 105, 109, 113, 117, 121, 125, 129, 133, 137, 141, 145, 149, 153},
{2, 08, 14, 20, 26, 032, 038, 044, 050, 056, 062, 068, 074, 080, 086, 092, 098, 104, 110, 116, 122, 128, 134, 140, 146, 152, 158, 164, 170, 176, 182, 188, 194, 200, 206, 212, 218, 224, 230},
{3, 11, 19, 27, 35, 043, 051, 059, 067, 075, 083, 091, 099, 107, 115, 123, 131, 139, 147, 155, 163, 171, 179, 187, 195, 203, 211, 219, 227, 235, 243, 251, 259, 267, 275, 283, 291, 299, 307},
{4, 14, 24, 34, 44, 054, 064, 074, 084, 094, 104, 114, 124, 134, 144, 154, 164, 174, 184, 194, 204, 214, 224, 234, 244, 254, 264, 274, 284, 294, 304, 314, 324, 334, 344, 354, 364, 374, 384},
{5, 17, 29, 41, 53, 065, 077, 089, 101, 113, 125, 137, 149, 161, 173, 185, 197, 209, 221, 233, 245, 257, 269, 281, 293, 305, 317, 329, 341, 353, 365, 377, 389, 401, 413, 425, 437, 449, 461},
{6, 20, 34, 48, 62, 076, 090, 104, 118, 132, 146, 160, 174, 188, 202, 216, 230, 244, 258, 272, 286, 300, 314, 328, 342, 356, 370, 384, 398, 412, 426, 440, 454, 468, 482, 496, 510, 524, 538},
{7, 23, 39, 55, 71, 087, 103, 119, 135, 151, 167, 183, 199, 215, 231, 247, 263, 279, 295, 311, 327, 343, 359, 375, 391, 407, 423, 439, 455, 471, 487, 503, 519, 535, 551, 567, 583, 599, 615},
{8, 26, 44, 62, 80, 098, 116, 134, 152, 170, 188, 206, 224, 242, 260, 278, 296, 314, 332, 350, 368, 386, 404, 422, 440, 458, 476, 494, 512, 530, 548, 566, 584, 602, 620, 638, 656, 674, 692},
{9, 29, 49, 69, 89, 109, 129, 149, 169, 189, 209, 229, 249, 269, 289, 309, 329, 349, 369, 389, 409, 429, 449, 469, 489, 509, 529, 549, 569, 589, 609, 629, 649, 669, 689, 709, 729, 749, 769},
  1. Table[a + 2 a (b - 1) - 1, {a, 9}, {b, 39}]
复制代码

点评

b^2-(b-a)^2+1  发表于 2024-10-29 22:17
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2024-10-30 18:52:56 | 显示全部楼层
继续学习。
有多少个同时符合以下2个要求的n位数:1, 含有数字9。2, 是9的倍数。

这样的1位数有1个。{9},
这样的2位数有2个。{90, 99},
这样的3位数有28个。{189, 198, 279, 297, 369, 396, 459, 495, 549, 594, 639, 693, 729, 792, 819, 891, 900, 909, 918, 927, 936, 945, 954, 963, 972, 981, 990, 999}
  1. Table[Select[Range[10^(a - 1), 10^a - 1], And[Mod[#, 9] == 0, MemberQ[IntegerDigits[#], 9]] &], {a, 3}]
复制代码

得到这样一串数。{1, 2, 28, 352, 4168, 47512, 527608, 5748472}       说明:往后来不了了。
  1. Table[Length@Select[Range[10^(a - 1), 10^a - 1], And[Mod[#, 9] == 0, MemberQ[IntegerDigits[#], 9]] &], {a, 8}]
复制代码

{1, 2, 28, 352, 4168, 47512, 527608, 5748472, 61736248, 655626232, 6900636088, 72105724792, 748951523128, 7740563708152, 79665073373368, 816985660360312, 8352870943242808, 85175838489185272, 866582546402667448}
  1. LinearRecurrence[{19, -90}, {1, 2, 28}, 19]
复制代码

这串数有问题吗——OEIS没有这串数——通项公式如何调整?
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
您需要登录后才可以回帖 登录 | 欢迎注册

本版积分规则

小黑屋|手机版|数学研发网 ( 苏ICP备07505100号 )

GMT+8, 2024-12-27 11:25 , Processed in 0.032458 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表