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

A099475 Number of divisors d of n such that d+2 is also a divisor of n.

Original entry on oeis.org

0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 3, 0, 0, 2, 1, 0, 1, 0, 1, 1, 0, 0, 4, 0, 0, 1, 1, 0, 2, 0, 1, 1, 0, 1, 3, 0, 0, 1, 2, 0, 1, 0, 1, 2, 0, 0, 4, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 5, 0, 0, 2, 1, 0, 1, 0, 1, 1, 1, 0, 4, 0, 0, 2, 1, 0, 1, 0, 2, 1, 0, 0, 4, 0, 0, 1, 1, 0, 2, 0, 1, 1, 0, 0, 4, 0, 0, 2, 1, 0, 1, 0, 1, 3
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 18 2004

Keywords

Comments

Number of r X s rectangles with integer sides such that r < s, r + s = 2n, r | s and (s - r) | (s * r). - Wesley Ivan Hurt, Apr 24 2020

Crossrefs

Cf. A007862 (similar but with d+1 instead).

Programs

  • Maple
    A099475:= proc(n)
    local d;
      d:= numtheory:-divisors(n);
    nops(d intersect map(`+`,d,2))
    end proc:
    map(A099475,[$1..1000]); # Robert Israel, Jun 19 2015
  • Mathematica
    a[n_] := DivisorSum[n, Boole[Divisible[n, #+2]]&]; Array[a, 105] (* Jean-François Alcover, Dec 07 2015 *)
  • PARI
    A099475(n) = { sumdiv(n, d, ! (n % (d+2))) } \\ Michel Marcus, Jun 18 2015

Formula

0 <= a(n) <= a(m*n) for all m>0;
a(A099477(n)) = 0; a(A059267(n)) > 0;
a(A099476(n)) = n and a(m) <> n for m < A099476(n).
For n>0: a(A008585(n))>0, a(A008586(n))>0 and a(A008588(n))>0.
a(n) = Sum_{i=1..n-1} chi((2*n-i)/i) * chi(i*(2*n-i)/(2*n-2*i)), where chi(n) = 1 - ceiling(n) + floor(n). - Wesley Ivan Hurt, Apr 24 2020

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

A108118 Integers not divisible by 3 or 4.

Original entry on oeis.org

1, 2, 5, 7, 10, 11, 13, 14, 17, 19, 22, 23, 25, 26, 29, 31, 34, 35, 37, 38, 41, 43, 46, 47, 49, 50, 53, 55, 58, 59, 61, 62, 65, 67, 70, 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
Offset: 1

Views

Author

Zak Seidov, Jun 04 2005

Keywords

Comments

Or, numbers congruent to {1, 2, 5, 7, 10, 11} mod 12 (cf. A007310). Expand (x+x^2+x^5+x^7+x^10+x^11)/(1-x^12) (cf. A007310). All terms, except 35 and 70, are also in A099477.

Crossrefs

Programs

  • Magma
    [n : n in [0..150] | n mod 12 in [1, 2, 5, 7, 10, 11]]; // Wesley Ivan Hurt, Jul 22 2016
  • Maple
    A108118:=n->12*floor(n/6)+[1, 2, 5, 7, 10, 11][(n mod 6)+1]: seq(A108118(n), n=0..100); # Wesley Ivan Hurt, Jul 22 2016
  • Mathematica
    Select[ Range[132], !IntegerQ[ #/4] && !IntegerQ[ #/3] &] (* or *) Flatten[ NestList[12 + # &, {1, 2, 5, 7, 10, 11}, 10]]

Formula

G.f.: x*(1+x^2)^2 / ( (1+x)*(x^2-x+1)*(x-1)^2 ). - R. J. Mathar, Oct 25 2011
From Wesley Ivan Hurt, Jul 22 2016: (Start)
a(n) = 2*a(n-1) - a(n-2) - a(n-3) + 2*a(n-4) - a(n-5) for n>5.
a(n) = a(n-6) + 12 for n>6.
a(n) = (6*n - 3 + cos(n*Pi/3) - cos(n*Pi) - sqrt(3)*sin(n*Pi/3))/3.
a(6k) = 12k-1, a(6k-1) = 12k-2, a(6k-2) = 12k-5, a(6k-3) = 12k-7, a(6k-4) = 12k-10, a(6k-5) = 12k-11. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = (4-sqrt(3))*Pi/12. - Amiram Eldar, Jan 01 2022
Showing 1-4 of 4 results.