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.
%I A059267 #44 Jul 02 2025 16:02:00 %S A059267 3,4,6,8,9,12,15,16,18,20,21,24,27,28,30,32,33,35,36,39,40,42,44,45, %T A059267 48,51,52,54,56,57,60,63,64,66,68,69,70,72,75,76,78,80,81,84,87,88,90, %U A059267 92,93,96,99,100,102,104,105,108,111,112,114,116,117,120,123,124,126,128 %N A059267 Numbers n with 2 divisors d1 and d2 having difference 2: d2 - d1 = 2; equivalently, numbers that are 0 (mod 4) or have a divisor d of the form d = m^2 - 1. %C A059267 Complement of A099477; A008586, A008585 and A037074 are subsequences - _Reinhard Zumkeller_, Oct 18 2004 %C A059267 These numbers have an asymptotic density of ~ 0.522. This corresponds to all numbers which are multiples of 4 (25%), or of 3 (having 1 & 3 as divisors: + (1-1/4)*1/3 = 1/4), or of 5*7, or of 11*13, etc. (Generally, multiples of lcm(k,k+2), but multiples of 3 and 4 are already taken into account in the 50% covered by the first 2 terms.) - _M. F. Hasler_, Jun 02 2012 %C A059267 By considering divisors of the form m^2-1 with m <= 200 it is possible to prove that the density of this sequence is in the interval (0.5218, 0.5226). The numbers of terms not exceeding 10^k, for k = 1, 2, ..., are 5, 52, 521, 5219, 52206, 522146, 5221524, 52215473, 522155386, 5221555813, ..., so the asymptotic density of this sequence can be estimated empirically by 0.522155... . - _Amiram Eldar_, Sep 25 2022 %H A059267 M. F. Hasler, <a href="/A059267/b059267.txt">Table of n, a(n) for n = 1..3131</a> %F A059267 A099475(a(n)) > 0. - _Reinhard Zumkeller_, Oct 18 2004 %e A059267 a(18) = 35 because 5 and 7 divide 35 and 7 - 5 = 2. %p A059267 isA059267 := proc(n) %p A059267 local m ; %p A059267 if modp(n,4)=0 then %p A059267 true; %p A059267 else %p A059267 for m from 2 to ceil(sqrt(n)) do %p A059267 if modp(n,m^2-1) = 0 then %p A059267 return true ; %p A059267 end if; %p A059267 end do; %p A059267 false ; %p A059267 end if; %p A059267 end proc: %p A059267 for n from 1 to 130 do %p A059267 if isA059267(n) then %p A059267 printf("%d,",n) ; %p A059267 end if; %p A059267 end do: %t A059267 d1d2Q[n_]:=Mod[n,4]==0||AnyTrue[Sqrt[#+1]&/@Divisors[n],IntegerQ]; Select[ Range[ 200],d1d2Q] (* _Harvey P. Dale_, May 31 2020 *) %o A059267 (PARI) isA059267(n)={ n%4==0 || fordiv( n,d, issquare(d+1) && return(1))} \\ _M. F. Hasler_, Aug 29 2008 %o A059267 (PARI) is_A059267(n) = fordiv( n,d, n%(d+2)||return(1)) \\ _M. F. Hasler_, Jun 02 2012 %Y A059267 Cf. A099475, A099477, A008585, A008586, A037074. %K A059267 nonn %O A059267 1,1 %A A059267 Avi Peretz (njk(AT)netvision.net.il), Jan 23 2001 %E A059267 More terms from _James Sellers_, Jan 24 2001 %E A059267 Removed comments linking to A143714, which seem wrong, as observed by _Ignat Soroko_, _M. F. Hasler_, Jun 02 2012