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.

Previous Showing 31-40 of 54 results. Next

A330936 Number of nontrivial factorizations of n into factors > 1.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 2, 0, 2, 0, 0, 0, 5, 0, 0, 1, 2, 0, 3, 0, 5, 0, 0, 0, 7, 0, 0, 0, 5, 0, 3, 0, 2, 2, 0, 0, 10, 0, 2, 0, 2, 0, 5, 0, 5, 0, 0, 0, 9, 0, 0, 2, 9, 0, 3, 0, 2, 0, 3, 0, 14, 0, 0, 2, 2, 0, 3, 0, 10, 3, 0, 0, 9, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Jan 04 2020

Keywords

Comments

The trivial factorizations of a number are (1) the case with only one factor, and (2) the factorization into prime numbers.

Examples

			The a(n) nontrivial factorizations of n = 8, 12, 16, 24, 36, 48, 60, 72:
  (2*4)  (2*6)  (2*8)    (3*8)    (4*9)    (6*8)      (2*30)    (8*9)
         (3*4)  (4*4)    (4*6)    (6*6)    (2*24)     (3*20)    (2*36)
                (2*2*4)  (2*12)   (2*18)   (3*16)     (4*15)    (3*24)
                         (2*2*6)  (3*12)   (4*12)     (5*12)    (4*18)
                         (2*3*4)  (2*2*9)  (2*3*8)    (6*10)    (6*12)
                                  (2*3*6)  (2*4*6)    (2*5*6)   (2*4*9)
                                  (3*3*4)  (3*4*4)    (3*4*5)   (2*6*6)
                                           (2*2*12)   (2*2*15)  (3*3*8)
                                           (2*2*2*6)  (2*3*10)  (3*4*6)
                                           (2*2*3*4)            (2*2*18)
                                                                (2*3*12)
                                                                (2*2*2*9)
                                                                (2*2*3*6)
                                                                (2*3*3*4)
		

Crossrefs

Positions of nonzero terms are A033942.
Positions of 1's are A030078.
Positions of 2's are A054753.
Nontrivial integer partitions are A007042.
Nontrivial set partitions are A008827.
Nontrivial divisors are A070824.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[DeleteCases[Rest[facs[n]],{_}]],{n,100}]

Formula

For prime n, a(n) = 0; for nonprime n, a(n) = A001055(n) - 2.

A341880 Number of ordered factorizations of n into 4 factors > 1.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 6, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 12, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 16, 1, 0, 0, 12, 0, 0, 0, 4, 0, 12, 0, 0, 0, 0, 0, 40, 0, 0, 0, 6, 0, 0, 0, 4, 0, 0, 0, 28, 0, 0, 0, 16
Offset: 16

Views

Author

Ilya Gutkovskiy, Feb 22 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; series(x*(1+add(b(n/d),
          d=numtheory[divisors](n) minus {1, n})), x, 5)
        end:
    a:= n-> coeff(b(n), x, 4):
    seq(a(n), n=16..112);  # Alois P. Heinz, Feb 22 2021
  • Mathematica
    b[n_] := b[n] = Series[x*(1 + Sum[b[n/d],
         {d, Divisors[n] ~Complement~ {1, n}}]), {x, 0, 5}];
    a[n_] := Coefficient[b[n], x, 4];
    Table[a[n], {n, 16, 112}] (* Jean-François Alcover, Feb 28 2022, after Alois P. Heinz *)

Formula

Dirichlet g.f.: (zeta(s) - 1)^4.
a(n) = 6 * A000005(n) - 4 * A007425(n) + A007426(n) - 4 for n > 1.

A341881 Number of ordered factorizations of n into 5 factors > 1.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 15
Offset: 32

Views

Author

