login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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.
6
3, 4, 6, 8, 9, 12, 15, 16, 18, 20, 21, 24, 27, 28, 30, 32, 33, 35, 36, 39, 40, 42, 44, 45, 48, 51, 52, 54, 56, 57, 60, 63, 64, 66, 68, 69, 70, 72, 75, 76, 78, 80, 81, 84, 87, 88, 90, 92, 93, 96, 99, 100, 102, 104, 105, 108, 111, 112, 114, 116, 117, 120, 123, 124, 126, 128
OFFSET
1,1
COMMENTS
Complement of A099477; A008586, A008585 and A037074 are subsequences - Reinhard Zumkeller, Oct 18 2004
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
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
LINKS
FORMULA
A099475(a(n)) > 0. - Reinhard Zumkeller, Oct 18 2004
EXAMPLE
a(18) = 35 because 5 and 7 divide 35 and 7 - 5 = 2.
MAPLE
isA059267 := proc(n)
local m ;
if modp(n, 4)=0 then
true;
else
for m from 2 to ceil(sqrt(n)) do
if modp(n, m^2-1) = 0 then
return true ;
end if;
end do;
false ;
end if;
end proc:
for n from 1 to 130 do
if isA059267(n) then
printf("%d, ", n) ;
end if;
end do:
MATHEMATICA
d1d2Q[n_]:=Mod[n, 4]==0||AnyTrue[Sqrt[#+1]&/@Divisors[n], IntegerQ]; Select[ Range[ 200], d1d2Q] (* Harvey P. Dale, May 31 2020 *)
PROG
(PARI) isA059267(n)={ n%4==0 || fordiv( n, d, issquare(d+1) && return(1))} \\ M. F. Hasler, Aug 29 2008
(PARI) is_A059267(n) = fordiv( n, d, n%(d+2)||return(1)) \\ M. F. Hasler, Jun 02 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Avi Peretz (njk(AT)netvision.net.il), Jan 23 2001
EXTENSIONS
More terms from James A. Sellers, Jan 24 2001
Removed comments linking to A143714, which seem wrong, as observed by Ignat Soroko, M. F. Hasler, Jun 02 2012
STATUS
approved