All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Champagnat numbers (Posted on 2018-01-23) Difficulty: 4 of 5
A Champagnat number is equal to the sum of all the digits in a set of consecutive positive integers, one of which is the number itself.
Thus, 42 is a Champagnat number, since 42 is the sum of all of the digits of 39, 40, 41, 42, 43, 44.

Prove that there exist infinitely many Champagnat numbers.

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution a proof | Comment 1 of 2
Suppose there's a highest Champagnat number; call it c.

Start a set of consecutive integers starting at c+1. The total of all digits so far will then be sod(c+1), which is quite smaller than c+1. Keep adding consecutive integers to the sequence, and their sod's to the total of digits. With each consecutive integer that you add, you'll be adding at least one and usually more than one to the total of digits. After n new numbers have been appended to the sequence, the highest number in the sequence will be c+1+n, but the total of digits will have risen by more than n, so the average slope of the line from original total to current total will be larger than the unit slope of the identity of the highest number in the sequence itself, so at some point the total will exceed or match the lowest number in the sequence at that point, yet be lower than the highest number as the newly added sod can't exceed 9 times the length of the number.

Let's say someone claims that 975 is the highest Champagnat number (it is indeed Champagnat as the series from 973 to 1050 has total digits 975. Start at 976; the sod count then starts at 22. By the time you get to adding in sod(1056) you're only up to 972, but by adding in sod(1057) you bring the sod total up to 985, within the range 976 to 1057, and counting that as another Champagnat number.

