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.

A268037 Numbers k such that the number of divisors of k+2 divides k and the number of divisors of k divides k+2.

This page as a plain text file.
%I A268037 #41 Apr 30 2021 08:12:55
%S A268037 4,30,48,110,208,270,320,368,510,590,688,750,1070,1216,1328,1566,1808,
%T A268037 2030,2190,2510,2670,2768,3008,3088,3728,4110,4208,4430,4528,4688,
%U A268037 4698,4910,5008,5696,5870,5886,5968,6128,6592,6846,7088,7310,7790,8384,9008,9230,9390,9488,9534,9710
%N A268037 Numbers k such that the number of divisors of k+2 divides k and the number of divisors of k divides k+2.
%C A268037 One can call such pairs {n, n+2} mutually (or amicably) step 2 refactorable numbers.
%C A268037 All terms are even.
%C A268037 Proof. Let us suppose n is odd. Then so is n+2 and the number of their divisors has to be odd, which implies they are squares (see the proof in A268066). Since the separation between closest squares is 2n+1, it is always greater than 2, except for n=0, when it is 1.
%C A268037 Contains 48 + 160*k if 3 + 10*k and 5 + 16*k are prime. Dickson's conjecture implies that there are infinitely many of these. - _Robert Israel_, May 09 2016
%H A268037 Robert Israel, <a href="/A268037/b268037.txt">Table of n, a(n) for n = 1..10000</a>
%e A268037 4 is a term because its number of divisors (3) divides 6=4+2 and the number of divisors of 6 (4) divides 4.
%p A268037 select(n -> n mod numtheory:-tau(n+2)=0 and (n+2) mod numtheory:-tau(n) = 0,
%p A268037 2*[$1..10000]); # _Robert Israel_, May 09 2016
%t A268037 lst={}; Do[ If[ Divisible[n, DivisorSigma[0, n+2]]&&Divisible[n+2, DivisorSigma[0, n]], AppendTo[lst, n]], {n, 12000}]; lst
%t A268037 Select[Range[12000], Divisible[#, DivisorSigma[0, # + 2]] && Divisible[# + 2, DivisorSigma[0, #]] &]
%o A268037 (PARI) for(n=1, 12000, (n%numdiv(n+2)==0)&&((n+2)%numdiv(n)==0)&&print1(n ", "))
%o A268037 (Python)
%o A268037 from sympy import divisors
%o A268037 def ok(n): return n%len(divisors(n+2)) == 0 and (n+2)%len(divisors(n)) == 0
%o A268037 print(list(filter(ok, range(1, 9711)))) # _Michael S. Branicky_, Apr 30 2021
%Y A268037 Cf. A000005 (number of divisors), A033950 (refactorable numbers), A272353, A269781 (related sequences).
%K A268037 nonn
%O A268037 1,1
%A A268037 _Waldemar Puszkarz_, Apr 27 2016