1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- #!/usr/bin/ruby
- # Numbers k such that the sum of divisors of k (A000203) and the sum of proper divisors of k (A001065) are both triangular numbers (A000217).
- # https://oeis.org/A329704
- # Are 1 and 36 the only terms that are also triangular numbers?
- # Assuming that such a term is also a perfect square, based on the data from A001110, if such a term exists, it must be greater than 10^353.
- for k in (2..1e6) {
- var t = polygonal(k, 3)
- var a = t.inverse_sigma
- for n in (a) {
- if (n.sigma - n -> is_polygonal(3)) {
- say n
- }
- }
- }
- __END__
- #
- ## Some terms of A329704, computed using the inverse sigma function applied on triangular numbers.
- #
- 1
- 2
- 5
- 36
- 54
- 473
- 441
- 6525
- 52577
- 124025
- 683820
- 1513754
- 1920552
- 6762923
- 6079931
- 14751657
- 17052782
- 17310942
- 49919939
- 36543714
- 60260967
- 372476909
- 562047389
- 251849052
- 364535720
- 783856979
- 1122603809
- 1084201689
- 670395564
- 670440852
- 2239241729
- 2284360733
- 824626800
- 2182908837
- 2487938201
- 2393957985
- 2306100332
- 4003025895
- 8210186009
- 11883589967
- 4678227684
- 5194927122
- 14538854609
- 26926218617
- 22614789545
- 12865159880
- 13167458360
- 24861819447
- 16688185878
- 36133539845
- 17807934000
- 39146468355
- 88597109453
- 42801425748
- 110315059217
- 70906440284
- 150437851247
- 70588308980
- 141827039637
- 220389070049
- 308251916039
- 210090511935
|