Ilya Gutkovskiy, Feb 22 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; series(x*(1+add(b(n/d),
          d=numtheory[divisors](n) minus {1, n})), x, 6)
        end:
    a:= n-> coeff(b(n), x, 5):
    seq(a(n), n=32..128);  # Alois P. Heinz, Feb 22 2021
  • Mathematica
    b[n_] := b[n] = Series[x*(1 + Sum[b[n/d],
         {d, Divisors[n] ~Complement~ {1, n}}]), {x, 0, 6}];
    a[n_] := Coefficient[b[n], x, 5];
    Table[a[n], {n, 32, 128}] (* Jean-François Alcover, Feb 28 2022, after Alois P. Heinz *)

Formula

Dirichlet g.f.: (zeta(s) - 1)^5.
a(n) = -10 * A000005(n) + 10 * A007425(n) - 5 * A007426(n) + A061200(n) + 5 for n > 1.

A341882 Number of ordered factorizations of n into 6 factors > 1.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6
Offset: 64

Views

Author

Ilya Gutkovskiy, Feb 22 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; series(x*(1+add(b(n/d),
          d=numtheory[divisors](n) minus {1, n})), x, 7)
        end:
    a:= n-> coeff(b(n), x, 6):
    seq(a(n), n=64..160);  # Alois P. Heinz, Feb 22 2021
  • Mathematica
    b[n_] := b[n] = Series[x*(1 + Sum[b[n/d],
         {d, Divisors[n]~Complement~{1, n}}]), {x, 0, 7}];
    a[n_] := Coefficient[b[n], x, 6];
    Table[a[n], {n, 64, 160}] (* Jean-François Alcover, Feb 28 2022, after Alois P. Heinz *)

Formula

Dirichlet g.f.: (zeta(s) - 1)^6.
a(n) = 15 * A000005(n) - 20 * A007425(n) + 15 * A007426(n) - 6 * A061200(n) + A034695(n) - 6 for n > 1.

A378199 Number of digit patterns of length n such that all integers of that digital type share a common prime factor of a different digital type.

Original entry on oeis.org

0, 0, 1, 4, 1, 26, 1, 175, 365, 1513, 1, 52611, 989, 426897, 3072870, 11132038, 1, 879525398, 316025138
Offset: 1

Views

Author

Dmytro Inosov, Nov 19 2024

Keywords

Comments

a(n) gives the number of distinct digit patterns (or digital types, as per A266946) such that all integers of that digital type share a common prime factor of a different digital type.
The number of remaining digit patterns not counted toward a(n) is given by A376918(n).
A particular digit pattern of length n is counted toward a(n) if it is not counted toward A376918(n).
All digital types counted toward a(n) result in composites for any values of the distinct digits in the pattern, without the need to run primality tests on all numbers of that digital type individually.
The requirement for a divisor of a different digital type only affects reprigits of the form AA..AA and acts to exclude that pattern iff the n-repunit is prime (n in A004023).
A164864(n) gives the total number of possible digit patterns of length n and is therefore an upper bound for a(n).
a(n) is nonmonotonic and takes on small values for prime n and large values for n with a large number of nontrivial divisors (A070824). This is a consequence of divisibility rules that are formulated for prime divisors of 10^r-1 or 10^r+1 (where r divides n) in terms of the sum or alternating sum of r-digit blocks, respectively [see S. Shirali, First Steps in Number Theory: A Primer on Divisibility, Universities Press, 2019, pp. 42-49].
a(n) coincides with row sums of T(n,k) in A378761 for n = 3, 4, 5, 6, 7, 8, 9, 11, 12, 14, 15, 17, 18. - Dmytro Inosov, Dec 23 2024

Examples

			For n=2, there are only two possible digit patterns, "AA" and "AB". Neither of them is counted toward a(2) because the common prime factor of all integers with the pattern "AA" is 11, which is a prime repunit and is therefore of the same digital type "AA", whereas integers of the digital type "AB" have no common prime factors. Indeed, AB = 10*A + 1*B, and GCD(10,1)=1.
