cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A085496 Number of ways to write prime(n) as sum of distinct divisors of prime(n)+1.

This page as a plain text file.
%I A085496 #16 Mar 12 2019 18:23:02
%S A085496 0,1,1,1,2,0,1,1,5,3,1,0,2,0,10,1,31,0,0,26,0,6,23,20,0,0,1,13,0,0,1,
%T A085496 15,0,14,9,0,0,0,190,0,713,0,42,0,7,9,0,9,6,0,6,2148,0,509,0,120,109,
%U A085496 1,0,0,0,4,6,100,0,0,0,0,2,4,0,21897,1,0,3,85,79,0,0,0,19172,0,1130
%N A085496 Number of ways to write prime(n) as sum of distinct divisors of prime(n)+1.
%C A085496 a(n) = A085491(A000040(n));
%C A085496 a(A085498(n)) > 0.
%H A085496 Alois P. Heinz, <a href="/A085496/b085496.txt">Table of n, a(n) for n = 1..5000</a>
%e A085496 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.
%p A085496 b:= proc(n, i) option remember; global l;
%p A085496       `if`(n=0, 1, `if`(i<1, 0, b(n, i-1)+
%p A085496       `if`(l[i]>n, 0, b(n-l[i], i-1))))
%p A085496     end:
%p A085496 a:= proc(n) global l; local p;
%p A085496       forget(b);
%p A085496       p:= ithprime(n);
%p A085496       l:= sort([numtheory[divisors](p+1)[]]);
%p A085496       b(p, nops(l)-1)
%p A085496     end:
%p A085496 seq(a(n), n=1..50);  # _Alois P. Heinz_, May 01 2012
%t A085496 Count[Total/@Subsets[Most[Divisors[Prime[#]+1]]],Prime[#]]&/@Range[90] (* _Harvey P. Dale_, Jan 31 2016 *)
%K A085496 nonn
%O A085496 1,5
%A A085496 _Reinhard Zumkeller_, Jul 03 2003