|
|
|
|
1, 2, 7, 28, 130, 702, 4384, 31516, 260068, 2445372, 25796360, 299286550, 3751803964, 50211590696, 712746859372, 10697637496288, 169490803535680, 2830925427778810, 49785906936838240, 921273098388684878, 17944637546960083042, 368472898102440537484, 7993616254370783660414, 183539682466936703629744
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
|
|
MAPLE
|
b:= proc(n, i) option remember; `if`(n=0, 1, add(b(n-`if`(
i=0, j, 1), j)*ithprime(j), j=1..`if`(i=0, n, i)))
end:
a:= n-> b(n, 0):
|
|
MATHEMATICA
|
b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[b[n - If[i == 0, j, 1], j]* Prime[j], {j, 1, If[i == 0, n, i]}]];
a[n_] := b[n, 0];
|
|
PROG
|
(PARI)
allocatemem(234567890);
A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of Michel Marcus
A252737print(up_to_n) = { my(s, i=0, n=0); for(n=0, up_to_n, if(0 == n, s = 1, if(1 == n, s = 2; lev = vector(1); lev[1] = 2, oldlev = lev; lev = vector(2*length(oldlev)); s = 0; for(i = 0, (2^(n-1))-1, lev[i+1] = if((i%2), A003961(oldlev[(i\2)+1]), 2*oldlev[(i\2)+1]); s += lev[i+1]))); write("b252737.txt", n, " ", s)); };
A252737print(23); \\ Terms a(0) .. a(23) were computed with this program.
(Scheme, two alternative versions)
(define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (+ 1 i) (+ res (intfun i)))))))
(define (COMPOSE . funlist) (cond ((null? funlist) (lambda (x) x)) (else (lambda (x) ((car funlist) ((apply COMPOSE (cdr funlist)) x))))))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|