This does not give the actual next Champagnat number, just a Champagnat number that's higher than any supposed last Champagnat number, as evidenced by the below table of Champagnat numbers through 1000 where 976 happens to be the highest number below 1000 that is not Champagnat, so before 985 come all the numbers 977 through 984 as Champagnat numbers.

 champ   series
  no.  first last
   1     0     1  (degenerate case as series consists of solely 1 or includes zero)
  10    10    13
  12    12    14
  14    11    14
  15    13    15
  17    17    18
  19    19    22
  20    20    24
  22    22    25
  25    21    25
  26    23    26
  27    26    28
  28    28    31
  29    29    33
  33    30    35
  34    34    37
  35    32    36
  37    37    40
  38    38    42
  42    39    44
  45    43    47
  46    46    49
  47    47    51
  51    51    56
  55    54    58
  56    56    60
  57    52    57
  60    57    62
  63    62    67
  65    65    69
  69    66    71
  70    70    76
  72    69    75
  74    68    74
  75    73    78
  77    71    77
  78    75    80
  79    79    85
  81    78    84
  83    77    83
  84    81    87
  87    84    89
  88    88    94
  90    87    93
  91    91    97
  92    86    92
  94    94   100
  95    95   104
  96    94   101
  98    92    98
  99    98   112
 100    99   115
 101    95   105
 102    96   107
 103   103   118
 104    98   113
 105   105   119
 106   106   121
 108   105   120
 109   108   124
 110   107   123
 111   106   122
 112   112   127
 113   104   120
 114   114   128
 115   111   127
 117   116   130
 118   118   133
 119   113   128
 120   117   132
 121   121   136
 122   116   131
 123   123   137
 124   120   136
 125   119   135
 126   118   134
 127   126   139
 128   122   137
 129   127   141
 130   130   145
 132   132   146
 134   128   143
 135   125   139
 136   135   148
 137   137   150
 138   133   147
 140   125   140
 141   141   155
 142   129   145
 143   128   144
 144   137   151
 145   144   157
 146   140   155
 147   142   156
 148   139   154
 150   150   164
 151   147   160
 152   137   152
 153   149   163
 154   153   166
 155   146   159
 156   151   165
 157   157   169
 159   154   167
 161   158   171
 162   152   166
 163   162   175
 164   155   168
 165   160   174
 166   166   178
 168   163   176
 169   156   169
 170   167   179
 171   169   182
 172   171   184
 173   164   177
 175   175   187
 177   172   185
 178   178   190
 179   176   188
 180   170   184
 181   180   193
 182   173   186
 183   177   189
 184   184   196
 185   179   192
 186   181   194
 187   174   187
 188   185   197
 189   188   202
 190   189   205
 191   182   195
 192   192   210
 194   188   203
 195   193   213
 196   192   211
 197   194   215
 198   197   220
 199   198   223
 200   200   227
 201   192   212
 202   195   217
 203   203   228
 205   205   229
 206   194   216
 207   202   228
 208   207   232
 209   206   231
 210   205   230
 211   204   229
 212   200   228
 213   211   236
 214   196   220
 216   215   238
 219   217   240
 220   220   244
 221   212   237
 222   222   245
 223   214   238
 224   218   242
 225   211   237
 226   225   247
 227   221   245
 228   223   246
 229   213   238
 230   215   239
 231   226   248
 232   228   250
 233   218   243
 234   232   254
 235   235   256
 236   227   249
 237   229   252
 238   211   238
 239   236   257
 240   231   254
 241   241   262
 242   239   260
 243   237   258
 244   234   256
 245   242   263
 246   246   266
 247   240   262
 248   224   248
 249   247   267
 251   239   261
 252   251   271
 253   244   265
 254   236   258
 255   252   272
 257   245   266
 258   253   273
 259   250   271
 260   260   279
 261   254   274
 262   261   280
 263   251   272
 264   262   281
 265   247   268
 266   263   282
 267   256   276
 268   264   283
 269   248   269
 270   265   284
 271   271   289
 272   272   290
 273   273   291
 274   274   292
 275   275   293
 276   276   294
 277   277   295
 278   278   296
 279   279   297
 280   280   298
 281   260   281
 282   282   300
 284   272   291
 285   283   303
 286   282   301
 287   284   305
 288   287   310
 289   288   313
 290   290   317
 291   291   318
 292   292   319
 293   287   311
 294   277   296
 295   295   325
 296   284   306
 297   293   322
 298   297   328
 299   287   312
 300   298   330
 302   296   327
 303   301   335
 304   291   319
 305   299   333
 306   305   337
 307   298   331
 308   308   339
 309   291   320
 310   294   325
 311   302   336
 312   309   341
 313   304   337
 314   293   324
 315   313   344
 316   316   346
 318   307   339
 319   310   343
 320   317   347
 321   312   344
 322   291   322
 323   320   350
 324   323   352
 325   315   346
 326   311   344
 327   324   353
 328   319   349
 329   296   329
 330   325   354
 331   322   352
 332   332   359
 333   333   360
 334   334   361
 335   335   362
 336   336   363
 337   337   364
 338   338   365
 339   339   366
 340   340   367
 341   332   360
 342   342   368
 343   333   361
 345   334   362
 346   312   346
 347   335   363
 348   331   360
 349   336   364
 350   341   368
 351   350   376
 352   324   355
 353   338   366
 354   333   362
 355   355   379
 357   340   368
 358   331   361
 359   353   378
 360   351   377
 361   360   385
 362   359   384
 363   358   383
 364   357   382
 365   356   381
 366   366   389
 367   354   379
 368   350   377
 369   361   386
 370   370   394
 372   369   393
 373   364   388
 374   368   392
 376   367   391
 377   371   395
 378   377   400
 379   378   403
 380   380   407
 381   381   408
 382   382   409
 383   377   401
 384   375   398
 385   385   415
 387   383   412
 388   387   418
 389   377   402
 390   388   420
 391   373   397
 392   386   417
 393   382   411
 394   381   409
 395   395   431
 396   394   429
 397   396   433
 398   374   398
 399   381   410
 400   400   439
 402   397   435
 403   394   430
 404   401   440
 405   404   442
 406   378   406
 408   405   443
 409   391   427
 410   398   437
 411   406   444
 412   412   448
 413   401   441
 414   414   449
 415   397   436
 416   404   443
 417   408   446
 418   411   448
 419   386   419
 420   409   447
 421   399   439
 422   413   449
 423   421   456
 424   423   457
 425   416   452
 426   417   453
 427   427   460
 428   419   455
 429   426   459
 430   394   433
 431   413   450
 432   424   458
 433   414   451
 434   401   443
 435   432   465
 436   429   463
 437   428   462
 438   435   467
 439   426   460
 440   425   459
 441   440   472
 442   433   466
 443   443   474
 444   439   471
 445   420   457
 447   441   473
 448   448   478
 449   434   467
 450   437   469
 451   451   481
 452   449   479
 453   445   476
 455   452   482
 456   435   468
 457   439   472
 458   446   477
 459   458   487
 460   450   481
 461   437   470
 462   459   488
 463   454   484
 464   449   480
 465   460   489
 466   430   466
 467   467   495
 468   461   490
 469   468   496
 470   452   483
 471   469   497
 472   472   499
 473   470   498
 474   463   492
 475   475   505
 476   443   476
 477   473   502
 478   477   508
 479   458   488
 480   478   510
 482   476   507
 483   472   501
 484   471   499
 485   485   521
 486   484   519
 487   486   523
 489   471   500
 490   490   529
 492   487   525
 493   484   520
 494   491   531
 495   494   535
 498   493   534
 499   481   517
 500   488   527
 501   492   533
 502   498   541
 503   497   539
 504   501   545
 505   505   547
 506   503   546
 507   495   537
 508   483   520
 509   500   545
 510   486   525
 511   493   535
 512   506   548
 513   512   553
 514   504   547
 515   515   555
 516   483   521
 517   508   550
 519   513   554
 520   520   559
 522   505   548
 523   495   538
 524   521   560
 525   525   563
 526   510   553
 527   512   554
 528   526   564
 529   507   550
 530   518   558
 531   527   565
 532   531   568
 533   533   569
 534   534   570
 535   535   571
 536   536   572
 537   537   573
 538   538   574
 539   539   575
 540   540   576
 541   522   562
 542   512   555
 543   532   569
 544   526   565
 545   545   579
 546   523   563
 547   534   571
 548   527   566
 549   543   578
 550   541   577
 551   536   573
 552   531   569
 553   537   574
 554   509   554
 555   538   575
 556   552   586
 557   539   576
 558   555   588
 559   559   592
 560   542   578
 561   558   591
 563   557   590
 564   564   596
 565   556   589
 566   527   567
 567   551   586
 568   532   571
 570   568   600
 571   562   595
 572   554   588
 573   546   582
 574   547   583
 575   575   611
 576   574   609
 577   576   613
 578   563   596
 579   556   590
 580   580   619
 582   577   615
 583   574   610
 584   581   621
 585   584   625
 587   551   587
 588   583   624
 589   571   607
 590   578   617
 591   582   623
 592   588   631
 593   587   629
 594   589   633
 595   595   640
 596   569   605
 597   585   627
 598   573   610
 599   596   642
 600   598   645
 601   592   637
 602   593   638
 603   594   639
 604   603   649
 605   581   623
 606   604   650
 607   589   634
 608   605   651
 609   579   620
 610   606   652
 611   611   656
 612   607   653
 613   594   640
 614   608   654
 615   603   650
 616   609   655
 617   617   660
 618   616   659
 619   601   649
 620   593   639
 621   614   658
 622   621   664
 623   602   650
 624   606   653
 625   600   649
 626   596   644
 627   627   668
 628   588   634
 629   611   657
 630   629   670
 631   613   658
 633   631   672
 634   625   667
 635   605   653
 636   610   657
 637   597   646
 638   635   675
 639   632   673
 640   640   679
 641   626   668
 642   630   672
 643   636   676
 644   641   680
 645   633   674
 646   628   670
 647   620   665
 648   647   685
 649   631   673
 650   605   654
 651   648   686
 652   643   682
 653   638   678
 654   649   687
 655   615   661
 656   644   683
 657   652   689
 658   639   679
 659   653   690
 660   645   684
 661   661   697
 662   626   669
 663   655   692
 664   646   685
 665   665   701
 666   664   699
 667   666   703
 668   647   686
 669   658   695
 670   670   709
 671   662   698
 672   667   705
 673   664   700
 674   671   711
 675   674   715
 676   649   688
 677   635   677
 678   673   714
 679   645   685
 680   668   707
 681   672   713
 682   678   721
 683   677   719
 684   679   723
 685   685   730
 687   675   717
 688   663   700
 689   686   732
 690   688   735
 691   682   727
 692   683   728
 693   684   729
 695   695   744
 696   690   738
 697   679   724
 699   699   749
 700   700   751
 701   689   737
 702   698   748
 703   693   742
 704   680   726
 705   703   753
 706   688   736
 707   701   752
 708   696   746
 710   707   756
 711   704   754
 713   677   722
 714   714   761
 715   708   757
 716   686   734
 717   715   762
 718   678   724
 719   689   738
 720   716   763
 721   712   760
 722   701   753
 723   723   768
 724   699   751
 725   713   761
 726   718   765
 727   687   736
 728   704   755
 729   719   766
 730   711   760
 731   686   735
 732   720   767
 733   724   769
 734   734   777
 735   726   771
 736   727   772
 737   728   773
 738   732   776
 739   730   775
 740   713   762
 741   717   765
 742   742   784
 744   721   768
 745   723   769
 746   740   783
 747   746   787
 748   738   781
 749   743   785
 750   736   779
 751   726   772
 752   710   761
 753   750   791
 754   741   784
 755   728   774
 756   754   794
 757   729   775
 759   751   792
 760   760   799
 761   755   795
 762   742   785
 763   745   787
 764   761   801
 765   764   805
 766   756   796
 768   763   804
 769   733   778
 770   746   788
 771   762   803
 772   768   811
 773   767   809
 774   769   813
 775   775   820
 776   758   798
 777   765   807
 778   751   793
 779   776   822
 780   778   825
 781   772   817
 782   773   818
 783   774   819
 784   739   784
 785   785   834
 786   780   828
 787   769   814
 789   789   839
 790   790   841
 791   779   827
 792   788   838
 793   783   832
 794   770   816
 795   787   837
 796   778   826
 797   797   849
 798   796   848
 799   795   847
 800   800   854
 801   798   851
 802   792   844
 803   791   843
 804   790   842
 805   780   829
 806   776   824
 807   805   857
 808   808   859
 809   779   828
 810   803   856
 811   811   862
 812   788   839
 813   781   831
 814   789   841
 815   806   858
 816   798   852
 817   777   826
 818   812   863
 819   815   865
 820   819   868
 821   809   861
 822   808   860
 823   823   871
 824   797   851
 825   820   869
 826   781   832
 827   824   872
 828   811   863
 829   801   856
 830   821   870
 831   825   873
 832   814   865
 834   787   839
 835   826   874
 836   812   864
 837   818   868
 838   793   847
 839   833   879
 840   831   878
 841   841   886
 843   835   881
 844   813   865
 845   836   882
 846   844   888
 847   837   883
 849   838   884
 850   825   874
 851   842   887
 852   832   879
 853   840   886
 854   809   863
 855   850   894
 856   856   898
 857   800   857
 858   853   896
 860   827   876
 861   843   888
 862   858   901
 863   857   899
 864   859   903
 865   865   910
 866   854   897
 867   837   884
 868   832   880
 869   866   912
 870   868   915
 871   862   907
 872   863   908
 873   864   909
 874   855   898
 875   875   924
 876   870   918
 877   859   904
 879   879   929
 880   880   931
 881   869   917
 882   878   928
 883   873   922
 884   860   906
 885   877   927
 886   868   916
 887   887   939
 888   886   938
 889   885   937
 890   890   944
 891   891   945
 892   892   946
 893   893   947
 894   894   948
 895   895   949
 896   866   914
 897   873   923
 898   889   943
 899   869   918
 900   899   955
 901   865   913
 902   896   951
 903   871   921
 904   879   931
 905   905   959
 906   906   960
 907   907   961
 908   908   962
 909   909   963
 910   910   964
 911   866   915
 912   897   953
 914   893   948
 915   900   957
 916   894   949
 918   913   966
 920   911   965
 921   916   968
 922   922   973
 924   907   962
 925   898   955
 926   920   972
 927   926   976
 928   918   970
 929   923   974
 930   912   966
 933   927   977
 934   921   973
 935   932   981
 936   924   975
 937   937   985
 939   928   978
 940   933   982
 941   938   986
 942   930   980
 943   925   976
 945   939   987
 947   890   947
 948   942   989
 949   940   988
 950   935   984
 951   943   990
 952   912   967
 953   953   998
 954   944   991
 955   955  1003
 956   902   960
 957   945   992
 958   951   997
 960   960  1019
 961   957  1009
 962   962  1025
 963   961  1023
 964   963  1027
 965   965  1032
 966   957  1011
 967   960  1021
 969   967  1037
 970   970  1045
 971   962  1026
 972   968  1039
 973   972  1048
 974   944   992
 975   973  1050
 977   977  1058
 978   964  1031
 979   979  1063
 980   974  1053
 981   975  1055
 982   973  1051
 983   968  1041
 984   982  1068
 985   976  1057
 986   959  1020
 987   987  1077
 988   984  1072
 989   983  1070
 990   989  1081
 991   964  1033
 992   992  1086
 993   978  1062
 994   969  1045
 995   986  1076
 996   991  1085
 997   961  1027
 998   983  1071
 999   998  1096
