login
Numbers k such that d(k+2) = 2*d(k) where d(k) is the number of divisors of k (A000005).
3

%I #17 May 23 2023 15:08:40

%S 1,13,19,22,31,37,38,53,67,83,86,89,109,113,124,127,131,133,134,139,

%T 148,157,169,181,187,199,211,233,251,253,257,263,292,293,295,307,310,

%U 317,326,328,337,338,343,353,355,361,376,379,389,401,406,409,412,422,427,438,443,449,453

%N Numbers k such that d(k+2) = 2*d(k) where d(k) is the number of divisors of k (A000005).

%H Amiram Eldar, <a href="/A188540/b188540.txt">Table of n, a(n) for n = 1..10000</a>

%e 1 is a term since d(1+2) = d(3) = 2 = 2*d(1).

%t Select[Range[500], DivisorSigma[0, # + 2] == 2 * DivisorSigma[0, #] &] (* _Amiram Eldar_, Jan 17 2021 *)

%t Position[Partition[DivisorSigma[0,Range[500]],3,1],_?(2#[[1]]== #[[3]]&),1,Heads-> False]// Flatten (* _Harvey P. Dale_, Oct 19 2021 *)

%o (PARI) isok(k) = numdiv(k+2) == 2*numdiv(k); \\ _Michel Marcus_, Jan 17 2021

%Y Cf. A000005, A063446, A160921.

%K nonn,easy

%O 1,2

%A _Juri-Stepan Gerasimov_, Apr 03 2011