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.

A258409 Greatest common divisor of all (d-1)'s, where the d's are the positive divisors of n.

Original entry on oeis.org

1, 2, 1, 4, 1, 6, 1, 2, 1, 10, 1, 12, 1, 2, 1, 16, 1, 18, 1, 2, 1, 22, 1, 4, 1, 2, 1, 28, 1, 30, 1, 2, 1, 2, 1, 36, 1, 2, 1, 40, 1, 42, 1, 2, 1, 46, 1, 6, 1, 2, 1, 52, 1, 2, 1, 2, 1, 58, 1, 60, 1, 2, 1, 4, 1, 66, 1, 2, 1, 70, 1, 72, 1, 2, 1, 2, 1, 78, 1
Offset: 2

Views

Author

Ivan Neretin, May 29 2015

Keywords

Comments

a(n) = 1 for even n; a(p) = p-1 for prime p.
a(n) is even for odd n (since all divisors of n are odd).
It appears that a(n) = A052409(A005179(n)), i.e., it is the largest integer power of the smallest number with exactly n divisors. - Michel Marcus, Nov 10 2015
Conjecture: GCD of all (p-1) for prime p|n. - Thomas Ordowski, Sep 14 2016
Conjecture is true, because the set of numbers == 1 (mod g) is closed under multiplication. - Robert Israel, Sep 14 2016
Conjecture: a(n) = A289508(A328023(n)) = GCD of the differences between consecutive divisors of n. See A328163 and A328164. - Gus Wiseman, Oct 16 2019

Examples

			65 has divisors 1, 5, 13, and 65, hence a(65) = gcd(1-1,5-1,13-1,65-1) = gcd(0,4,12,64) = 4.
		

Crossrefs

Cf. A084190 (similar but with LCM).
Looking at prime indices instead of divisors gives A328167.
Partitions whose parts minus 1 are relatively prime are A328170.

Programs

  • Haskell
    a258409 n = foldl1 gcd $ map (subtract 1) $ tail $ a027750_row' n
    -- Reinhard Zumkeller, Jun 25 2015
  • Maple
    f:= n -> igcd(op(map(`-`,numtheory:-factorset(n),-1))):
    map(f, [$2..100]); # Robert Israel, Sep 14 2016
  • Mathematica
    Table[GCD @@ (Divisors[n] - 1), {n, 2, 100}]
  • PARI
    a(n) = my(g=0); fordiv(n, d, g = gcd(g, d-1)); g; \\ Michel Marcus, May 29 2015
    
  • PARI
    a(n) = gcd(apply(x->x-1, divisors(n))); \\ Michel Marcus, Nov 10 2015
    
  • PARI
    a(n)=if(n%2==0, return(1)); if(n%3==0, return(2)); if(n%5==0 && n%4 != 1, return(2)); gcd(apply(p->p-1, factor(n)[,1])) \\ Charles R Greathouse IV, Sep 19 2016
    

A328170 Number of integer partitions of n whose parts minus 1 are relatively prime.

Original entry on oeis.org

0, 0, 1, 1, 2, 3, 5, 8, 12, 18, 27, 38, 53, 74, 102, 137, 184, 241, 317, 413, 536, 687, 880, 1112, 1405, 1765, 2215, 2755, 3424, 4229, 5216, 6402, 7847, 9572, 11662, 14148, 17139, 20688, 24940, 29971, 35969, 43044, 51438, 61311, 72985, 86678, 102807, 121675
Offset: 0

Views

Author

Gus Wiseman, Oct 09 2019

Keywords

Comments

A partition is relatively prime if the GCD of its parts is 1. Zeros are ignored when computing GCD, and the empty set has GCD 0.

Examples

			The a(2) = 1 through a(9) = 18 partitions:
  (2)  (21)  (22)   (32)    (42)     (43)      (62)       (54)
             (211)  (221)   (222)    (52)      (332)      (63)
                    (2111)  (321)    (322)     (422)      (72)
                            (2211)   (421)     (431)      (432)
                            (21111)  (2221)    (521)      (522)
                                     (3211)    (2222)     (621)
                                     (22111)   (3221)     (3222)
                                     (211111)  (4211)     (3321)
                                               (22211)    (4221)
                                               (32111)    (4311)
                                               (221111)   (5211)
                                               (2111111)  (22221)
                                                          (32211)
                                                          (42111)
                                                          (222111)
                                                          (321111)
                                                          (2211111)
                                                          (21111111)
		

