OFFSET
1,2
COMMENTS
For a given k, k >= a(n), k < a(n+1), the cycles denoting the permutations on k elements have average length L(k), L(k) >= n, L(k) < n+1.
Is this the same as A088907? [From R. J. Mathar, Nov 03 2010]
LINKS
W. Bomfim, Image
Wikipedia, Harmonic number
calculator.runiter.com, Freeware graphing-calculator
ttmath, C++ multiprecision math software
EXAMPLE
PROG
(C)
#include <iostream>
#include <C:\Wirth\Wirth15_2\ttmath-0.9.2-src/ttmath-0.9.2/ttmath/ttmath.h>
using namespace std;
int main(){
const unsigned int nMaxTermos = 60;
typedef ttmath::Big<TTMATH_BITS(32), TTMATH_BITS(7*32)> BigType; // See the ttmath link.
unsigned int n = 1;
BigType k = 1, H = /* =1/k*/ 1, average, one = 1;
do{ average = k / H;
....if(average >= n){
........cout << k << ", ";
........n++; }
....k = k + 1; H = H + one/k;
....}while(n < nMaxTermos);
return 0;
}
CROSSREFS
KEYWORD
nonn
AUTHOR
Washington Bomfim, Nov 02 2010
EXTENSIONS
Edited by Washington Bomfim, Nov 09 2010
STATUS
approved