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

A060742 Number of divisors of n! which are also differences between consecutive divisors of n! (ordered by size).

Original entry on oeis.org

0, 0, 1, 2, 4, 9, 15, 27, 41, 68, 111, 218, 328, 624, 929, 1518, 2016, 3689, 4965, 9252, 13177, 20016, 30697, 56749, 69434, 94242, 149558, 190292, 258370, 492924, 615063, 1149403, 1325124, 1841343, 2737190, 3592273, 4193855, 8216492, 12668800, 17654339, 20368544
Offset: 0

Views

Author

Labos Elemer, Apr 23 2001

Keywords

Examples

			For n = 5, n! = 120; divisors = {1,2,3,4,5,6,8,10,12,15,20,24,30,40,60,120}; differences = {1,1,1,1,1,2,2,2,3,5,4,6,10,20,60}; intersection = {1,2,3,4,5,6,10,20,60}, so a(5) = 9.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local D,L;
      D:= numtheory:-divisors(n!);
      L:= sort(convert(D,list));
      nops(convert(L[2..-1]-L[1..-2],set) intersect D);
    end proc:
    map(f, [$0..34]); # Robert Israel, Jul 03 2017
  • Mathematica
    a[n_ ] := Length[Intersection[Drop[d=Divisors[n! ], 1]-Drop[d, -1], d]]
  • PARI
    a(n) = {my(v = List(), f = n!, d1 = 1, del); fordiv(f, d, if(d > 1, del = d - d1; if(!(f % del), listput(v, del)); d1 = d)); #Set(v);} \\ Amiram Eldar, Jun 15 2024

Formula

a(n) = A060741(n!/2) for n >= 2. - Amiram Eldar, Jun 15 2024

Extensions

Edited by Dean Hickerson, Jan 22 2002
One more term from Robert G. Wilson v, Jan 29 2002
a(33)-a(35) from Robert Israel, Jul 03 2017
a(36)-a(40) from Amiram Eldar, Jun 15 2024

A060764 Number of divisors of n which are not also differences between consecutive divisors (ordered by increasing magnitude) of n.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Apr 24 2001

Keywords

Examples

			For n=70, divisors={1,2,5,7,10,14,35,70}; differences={1,3,2,3,4,21,35}; the divisors {5,7,10,14,70} are not differences, so a(70)=5.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Length[Complement[d=Divisors[n], Drop[d, 1]-Drop[d, -1]]]
  • PARI
    A060764(n) = { my(divs=divisors(n), diffs=vecsort(vector(#divs-1,i,divs[i+1]-divs[i]), ,8), c=#divs); for(i=1,#diffs,if(!(n%diffs[i]),c--)); (c); }; \\ Antti Karttunen, Sep 21 2018
    
  • Python
    from itertools import pairwise
    from sympy import divisors
    def A060764(n):
        e = map(lambda x:x[1]-x[0],pairwise(d:=divisors(n)))
        return len(set(d)-set(e)) # Chai Wah Wu, Feb 21 2023

Extensions

Edited by Dean Hickerson, Jan 22 2002

A138652 Number of differences (not all necessarily distinct) between consecutive divisors of 2n which are also divisors of 2n.

Original entry on oeis.org

1, 2, 3, 3, 2, 5, 2, 4, 5, 5, 2, 7, 2, 4, 6, 5, 2, 8, 2, 6, 7, 4, 2, 9, 3, 4, 7, 5, 2, 11, 2, 6, 6, 4, 3, 11, 2, 4, 6, 7, 2, 10, 2, 6, 10, 4, 2, 11, 3, 8, 6, 6, 2, 11, 5, 6, 6, 4, 2, 15, 2, 4, 9, 7, 4, 9, 2, 6, 6, 8, 2, 14, 2, 4, 9, 6, 2, 11, 2, 8, 9, 4, 2, 15, 4, 4, 6, 6, 2, 17, 3, 6, 6, 4, 4, 13, 2, 6, 9
Offset: 1

Views

Author

Leroy Quet, May 15 2008

Keywords

Comments

For n = any odd positive integer, there are no differences (between consecutive divisors of n) that divide n.

Examples

			From _Antti Karttunen_, Feb 20 2023: (Start)
Divisors of 2*12 = 24 are: [1, 2, 3, 4, 6, 8, 12, 24]. Their first differences are: [1, 1, 1, 2, 2, 4, 12], all 7 which are divisors of 24, thus a(12) = 7.
Divisors of 2*35 = 70 are: [1, 2, 5, 7, 10, 14, 35, 70]. Their first differences are: 1, 3, 2, 3, 4, 21, 35, of which 1, 2 and 35 are divisors of 70, thus a(35) = 3.
Divisors of 2*65 = 130 are: [1, 2, 5, 10, 13, 26, 65, 130]. Their first differences are: 1, 3, 5, 3, 13, 39, 65, of which 1, 5, 13 and 65 are divisors of 130, thus a(65) = 4.
(End)
		

Crossrefs

Programs

  • Maple
    A138652 := proc(n) local a,dvs,i ; a := 0 ; dvs := sort(convert(numtheory[divisors](2*n),list)) ; for i from 2 to nops(dvs) do if (2*n) mod ( op(i,dvs)-op(i-1,dvs) ) = 0 then a := a+1 ; fi ; od: a ; end: seq(A138652(n),n=1..120) ; # R. J. Mathar, May 20 2008
  • Mathematica
    a = {}; For[n = 2, n < 200, n = n + 2, b = Table[Divisors[n][[i + 1]] - Divisors[n][[i]], {i, 1, Length[Divisors[n]] - 1}]; AppendTo[a, Length[Select[b, Mod[n, # ] == 0 &]]]]; a (* Stefan Steinerberger, May 18 2008 *)
  • PARI
    A138652(n) = { n = 2*n; my(d=divisors(n), erot = vector(#d-1, k, d[k+1] - d[k])); sum(i=1,#erot,!(n%erot[i])); }; \\ Antti Karttunen, Feb 20 2023

Formula

a(n) + A360118(2n) = A000005(2n)-1, i.e., a(n) = A066660(n) - A360118(2*n). - Reference to a wrong A-number replaced with A360118 by Antti Karttunen, Feb 20 2023

Extensions

More terms from Stefan Steinerberger and R. J. Mathar, May 18 2008
Definition edited and clarified by Antti Karttunen, Feb 20 2023

A060654 a(n) = gcd(n, A060766(n)).

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 4, 3, 5, 1, 6, 1, 7, 5, 8, 1, 9, 1, 10, 7, 11, 1, 12, 5, 13, 9, 14, 1, 30, 1, 16, 11, 17, 7, 18, 1, 19, 13, 20, 1, 21, 1, 22, 15, 23, 1, 24, 7, 25, 17, 26, 1, 27, 11, 28, 19, 29, 1, 60, 1, 31, 21, 32, 13, 33, 1, 34, 23, 70, 1, 36, 1, 37, 25, 38, 11, 39, 1, 40, 27, 41
Offset: 2

Views

Author

Labos Elemer, Apr 25 2001

Keywords

Examples

			If n is prime p, then A060766(p) = p-1 and lcm(p, p-1) = 1. If n=2k then a(2k)=k or as an "anomaly", a(2k)=2k.
At n=30, D={1, 2, 3, 5, 6, 10, 15, 30}, dD={1, 1, 2, 1, 4, 5, 15}={1, 2, 4, 5, 15}, lcm(dD)=60, gcd(n, lcm(dD(n))) = gcd(30, 60) = 30 = n.
At n=36, D={1, 2, 3, 4, 6, 9, 12, 18, 36}, dD={1, 1, 1, 2, 3, 3, 6, 18}={1, 2, 3, 6, 18}, lcm(dD)=18, gcd(n, lcm(dD(n))) = gcd(36, 18) = 18 = n/2.
		

Crossrefs

Programs

  • Maple
    A060766:= proc(n) local F; F:= sort(convert(numtheory:-divisors(n),list));
       ilcm(op(F[2..-1] - F[1..-2])) end proc:
    seq(igcd(n,A060766(n)),n=2..100); # Robert Israel, Dec 20 2015
  • Mathematica
    Table[GCD[n, LCM @@ Differences@ Divisors@ n], {n, 2, 82}] (* Michael De Vlieger, Dec 20 2015 *)

Formula

a(n) = gcd(n, lcm(dd(n))), where dd(n) is the first difference of divisors (ordered by size).

A060695 a(n) = gcd(2n, A060766(2n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 30, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 60, 31, 32, 33, 34, 70, 36, 37, 38, 39, 40, 41, 42, 43, 44, 90, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 126, 64, 65, 66, 67, 68, 69, 140, 71
Offset: 1

Views

Author

Labos Elemer, Apr 25 2001

Keywords

Examples

			n = 30: D = {1, 2, 3, 5, 6, 10, 15, 30}, dD = {1, 1, 2, 1, 4, 5, 15}={1, 2, 4, 5, 15}, lcm(dD) = 60, gcd(n, lcm(dD(n))) = gcd(30, 60) = 30 = n
n = 36: D = {1, 2, 3, 4, 6, 9, 12, 18, 36}, dD = {1, 1, 1, 2, 3, 3, 6, 18} = {1, 2, 3, 6, 18}, lcm(dD) = 18, gcd(n, lcm(dD(n))) = gcd(36, 18) = 18 = n/2.
		

Crossrefs

Programs

  • Mathematica
    Table[GCD[2 n, LCM @@ Differences@ Divisors[2 n]], {n, 71}] (* Michael De Vlieger, Dec 20 2015 *)
  • PARI
    a(n) = my(d=divisors(2*n), dd = vector(#d-1, k, d[k+1] - d[k])); gcd(2*n, lcm(dd)); \\ Michel Marcus, Mar 22 2020

Formula

a(n) = a(2k) is either n = 2k or n/2 = k. a(n) = n/2 seems regular, a(n) = n seems "anomalous".

A060700 "Anomalous" numbers k such that for even numbers 2k, gcd(2k, lcm(dd(2k)))=2k and not k, where dd(2k) is the first difference set of divisors of 2k.

Original entry on oeis.org

15, 30, 35, 45, 63, 70, 75, 77, 91, 99, 105, 117, 126, 135, 140, 143, 150, 153, 154, 165, 175, 182, 187, 189, 195, 198, 209, 221, 225, 231, 234, 245, 247, 252, 255, 273, 280, 285, 286, 297, 299, 306, 308, 315, 323, 325, 330, 345, 350, 351, 357, 364, 374, 375
Offset: 1

Views

Author

Labos Elemer, Apr 25 2001

Keywords

Examples

			63 is here because for 126 = 2*63, lcm(dd(126)) = lcm(1, 1, 3, 1, 2, 5, 4, 3, 21, 21, 63) = 1260, so gcd(126, lcm(dd(126))) = gcd(126, 1260) = 126.
		

Crossrefs

Programs

  • PARI
    f(n) = {my(d = divisors(n), dd = vector(#d-1, k, d[k+1] - d[k])); gcd(n, lcm(dd));}
    isok(n) = (f(2*n) == 2*n); \\ Michel Marcus, Mar 29 2018
Showing 1-6 of 6 results.