

A282849


Number of divisors k of n such that (n + k^2)/k is a prime.


3



1, 2, 0, 2, 0, 4, 0, 0, 0, 4, 0, 4, 0, 0, 0, 2, 0, 4, 0, 0, 0, 4, 0, 2, 0, 0, 0, 4, 0, 8, 0, 0, 0, 2, 0, 4, 0, 0, 0, 4, 0, 8, 0, 0, 0, 2, 0, 2, 0, 0, 0, 4, 0, 2, 0, 0, 0, 4, 0, 8, 0, 0, 0, 0, 0, 4, 0, 0, 0, 8, 0, 4, 0, 0, 0, 2, 0, 8, 0, 0, 0, 4, 0, 4, 0, 0, 0, 4, 0, 6
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Except for the single case of a(1)=1 all terms are even.  Robert G. Wilson v, Feb 25 2017
First occurrence of 2k: 3, 2, 6, 90, 30, 390, 690, 420, 210, 4290, 3990, 8778, 2310, 3570, 4830, 11550, 38850, 84630, 66990, 79170, 39270, 30030, 51870, 46410, 43890, ..., .  Robert G. Wilson v, Feb 25 2017


LINKS

Robert G. Wilson v, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Records and indices of records.


FORMULA

a(1) = 1; for n > 0: a(2n) = 2*A088627(n), a(2n + 1) = 0.


EXAMPLE

a(6) = 4 because (6 + 1^2)/1 = 7 is prime, (6 + 2^2)/2 = 5 is prime, (6 + 3^2)/3 = 5 is prime, (6 + 6^2)/6 = 7 is prime, where 1, 2, 3 and 6 are divisors of 6.


MATHEMATICA

f[n_] := Block[{d = Divisors@ n}, Length@ Select[d, PrimeQ[(n + #^2)/#] &]]; Array[f, 105] (* Robert G. Wilson v, Feb 25 2017 *)
Table[DivisorSum[n, 1 &, PrimeQ[(n + #^2)/#] &], {n, 105}] (* Michael De Vlieger, Nov 15 2017 *)


PROG

(PARI) a(n) = sumdiv(n, k, isprime((n+k^2)/k)); \\ Michel Marcus, Feb 26 2017


CROSSREFS

Cf. A088627 (number of divisors k of n such that (n + 2*k^2)/k is prime), A047255.
Sequence in context: A158706 A096500 A231563 * A111813 A167156 A132952
Adjacent sequences: A282846 A282847 A282848 * A282850 A282851 A282852


KEYWORD

nonn


AUTHOR

JuriStepan Gerasimov, Feb 24 2017


STATUS

approved



