OFFSET
1,2
PROG
(C++) #include <iostream> #include <limits.h> using namespace std ; int A112564(const unsigned long long n, const unsigned long long k) { unsigned long long A=k ; unsigned long long B=0 ; unsigned long long C=0 ; if( n==0 || k == 0) return 1; else { while(A != B) { C++ ; if ( C % n == 0) C++ ; B=A ; A= A*(C+1)/C ; if ( A > ULLONG_MAX/(C+1) ) exit(0) ; } return 1+A ; } } unsigned long long A112569(const int d) { unsigned long long resul =0 ; for(int k=0 ; k <=d ; k++) resul += A112564(d-k, k) ; return resul ; } int main(int argc, char *argv[]) { for(int n=0; n < 40 ; n++) cout << A112569(n) << endl ; } - R. J. Mathar, Sep 26 2006
(PARI) A112564(n, k)= {my(A=k, B=0, C=0); if(n==0 || k==0, 1, until(A==B, C=C+1; if(C%n==0, C=C+1); B=A; A=floor(A*(C+1)/C)); 1+A)}; a(n) = sum(k=0, n, A112564(n-k, k)); \\ Michel Marcus, Apr 23 2013
CROSSREFS
KEYWORD
more,nonn
AUTHOR
Paul D. Hanna, Oct 14 2005
EXTENSIONS
More terms from R. J. Mathar, Sep 26 2006
STATUS
approved