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

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

A060765 Numbers n such that every difference between consecutive divisors (ordered by increasing magnitude) of n is also a divisor of n.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 18, 20, 24, 32, 36, 42, 48, 54, 60, 64, 72, 96, 100, 108, 120, 128, 144, 156, 162, 168, 180, 192, 216, 240, 256, 272, 288, 294, 300, 324, 342, 360, 384, 432, 480, 486, 500, 504, 512, 576, 600, 648, 720, 768, 840, 900, 960, 972, 1008, 1024
Offset: 1

Views

Author

Labos Elemer, Apr 24 2001

Keywords

Comments

Equivalently, A060763(n)=0.
Powers of 2 and factorials up to 7! are here.
For each k=1..A000005(a(n))-1 exists k' < A000005(a(n)) such that A193829(a(n),k) = A027750(a(n),k'). - Reinhard Zumkeller, Jun 25 2015
From Robert Israel, Jul 03 2017: (Start)
Also includes 3*2^k and 2*3^k for all k>= 1.
All terms except 1 are even. (End)
Conjecture: a(n) has the property that for each prime divisor p, p-1|a(n)/p. If this conjecture is true then terms can be searched by distinct prime divisors. - David A. Corneth, Jul 06 2017
The divisors of a(n) form a Brauer chain. See A079301 for the definition of a Brauer chain. - Zizheng Fang, Jan 30 2020

Examples

			For n = 12, divisors={1, 2, 3, 4, 6, 12}; differences={1, 1, 1, 2, 6}; every difference is a divisor, so 12 is in the sequence.
		

Crossrefs

Programs

  • Haskell
    import Data.List (sort, nub); import Data.List.Ordered (subset)
    a060765 n = a060765_list !! (n-1)
    a060765_list = filter
    (\x -> sort (nub $ a193829_row x) `subset` a027750_row' x) [1..]
    -- Reinhard Zumkeller, Jun 25 2015
    
  • Magma
    [k:k in [1..1025]| forall{i:i in [2..#Divisors(k)]|k mod (d[i]-d[i-1]) eq 0 where d is Divisors(k)}]; // Marius A. Burtea, Jan 30 2020
  • 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) minus D);
    end proc:
    select(f=0, [$1..1000]); # Robert Israel, Jul 03 2017
  • Mathematica
    test[n_ ] := Length[Complement[Drop[d=Divisors[n], 1]-Drop[d, -1], d]]==0; Select[Range[1, 1024], test]
    (* Second program: *)
    Select[Range[2^10], Function[n, AllTrue[Differences@ Divisors@ n, Divisible[n, #] &]]] (* Michael De Vlieger, Jul 12 2017 *)
  • PARI
    isok(n)=my(d=divisors(n), v=vecsort(vector(#d-1, k, d[k+1]-d[k]),,8)); #select(x->setsearch(d, x), v) == #v; \\ Michel Marcus, Jul 06 2017
    
  • PARI
    is(n)=my(t); fordiv(n,d, if(n%(d-t), return(0)); t=d); 1 \\ Charles R Greathouse IV, Jul 12 2017
    

Extensions

Edited by Dean Hickerson, Jan 22 2002

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

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 5, 12, 51, 92, 225, 340, 573, 1325, 2334, 6024, 8724, 13130, 21601, 46169, 67213, 106427, 178014, 242104, 338499, 727248, 988029, 1924615, 2426894, 3592164, 5817845, 8360196, 10396523, 21941765, 33649653, 48804040, 61413482, 124029358
Offset: 0

Views

Author

Labos Elemer, Apr 25 2001

Keywords

Examples

			For n up to 7 all divisor differences of n! are also divisors of n!.
For n = 8, there are 3 divisor differences of 8! = 40320 which are not divisors of 8!, namely 27, 54 and 108.
		

Crossrefs

Programs

  • Mathematica
    a[n_ ] := Length[Complement[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) = A060763(n!).

Extensions

Edited by Dean Hickerson, Jan 22 2002
More terms from Sean A. Irvine, Dec 21 2022
a(41) from Amiram Eldar, Jun 15 2024

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

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 20 2023

Keywords

Examples

			For n=70, its divisors are {1, 2, 5, 7, 10, 14, 35, 70} and their first differences are {1, 3, 2, 3, 4, 21, 35}, of which the differences {3, 3, 4, 21} are not divisors, so a(70) = 4. Note that in contrast to A060763, here the difference 3 is counted twice because there are two copies of it among the differences.
		

Crossrefs

Programs

  • PARI
    A360118(n) = { my(d=divisors(n), erot = vector(#d-1, k, d[k+1] - d[k])); sum(i=1,#erot,!!(n%erot[i])); };

Formula

For all n >= 1, A060763(n) <= a(n) < A060764(n).
a(n) = A060764(n) - A360119(n).

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