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.

Showing 1-4 of 4 results.

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.

Original entry on oeis.org

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

Views

Author

Avi Peretz (njk(AT)netvision.net.il), Jan 23 2001

Keywords

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

Examples

			a(18) = 35 because 5 and 7 divide 35 and 7 - 5 = 2.
		

Crossrefs

Programs

  • 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 *)
  • 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

Formula

A099475(a(n)) > 0. - Reinhard Zumkeller, Oct 18 2004

Extensions

More terms from James Sellers, Jan 24 2001
Removed comments linking to A143714, which seem wrong, as observed by Ignat Soroko, M. F. Hasler, Jun 02 2012

A099477 Numbers having no divisors d such that also d+2 is a divisor.

Original entry on oeis.org

1, 2, 5, 7, 10, 11, 13, 14, 17, 19, 22, 23, 25, 26, 29, 31, 34, 37, 38, 41, 43, 46, 47, 49, 50, 53, 55, 58, 59, 61, 62, 65, 67, 71, 73, 74, 77, 79, 82, 83, 85, 86, 89, 91, 94, 95, 97, 98, 101, 103, 106, 107, 109, 110, 113, 115, 118, 119, 121, 122, 125, 127, 130, 131, 133
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 18 2004

Keywords

Comments

Except for 3, all primes are in this sequence. - Alonso del Arte, Jun 13 2014

Examples

			10 is in the sequence because its divisors are 1, 2, 5, 10, none of which is 2 less than another.
11 is in the sequence as are all primes other than 3.
12 is not in the sequence because its divisors are 1, 2, 3, 4, 6, 12, of which 2 and 4 are 2 less than another divisor.
		

Crossrefs

Complement of A059267.

Programs

  • Mathematica
    twinDivsQ[n_] := Union[ IntegerQ[ # ] & /@ (n/(Divisors[n] + 2))][[ -1]] == True; Select[ Range[133], !twinDivsQ[ # ] &] (* Robert G. Wilson v, Jun 09 2005 *)
    d2noQ[n_]:=Module[{d=Divisors[n]},Intersection[d,d+2]=={}]; Select[ Range[ 150],d2noQ] (* Harvey P. Dale, Feb 15 2019 *)

Formula

A099475(a(n)) = 0.

A243865 Number of twin divisors of n.

Original entry on oeis.org

0, 0, 2, 2, 0, 2, 0, 2, 2, 0, 0, 5, 0, 0, 3, 2, 0, 2, 0, 2, 2, 0, 0, 6, 0, 0, 2, 2, 0, 3, 0, 2, 2, 0, 2, 5, 0, 0, 2, 4, 0, 2, 0, 2, 3, 0, 0, 6, 0, 0, 2, 2, 0, 2, 0, 2, 2, 0, 0, 8, 0, 0, 4, 2, 0, 2, 0, 2, 2, 2, 0, 6, 0, 0, 3, 2, 0, 2, 0, 4, 2, 0, 0, 7, 0, 0, 2, 2, 0, 3, 0, 2, 2, 0, 0, 6
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 13 2014

Keywords

Comments

A divisor m of n is a twin divisor if m-2 (for m >= 3) and m+2 (for m <= n-2) also divide n.

Examples

			The positive divisors of 20 are 1, 2, 4, 5, 10, 20. Of these, 2 and 4 are twin divisors: (2)+2 = 4, which divides n, and (4)-2 = 2 also divides n. So a(20) = the number of these divisors, which is 2.
		

Crossrefs

Programs

  • PARI
    a(n) = sumdiv(n, d, ((d>2) && !(n % (d-2))) || !(n % (d+2))); \\ Michel Marcus, Jun 25 2014

Formula

a(n) = A000005(n) - A243917(n).
a(3n) > 1 for all n >= 1.
a(A099477(n)) = 0, a(A059267(n)) > 0.
A099475(n) <= a(n) <= A000005(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = log(2)/2 + 17/12 = 1.7632402569... . - Amiram Eldar, Mar 22 2024

A099476 Smallest number having exactly n divisors d such that also d+2 is a divisor.

Original entry on oeis.org

1, 3, 15, 12, 24, 60, 180, 120, 360, 720, 1260, 840, 1680, 3360, 2520, 7560, 5040, 10080, 30240, 32760, 27720, 85680, 83160, 55440, 110880, 166320, 277200, 526680, 360360, 831600, 942480, 1053360, 1801800, 720720, 3769920, 1441440, 2162160
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 18 2004

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := DivisorSum[n, Boole@Divisible[n, #+2] &]; m = 20; a = Table[0, {m}]; c = 0; n = 2; While[c < m, f1 = f[n];  If[f1 > 0 && f1 <= m && a[[f1]] == 0, c++; a[[f1]] = n]; n++]; Join[{1}, a] (* Amiram Eldar, Sep 02 2019 *)

Formula

A099475(a(n)) = n and A099475(m) <> n for m < a(n).
Showing 1-4 of 4 results.