login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A085496 Number of ways to write prime(n) as sum of distinct divisors of prime(n)+1. 5

%I #16 Mar 12 2019 18:23:02

%S 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 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 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 Number of ways to write prime(n) as sum of distinct divisors of prime(n)+1.

%C a(n) = A085491(A000040(n));

%C a(A085498(n)) > 0.

%H Alois P. Heinz, <a href="/A085496/b085496.txt">Table of n, a(n) for n = 1..5000</a>

%e 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 b:= proc(n, i) option remember; global l;

%p `if`(n=0, 1, `if`(i<1, 0, b(n, i-1)+

%p `if`(l[i]>n, 0, b(n-l[i], i-1))))

%p end:

%p a:= proc(n) global l; local p;

%p forget(b);

%p p:= ithprime(n);

%p l:= sort([numtheory[divisors](p+1)[]]);

%p b(p, nops(l)-1)

%p end:

%p seq(a(n), n=1..50); # _Alois P. Heinz_, May 01 2012

%t Count[Total/@Subsets[Most[Divisors[Prime[#]+1]]],Prime[#]]&/@Range[90] (* _Harvey P. Dale_, Jan 31 2016 *)

%K nonn

%O 1,5

%A _Reinhard Zumkeller_, Jul 03 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 09:23 EDT 2024. Contains 371782 sequences. (Running on oeis4.)