Crossrefs

The Heinz numbers of these partitions are given by A328168.
Partitions whose parts are relatively prime are A000837.
Partitions whose parts plus 1 are relatively prime are A318980.
The GCD of the prime indices of n, all minus 1, is A328167(n).

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],GCD@@(#-1)==1&]],{n,0,30}]
  • PARI
    seq(n)=Vec(sum(d=1, n-1, moebius(d)*(-1/(1-x) + 1/prod(k=0, n\d, 1 - x*x^(k*d) + O(x*x^n)))), -(n+1)) \\ Andrew Howroyd, Oct 17 2019

Formula

G.f.: Sum_{d>=1} mu(d)*(-1/(1-x) + 1/(Prod_{k>=0} 1 - x^(k*d + 1))). - Andrew Howroyd, Oct 17 2019

A328167 GCD of the prime indices of n, all minus 1.

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 3, 0, 1, 2, 4, 1, 5, 3, 1, 0, 6, 1, 7, 2, 1, 4, 8, 1, 2, 5, 1, 3, 9, 1, 10, 0, 1, 6, 1, 1, 11, 7, 1, 2, 12, 1, 13, 4, 1, 8, 14, 1, 3, 2, 1, 5, 15, 1, 2, 3, 1, 9, 16, 1, 17, 10, 1, 0, 1, 1, 18, 6, 1, 1, 19, 1, 20, 11, 1, 7, 1, 1, 21, 2, 1, 12
Offset: 1

Views

Author

Gus Wiseman, Oct 08 2019

Keywords

Comments

Zeros are ignored when computing GCD, and the empty set has GCD 0.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			85 has prime indices {3,7}, so a(85) = GCD(2,6) = 2.
		

Crossrefs

Positions of 0's are A000079.
Positions of 1's are A328168.
Positions of records (first appearances) are A006005.
The GCD of the prime indices of n is A289508(n).
The GCD of the prime indices of n, all plus 1, is A328169(n).
Looking at divisors instead of prime indices gives A258409.
Partitions whose parts minus 1 are relatively prime are A328170.

Programs

  • Mathematica
    Table[GCD@@(PrimePi/@First/@If[n==1,{},FactorInteger[n]]-1),{n,100}]

A328163 Number of integer partitions of n whose unsigned differences have a different GCD than the GCD of their parts all minus 1.

Original entry on oeis.org

0, 0, 1, 1, 2, 1, 4, 2, 5, 5, 9, 5, 15, 9, 19, 16, 28, 16, 44, 21, 55, 38, 73, 34, 109, 46, 130, 73, 170, 66, 251, 78, 287, 137, 364, 119, 522, 135, 590, 236, 759, 190, 1042, 219, 1175, 425, 1460, 306, 2006, 347, 2277, 671, 2780, 471, 3734, 584, 4197, 1087
Offset: 0

Views

Author

Gus Wiseman, Oct 07 2019

Keywords

Comments

Zeros are ignored when computing GCD, and the empty set has GCD 0.

Examples

			The a(2) = 1 through a(12) = 15 partitions (A = 10, B = 11, C = 12):
  (2)  (3)  (4)   (5)  (6)    (7)   (8)     (9)    (A)      (B)     (C)
            (22)       (33)   (52)  (44)    (63)   (55)     (83)    (66)
                       (42)         (62)    (72)   (64)     (92)    (84)
                       (222)        (422)   (333)  (73)     (722)   (93)
                                    (2222)  (522)  (82)     (5222)  (A2)
                                                   (442)            (444)
                                                   (622)            (552)
                                                   (4222)           (633)
                                                   (22222)          (642)
                                                                    (822)
                                                                    (3333)
                                                                    (4422)
                                                                    (6222)
                                                                    (42222)
                                                                    (222222)
		

Crossrefs

The complement to these partitions is counted by A328164.
The GCD of the divisors of n all minus 1 is A258409(n).
The GCD of the prime indices of n all minus 1 is A328167(n).
Partitions whose parts minus 1 are relatively prime are A328170.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],GCD@@Differences[#]!=GCD@@(#-1)&]],{n,0,30}]
Showing 1-4 of 4 results.