1000  1000  1099

Consider the set of numbers under 1000 that are NOT Champagnat numbers:

 2 3 4 5 6 7 8 9 11 13 16 18 21 23 24 30 31 32 36 39 40 41 43 44 48 49 50 52 53 54 58 59 61 62 64 66 67 68 71 73 76 80 82 85 86 89 93 97 107 116 131 133 139 149 158 160 167 174 176 193 204 215 217 218 250 256 283 301 317 344 356 371 375 386 401 407 446 454 481 488 491 496 497 518 521 562 569 581 586 632 686 694 698 709 712 743 758 767 788 833 842 848 859 878 913 917 919 923 931 932 938 944 946 959 968 976

Is the set of non-Champagnat positive integers finite or infinite? They seem to be dwindling in frequency the higher one goes.

DefDbl A-Z
Dim crlf$, totupto(1000000), champ(1000000), champlow(1000), champhigh(1000)

Private Sub Form_Load()
 Form1.Visible = True
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)

 For i = 1 To 100000
   totupto(i) = totupto(i - 1) + sod(i)
   high = i: tot = sod(i)
   low = high
   didOne = 0
   For low = high - 1 To 1 Step -1
      tot = tot + sod(low)
      If tot >= low And tot <= high Then Exit For
      DoEvents
   Next
   Do While tot >= low And tot <= high
   '  Text1.Text = Text1.Text & Str(tot): didOne = 1
     champ(tot) = champ(tot) + 1
     If tot <= 1000 Then
     champlow(tot) = low: champhigh(tot) = high
     End If
     low = low - 1: tot = tot + sod(low): If low < 1 Then Exit Do
     DoEvents
   Loop
   If didOne Then Text1.Text = Text1.Text & crlf
   DoEvents
   If low > highlow Then highlow = low: Text1.Text = Text1.Text & low & crlf
   If low > 1000 Then Exit For
 Next
 Text1.Text = Text1.Text & crlf & crlf
 
 For i = 1 To 1000
   DoEvents
   If champ(i) Then Text1.Text = Text1.Text & mform(i, "###0") & mform(champlow(i), "#####0") & mform(champhigh(i), "#####0") & crlf
 Next
 Text1.Text = Text1.Text & crlf & crlf
 For i = 1 To 1000
   DoEvents
   If champ(i) = 0 Then Text1.Text = Text1.Text & Str(i)
 Next
 Text1.Text = Text1.Text & crlf & crlf

 Text1.Text = Text1.Text & crlf & " done"
  
End Sub

Function mform$(x, t$)
  a$ = Format$(x, t$)
  If Len(a$) < Len(t$) Then a$ = Space$(Len(t$) - Len(a$)) & a$
  mform$ = a$
End Function

Function sod(n)
  s$ = LTrim(Str(n))
  tot = 0
  For i = 1 To Len(s$)
   tot = tot + Val(Mid(s$, i, 1))
  Next
  sod = tot
End Function


  Posted by Charlie on 2018-01-23 15:00:21
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (14)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information