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.

A340728 a(n) is the number of divisors d of n such that n/d - d is prime.

This page as a plain text file.
%I A340728 #14 Jan 19 2021 05:47:07
%S A340728 0,0,1,1,0,1,0,2,0,1,0,1,0,2,1,0,0,3,0,1,0,0,0,3,0,1,0,1,0,3,0,1,0,0,
%T A340728 1,1,0,2,0,1,0,3,0,2,0,0,0,3,0,2,0,0,0,2,0,0,0,0,0,4,0,2,1,0,0,3,0,2,
%U A340728 0,1,0,1,0,1,0,0,0,3,0,3,0,0,0,3,0,1,0,1,0,3,0,1,0,0,0,1,0,3,1
%N A340728 a(n) is the number of divisors d of n such that n/d - d is prime.
%C A340728 If n is odd, then a(n) = 0 unless n is in A000466, in which case a(n) = 1.
%H A340728 Robert Israel, <a href="/A340728/b340728.txt">Table of n, a(n) for n = 1..10000</a>
%F A340728 a(n) = Sum_{d|n} c(n/d-d), where c is the prime characteristic (A010051). - _Wesley Ivan Hurt_, Jan 18 2021
%e A340728 a(8) = 2; among the divisors {1,2,4,8} of 8, there are two cases where 8/d-d is prime: 8/1-1 = 7 and 8/2-2 = 2.
%p A340728 f:= proc(n) local D,i,m;
%p A340728   D:= sort(convert(numtheory:-divisors(n),list));
%p A340728   m:= nops(D);
%p A340728   nops(select(i -> isprime(D[m+1-i]-D[i]), [$1..(m+1)/2]));
%p A340728 end proc:
%p A340728 map(f, [$1..100]);
%o A340728 (PARI) a(n) = sumdiv(n, d, isprime(n/d-d)); \\ _Michel Marcus_, Jan 18 2021
%Y A340728 Cf. A000466, A010051, A179993, A340729.
%K A340728 nonn
%O A340728 1,8
%A A340728 _J. M. Bergot_ and _Robert Israel_, Jan 17 2021