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-5 of 5 results.

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

A243984 Sum of non-twin divisors of n.

Original entry on oeis.org

1, 3, 0, 1, 6, 8, 8, 9, 9, 18, 12, 12, 14, 24, 15, 25, 18, 35, 20, 36, 28, 36, 24, 36, 31, 42, 36, 50, 30, 63, 32, 57, 44, 54, 36, 75, 38, 60, 52, 66, 42, 92, 44, 78, 69, 72, 48, 100, 57, 93, 68, 92, 54, 116, 72, 114, 76, 90, 60, 125, 62, 96, 84, 121, 84, 140, 68, 120
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 16 2014

Keywords

Comments

See A243917 for definition of non-twin divisor.

Examples

			The divisors of 40 are 1, 2, 4, 5, 8, 10, 20, 40. Of these, 1, 5, 20, 40 are non-twin divisors. So a(40) = the sum of these divisors, which is 66.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local d; d:= numtheory[divisors](n); convert(d minus map(`+`,d,2) minus map(`+`,d,-2),`+`) end proc:
    map(f, [$1..100]); # Robert Israel, Aug 17 2014
  • Mathematica
    a243984[n_Integer] := Total[Select[Divisors[n], If[And[# <= 2 || Divisible[n, # - 2] == False, Divisible[n, # + 2] == False], True, False] &]]; a243984 /@ Range[68] (* Michael De Vlieger, Aug 17 2014 *)
  • PARI
    a(n) = s=0; fordiv(n, d, if(!((d>2 && n%(d-2)==0) || (d<=n-2 && n%(d+2)==0)), s+=d)); s
    for(n=1, 200, print1(a(n), ", ")) \\ Colin Barker, Jun 29 2014

Formula

a(n) = A000203(n) - A243983(n).

A243932 Positive integers with the same number of twin divisors as non-twin divisors.

Original entry on oeis.org

6, 8, 21, 27, 33, 35, 39, 40, 45, 51, 57, 69, 72, 75, 87, 93, 96, 105, 111, 123, 129, 141, 143, 159, 168, 177, 183, 189, 201, 213, 219, 237, 249, 252, 264, 267, 291, 297, 303, 309, 312, 321, 323, 327, 339, 381, 393, 399, 411, 417, 420, 429, 447, 453, 471, 483, 489, 501
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 15 2014

Keywords

Comments

A divisor m of n is twin if the positive values of m - 2 and/or m + 2 also divides n.
A divisor k of n is non-twin if the positive values of neither k - 2 nor k + 2 divide n.

Examples

			The divisors of 40 are 1, 2, 4, 5, 8, 10, 20, 40. Of these, 2, 4, 8, 10, are twin divisors and 1, 5, 20, 40 are non-twin divisors. These are the same number of twin divisors (4) as non-twin divisors (4), so 40 is in this sequence.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Block[{d = Divisors@ n}, Length@ d == 2Length@ Select[d, MemberQ[d, # + 2] || MemberQ[d, # - 2] &]]; Select[ Range@ 520, fQ] (* Robert G. Wilson v, Jun 22 2014 *)
  • PARI
    isOK(n) = t=sumdiv(n, d, (d>2 && n%(d-2)==0) || (d<=n-2 && n%(d+2)==0)); if(t==numdiv(n)-t, 1, 0)
    s=[]; for(n=1, 600, if(isOK(n), s=concat(s, n))); s \\ Colin Barker, Jun 30 2014

Formula

A243865(a(n)) = A243917(a(n)).

Extensions

Missing term (168) inserted by Colin Barker, Jun 30 2014

A243985 Numbers n such that A243984(n), the sum of non-twin divisors of n, is a square.

Original entry on oeis.org

1, 3, 4, 8, 9, 16, 20, 22, 24, 27, 35, 48, 64, 90, 94, 115, 119, 143, 170, 171, 192, 200, 214, 216, 217, 265, 310, 322, 323, 343, 382, 497, 517, 527, 656, 679, 710, 729, 742, 745, 782, 862, 889, 899, 935, 970, 1066, 1174, 1177, 1207, 1219, 1270, 1393, 1426
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 16 2014

Keywords

Comments

See A243917 for definition of non-twin divisor.
Squares included in the sequence are : 1, 4, 9, 16, 64, 729, ...

Examples

			The positive divisors of 8 are 1, 2, 4, 8. Of these, 1 and 8 are non-twin divisors. So 8 is in this sequence, which is 1 + 8 = 3^2.
		

Crossrefs

Programs

Extensions

Several terms corrected by Colin Barker, Jun 29 2014

A244259 Number of non-twin isolated divisors of n.

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, Jun 24 2014

Keywords

Comments

Number of divisors d of n such that neither the positive values d - 2 nor d - 1 nor d + 1 nor d + 2 divide n.
An isolated divisor d is non-twin if neither the positive values d - 2 nor d + 2 divide n.

Examples

			The isolated divisors of 56 are: 4, 14, 28, 56. The non-twin divisors of 56 are: 1, 7, 8, 14, 28, 56. The non-twin isolated divisors of 56 are therefore 14, 28, 56. There are 3 of these, so a(56) = 3.
		

Crossrefs

Cf. A132881 (number of isolated divisors of n), A243917 (number of non-twin divisors of n).

Programs

  • PARI
    a(n) = sumdiv(n, d, (((d<=2) || (n % (d-2))) && ((d<=1) || (n % (d-1))) && (n % (d+1)) && (n % (d+2)))); \\ Michel Marcus, Jun 25 2014
Showing 1-5 of 5 results.