OFFSET
1,2
COMMENTS
The numbers of terms that do not exceed 10^k, for k = 1, 2, ..., are 6, 44, 449, 4450, 44462, 444471, 4444647, 44446255, 444461038, 4444607360, ... . Apparently, the asymptotic density of this sequence exists and equals 0.44446... .
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
1 is a term since the number of divisors of 1 is 1 = 2^0, and the number of divisors of 1 + 1 = 2 is 2 = 2^1.
54 is a term since the number of divisors of 54 is 8 = 2^3, and the number of divisors of 54 + 1 = 55 is 4 = 2^2.
MATHEMATICA
pow2Q[n_] := n == 2^IntegerExponent[n, 2]; q[n_] := q[n] = pow2Q[DivisorSigma[0, n]]; Select[Range[150], q[#] && q[# + 1] &]
PROG
(PARI) is(n) = {my(d = numdiv(n)); d >> valuation(d, 2) == 1; }
lista(kmax) = {my(is1 = is(1), is2); for(k = 2, kmax, is2 = is(k); if(is1 && is2, print1(k-1, ", ")); is1 = is2); }
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, May 10 2024
STATUS
approved