For n=3, the repdigit pattern "AAA" is counted toward a(3) because the repunit 111 is not a prime, hence all integers of the digital type "AAA" are divisible by prime factors of 111, which are 3 and 37, both of a different digital type from "AAA".
Counterexample: The digit pattern "ABA" is not counted toward a(3) because ABA = 101*A + 10*B, and since GCD(101,10) = 1, this digital type has no common prime factors.
The pattern "ABAB" is counted toward a(4) because it is divisible by 101 for any A > 0 and B >= 0, and 101 has a different digital type from ABAB. Indeed, ABAB = A*1010 + B*101, which is identically divisible by 101. In total there are four 4-digit patterns that are counted: ABBA, AABB, AAAA (all of them divisible by 11) and ABAB (divisible by 101). Therefore, a(4) = 4.
The pattern "ABCDEFGHIJ" that contains all possible digits exactly once is counted toward a(10) because its sum of digits is 1+2+...+9 = 45, which is divisible by 9. Therefore, all integers with the digital type "ABCDEFGHIJ" share the common prime factor 3.
		

Crossrefs

Programs

  • Mathematica
    MinLength = 1; MaxLength = 12; (* the range of n to calculate a(n) for *)
    (* Function that calculates the canonical form A358497(n) *)
    A358497[k_] := FromDigits@a358497C[k]
    a358497C = Compile[{{k, _Integer}}, Module[{firstpos = ConstantArray[0, 10],
      digits = IntegerDigits[k], indx = 0}, Table[If[firstpos[[digits[[j]] + 1]] == 0, firstpos[[digits[[j]] + 1]] = Mod[++indx,10]]; firstpos[[digits[[j]] + 1]], {j, Length[digits]}]]];
    (* Function that checks if a common prime factor of a different digital type exists *)
    DivisibilityRulesQ[pat_] := (
      If[Divisible[Length[pat], 10] && Length[Counts[pat]] == 10 &&
         AllTrue[Table[Counts[pat][[i]] == Length[pat]/10, {i, 1, 10}], TrueQ], Return[True]];
      (# != 1) && AnyTrue[Extract[# // FactorInteger, {All, 1}],
         A358497[#] != A358497[pat // FromDigits] &] &[
         Apply[GCD, Total[10^(Position[Reverse[pat], #]-1) // Flatten]& /@
         Mod[Range[CountDistinct[pat]], 10]]]);
    (* Function that generates all patterns that satisfy divisibility rules *)
    Patterns[len_, k_] := (
      Clear[dfs];
      ResultingPatterns = {};
      dfs[number_List] := If[Length[number] == len,
        If[Length[Union[If[# < 10, #, 0] & /@ number]] == k,
          AppendTo[ResultingPatterns, If[# < 10, #, 0] & /@ number]],
        Do[If[i <= 10, dfs[Append[number, i]]], {i, Range[1, Last[Union[number]] + 1]}]];
      dfs[{1}];
      FromDigits /@ Select[ResultingPatterns, DivisibilityRulesQ[#] &]);
    (* Counting the patterns with k distinct digits and their row sums a(n) *)
    Do[Print[{n, #, Sum[#[[m]], {m, 1, Length[#]}]}] &[Table[Length[Patterns[n, j]], {j, 1, Min[10, n]}]], {n, MinLength, MaxLength}];

Formula

a(n) = A164864(n) - A376918(n).
a(n) = A164864(n) - A267013(n) - A377727(n).
a(n) <= A164864(n).

Extensions

a(15)-a(19) from Dmytro Inosov, Dec 23 2024

A264440 Row lengths of the irregular triangle A137510 (number of divisors d of n with 1 < d < n, or 0 if no such d exists).

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Jan 16 2016

Keywords

Comments

See A032741 for the number of divisors d of n with 1 <= d < n, n >= 1.
See A070824 for the number of the divisors d of n with 1 < d < n, n >= 1.

Crossrefs

Programs

Formula

a(1) = 1; a(n) = 1 if n is prime, otherwise a(n) = A070824(n).
a(1) = 1; a(n) = 1 if n is prime, otherwise a(n) = A032741(n) - 1.
a(n) = max(1, A000005(n)-2). - Robert Israel, Jan 20 2016

A331979 Number of compositions (ordered partitions) of n into distinct nontrivial divisors of n.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 894, 0, 0, 0, 24, 0, 6, 0, 0, 0, 0, 0, 894, 0, 0, 0, 0, 0, 30, 0, 120, 0, 0, 0, 19518, 0, 0, 0, 0, 0, 126, 0, 0, 0, 0, 0, 18558, 0, 0, 0, 0, 0, 6, 0, 864
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 03 2020

Keywords

Examples

			a(12) = 6 because we have [6, 4, 2], [6, 2, 4], [4, 6, 2], [4, 2, 6], [2, 6, 4] and [2, 4, 6].
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= proc(n) local b, l; l:= sort([(divisors(n) minus {1, n})[]]):
          b:= proc(m, i, p) option remember; `if`(m=0, p!, `if`(i<1, 0,
                 b(m, i-1, p)+`if`(l[i]>m, 0, b(m-l[i], i-1, p+1))))
              end; forget(b):
          b(n, nops(l), 0)
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Feb 03 2020
  • Mathematica
    a[n_] := If[n == 0, 1, Module[{b, l = Divisors[n] ~Complement~ {1, n}}, b[m_, i_, p_] := b[m, i, p] = If[m == 0, p!, If[i < 1, 0, b[m, i-1, p] + If[l[[i]] > m, 0, b[m - l[[i]], i-1, p+1]]]]; b[n, Length[l], 0]]];
    a /@ Range[0, 100] (* Jean-François Alcover, Nov 17 2020, after Alois P. Heinz *)

A335021 a(n) = Sum_{d|n, 1 < d < n} (-1)^(d + 1).

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, May 19 2020

Keywords

Comments

Number of odd nontrivial divisors of n minus number of even nontrivial divisors of n.

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, (-1)^(# + 1) &, 1 < # < n &], {n, 1, 88}]
    nmax = 88; CoefficientList[Series[Sum[(-1)^(k + 1) x^(2 k)/(1 - x^k), {k, 2, nmax}], {x, 0, nmax}], x] // Rest
  • PARI
    a(n) = sumdiv(n, d, if ((d>1) && (dMichel Marcus, May 20 2020
    
  • Python
    from sympy import divisor_count
    def A335021(n): return 0 if n == 1 else (1-(m:=(~n & n-1).bit_length()))*divisor_count(n>>m)-((n&1)<<1) # Chai Wah Wu, Jul 01 2022

Formula

G.f.: Sum_{k>=2} (-1)^(k + 1) * x^(2*k) / (1 - x^k).
G.f.: - Sum_{k >= 2} x^(2*k)/(1 + x^k). - Peter Bala, Jan 12 2021
a(n) = A001227(n)*(1 - A007814(n)) - 1 + (-1)^n, if n > 1. - Sebastian Karlsson, Jan 14 2021

A337106 Number of nontrivial divisors of n!.

Original entry on oeis.org

0, 0, 0, 2, 6, 14, 28, 58, 94, 158, 268, 538, 790, 1582, 2590, 4030, 5374, 10750, 14686, 29374, 41038, 60798, 95998, 191998, 242878, 340030, 532222, 677374, 917278, 1834558, 2332798, 4665598, 5529598, 7864318, 12165118, 16422910, 19595518, 39191038, 60466174
Offset: 0

Views

Author

Gus Wiseman, Aug 23 2020

Keywords

Comments

A divisor of n is trivial if it is 1 or n.

Examples

			The a(3) = 2 through a(5) =14 nontrivial divisions:
  6/2  24/2   120/2
  6/3  24/3   120/3
       24/4   120/4
       24/6   120/5
       24/8   120/6
       24/12  120/8
              120/10
              120/12
              120/15
              120/20
              120/24
              120/30
              120/40
              120/60
		

Crossrefs

A070824 counts nontrivial divisors.
A153823 counts proper divisors of n!.
A337107 has this sequence as column k = 3.
A000005 counts divisors.
A000142 lists factorial numbers.
A001055 counts factorizations.
A027423 counts divisors of factorial numbers.
A067824 counts chains of divisors starting with n.
A074206 counts chains of divisors from n to 1.
A076716 counts factorizations of factorial numbers.
A253249 counts chains of divisors.
A337071 counts chains of divisors starting with n!.
A337105 counts chains of divisors from n! to 1.

Programs

  • Mathematica
    Table[Length[DeleteCases[Divisors[n!],1|n!]],{n,10}]
  • Python
    from sympy import factorial, divisor_count
    def A337106(n):
        return 0 if n <= 1 else divisor_count(factorial(n))-2 # Chai Wah Wu, Aug 24 2020

Formula

a(n) = A000005(n!) - 2 for n > 1.
a(n) = A070824(n!).

Extensions

a(0) from Chai Wah Wu, Aug 24 2020

A339343 Abundant pseudoperfect numbers k such that no subset of the nontrivial divisors {d|k : 1 < d < k} sums to k.

Original entry on oeis.org

20, 88, 104, 272, 304, 350, 368, 464, 572, 650, 1184, 1312, 1376, 1504, 1696, 1888, 1952, 3770, 4288, 4544, 4672, 5056, 5312, 5696, 5704, 5810, 6208, 6464, 6592, 6790, 6808, 6848, 6976, 7144, 7232, 7630, 7910, 8024, 8056, 9590, 9730, 10744, 11096, 11288, 13192
Offset: 1

Views

Author

Amiram Eldar, Nov 30 2020

Keywords

Comments

Numbers that are the sum of a proper subset of their aliquot divisors but are not the sum of any subset of their nontrivial divisors.
The perfect numbers (A000396) which are a subset of the pseudoperfect numbers (A005835) are excluded from this sequence since otherwise they would all be trivial terms: if k is a perfect number then the sum of the divisors {d|k : 1 < d < k} is k-1, so any subset of them has a sum smaller than k.
The pseudoperfect numbers are thus a disjoint union of the perfect numbers, this sequence, and A136446.
The abundant numbers (A005101) are a disjoint union of the weird numbers (A006037), this sequence, and A136446.
All the terms are primitive pseudoperfect (A006036), since if k*m is a pseudoperfect number with k > 1, and m also pseudoperfect, then it is a sum of a subset of its divisors, all of which are multiples of k and therefore larger than 1.
This sequence is infinite. If p is an odd prime that is not a Mersenne prime (A000668), and k is the least number such that 2^k * p is an abundant number (A005101; i.e., the least k such that 2^(k+1) - 1 > p), then 2^k * p is a term (these are the nonperfect terms of A308710). If 2^k * p was not a term, then since it has only 2 odd divisors (1 and p), it would be equal to a sum of its even divisors (if 1 is not in the sum then p also cannot be in it). This would make 2^(k-1) * p also a pseudoperfect number, but by definition of k, 2^(k-1) * p is a deficient number (A005100).
If k is an even abundant number with abundance (A033880) 2, i.e., sigma(k) = A000203(k) = 2*k + 2, then k is a term.
a(157) = A122036(1) = 351351 is the least (and currently the only known) odd term.

Examples

			20 is a term since it is a pseudoperfect number, 20 = 1 + 4 + 5 + 10, and the set of nontrivial divisors of 20, {d|20 : 1 < d < 20} = {2, 4, 5, 10}, has no subset that sums to 20.
		

Crossrefs

Programs

  • Mathematica
    psQ[n_] := DivisorSigma[1, n] > 2*n && Module[{d = Most@Divisors[n], x}, SeriesCoefficient[Series[Product[1 + x^d[[i]], {i, Length[d]}], {x, 0, n}], n] > 0 && SeriesCoefficient[Series[Product[1 + x^d[[i]], {i, 2, Length[d]}], {x, 0, n}], n] == 0 ]; Select[Range[2000], psQ]
Previous Showing 31-40 of 54 results. Next