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.

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 03 2003

Keywords

Comments

a(n) = A085491(A000040(n));
a(A085498(n)) > 0.

Examples

			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.
		

Programs

  • 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 *)