OFFSET
1,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..5000
EXAMPLE
n=5, divisors of A000040(5)+1=11+1=12 that are not greater 11: {1,2,3,4,6}, 11=6+4+1=6+3+2, therefore a(5)=2.
MAPLE
b:= proc(n, i) option remember; global l;
`if`(n=0, 1, `if`(i<1, 0, b(n, i-1)+
`if`(l[i]>n, 0, b(n-l[i], i-1))))
end:
a:= proc(n) global l; local p;
forget(b);
p:= ithprime(n);
l:= sort([numtheory[divisors](p+1)[]]);
b(p, nops(l)-1)
end:
seq(a(n), n=1..50); # Alois P. Heinz, May 01 2012
MATHEMATICA
Count[Total/@Subsets[Most[Divisors[Prime[#]+1]]], Prime[#]]&/@Range[90] (* Harvey P. Dale, Jan 31 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jul 03 2003
STATUS
approved