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 21-30 of 54 results. Next

A293814 Number of 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, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 5, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 18, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 13, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 10, 0, 0, 0, 1
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 16 2017

Keywords

Examples

			a(24) = 2 because 24 has 8 divisors {1, 2, 3, 4, 6, 8, 12, 24} among which 6 are nontrivial divisors {2, 3, 4, 6, 8, 12} therefore we have [12, 8, 4] and [12, 6, 4, 2].
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= proc(n) local b, l; l:= sort([(divisors(n) minus {1, n})[]]):
          b:= proc(m, i) option remember; `if`(m=0, 1, `if`(i<1, 0,
                 b(m, i-1)+`if`(l[i]>m, 0, b(m-l[i], i-1))))
              end; forget(b):
          b(n, nops(l))
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Oct 16 2017
  • Mathematica
    Table[d = Divisors[n]; Coefficient[Series[Product[1 + Boole[d[[k]] != 1 && d[[k]] != n] x^d[[k]], {k, Length[d]}], {x, 0, n}], x, n], {n, 0, 100}]
  • PARI
    A293814(n) = { if(!n,return(1)); my(p=1); fordiv(n,d,if(d>1&&dAntti Karttunen, Dec 22 2017
    
  • Scheme
    ;; Implements a simple backtracking algorithm:
    (define (A293814 n) (if (<= n 1) (- 1 n) (let ((s (list 0))) (let fork ((r n) (divs (cdr (proper-divisors n)))) (cond ((zero? r) (set-car! s (+ 1 (car s)))) ((or (null? divs) (> (car divs) r)) #f) (else (begin (fork (- r (car divs)) (cdr divs)) (fork r (cdr divs)))))) (car s))))
    (define (proper-divisors n) (reverse (cdr (reverse (divisors n)))))
    (define (divisors n) (let loop ((k n) (divs (list))) (cond ((zero? k) divs) ((zero? (modulo n k)) (loop (- k 1) (cons k divs))) (else (loop (- k 1) divs)))))
    ;; Antti Karttunen, Dec 22 2017

Formula

a(n) = [x^n] Product_{d|n, 1 < d < n} (1 + x^d).
a(n) = A211111(n) - 1 for n > 1.

A378154 Array read by rows: T(n,k) for k <= min(n,10) is the number of digital types of length n with exactly k distinct decimal digits without common prime factors of a different digital type.

Original entry on oeis.org

1, 1, 1, 0, 3, 1, 0, 4, 6, 1, 0, 15, 25, 10, 1, 0, 12, 84, 65, 15, 1, 0, 63, 301, 350, 140, 21, 1, 0, 80, 868, 1672, 1050, 266, 28, 1, 0, 171, 2745, 7770, 6951, 2646, 462, 36, 1, 0, 370, 8680, 33505, 42405, 22827, 5880, 750, 45, 0, 0, 1023, 28501, 145750, 246730, 179487, 63987, 11880, 1155, 55
Offset: 1

Views

Author

Dmytro Inosov, Nov 18 2024

Keywords

Comments

T(n,k) is defined as the number of distinct digit patterns (or digital types, as per A266946) of length n with k distinct digits such that all integers of that digital type share no common prime factor of a different digital type (as per A376918). Terms with k > n are omitted as trivial zeros.
To check whether a digit pattern of length n with k distinct digits A,B,... should be counted toward T(n,k), write that pattern as a linear combination of the form X1*A + X2*B + ..., where the pattern coefficients X1,X2,... consist of 0's and 1's (A007088), with 1's on positions of the corresponding digit in the pattern.
If GCD(X1,X2,...) has no prime divisors with a different digit pattern from the one we started from, the pattern is counted toward T(n,k). Otherwise, it is excluded.
For k = 10, the sum of all distinct digits A + B + ... + J = 45, which is divisible by 9. Hence, patterns in which all 10 distinct digits from A to J have the same number of occurrences in the pattern modulo 3 are identically divisible by 3 and should be excluded. This has an effect on T(n,10) whenever n takes the form 10m + 3q (with m >= 1 and q >= 0).
The digital types excluded in this way 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 terms with k=1, i.e. repdigits AA..AA, and acts to include that pattern iff the n-repunit is prime (n in A004023).
T(n,k) gives an upper bound for the number of contributions to A267013(n) with exactly k distinct digits.
Stirling numbers of the second kind S2(n,k) (A008277) give the total number of possible digital types of length n with k distinct digits and are therefore an upper bound for T(n,k).
T(n,1)=1 either when n=1 or when n is a term in A004023 (indices of prime repunits); otherwise T(n,1)=0 because all the repdigits A*(10^n-1)/9 are simultaneously divisibly by any proper divisor of the repunit (10^n-1)/9.
T(n,2) is nonmonotonic because a larger number of digit patterns is excluded whenever n has a large number of nontrivial divisors (A070824), resulting in anomalously low values, for example, for n=12 or n=18. 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].

Examples

			T(n,k) as a table (omitting terms with k > n):
---------------------------------------------------------------------------------------------
 k:  1,    2,      3,       4,       5,       6,       7,       8,      9,    10; | Total,
 n |                                                                              | A376918(n)
---------------------------------------------------------------------------------------------
 1 | 1;                                                                           |        1
 2 | 1,    1;                                                                     |        2
 3 | 0,    3,      1;                                                             |        4
 4 | 0,    4,      6,       1;                                                    |       11
 5 | 0,   15,     25,      10,       1;                                           |       51
 6 | 0,   12,     84,      65,      15,       1;                                  |      177
 7 | 0,   63,    301,     350,     140,      21,       1;                         |      876
 8 | 0,   80,    868,    1672,    1050,     266,      28,       1;                |     3965
 9 | 0,  171,   2745,    7770,    6951,    2646,     462,      36,      1;        |    20782
10 | 0,  370,   8680,   33505,   42405,   22827,    5880,     750,     45,     0; |   114462
11 | 0, 1023,  28501,  145750,  246730,  179487,   63987,   11880,   1155,    55; |   678568
12 | 0,  912,  69792,  583438, 1373478, 1322896,  627396,  159027,  22275,  1705; |  4160919
13 | 0, 3965, 261495, 2532517, 7508501, 9321312, 5715424, 1899612, 359502, 38610; | 27640938
... (for more terms, see the A-file).
The pattern "ABCA" is counted toward T(4,3) because ABCA = A*1001 + B*100 + C*10. Since GCD(1001,100,10) = 1, integers of the digital type "ABCA" (1021 in A266946) share no common prime factors.
The pattern "AA" is counted toward T(2,1) because AA = A*11, and 11 is a prime repunit. The only common prime factor shared by the repdigits "AA" is 11, which is of the same digital type as the original pattern. Since no other patterns with n=2 and k=1 exist, T(2,1)=1.
The pattern "ABAB" is not counted toward T(4,2) 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. Since there are two more patterns "ABBA" and "AABB" that are excluded due to divisibility by 11, T(4,1) = S2(4,2) - 3 = 4.
The pattern "ABCDEFGHIJ" that contains all possible digits exactly once does not contribute to T(10,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. Since no other patterns with n=k=10 exist, T(10,10)=0.
The pattern "ABCBDEFBGHIBJ" is not counted toward T(13,10) because its sum of digits is 3*B+45, which is divisible by 3. In total there are binomial(13,4) = 715 patterns of length 13 with all 10 distinct digits in which any 4 digits are equal, and since A378761(13,10) = 0, we obtain T(13,10) = S2(13,10) - 715.
		

Crossrefs

Programs

  • Mathematica
    MinLength = 1; MaxLength = 10; (* the range of n to calculate T(n,k) 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 do not 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 T(n, k) and their sum, A376918(n) *)
    Do[Print[{n, #, Sum[#[[m]], {m, 1, Length[#]}]}] &[Table[Length[Patterns[n, j]], {j, 1, Min[10, n]}]], {n, MinLength, MaxLength}];

Formula

Sum_{k=1..min(n,10)} T(n,k) = A376918(n) (row sums).
T(n+1,n) = A000217(n) for n <= 10.
T(n,2) = 2^(n-1) - A378511(n) for n > 1.
T(n,k) <= S2(n,k) -- k'th column of A008277.
T(n,k) = S2(n,k) - A378761(n,k) for 2 <= k <= 9.
T(n,k) = S2(n,k) for n/2 < k <= 9.
T(n,k) = S2(n,k) for 2 <= k <= 9 if A378511(n) = 1 (see A378761).
T(n,10) = S2(n,10) for n = 11, 12, 14, 15, 17, 18 -- the only integers >= 10 for which no representation n = 10m + 3q with m >= 1 and q >= 0 exists and A378761(n,10)=0.
T(13,10) = S2(13,10) - binomial(13,4).
T(16,10) = S2(16,10) - binomial(16,7) - binomial(16,4)*binomial(12,4)/2.
T(19,10) = S2(19,10) - binomial(19,10) - binomial(19,7)*binomial(12,4) - binomial(19,4)*binomial(15,4)*binomial(11,4)/6.
T(23,10) = S2(23,10) - binomial(23,5)*Product_{i=1..8}(2n+1) -- since A378761(23,10)=0.

A117677 a(n) = number of divisors of n^2 (excluding 1 and n^2).

Original entry on oeis.org

0, 1, 1, 3, 1, 7, 1, 5, 3, 7, 1, 13, 1, 7, 7, 7, 1, 13, 1, 13, 7, 7, 1, 19, 3, 7, 5, 13, 1, 25, 1, 9, 7, 7, 7, 23, 1, 7, 7, 19, 1, 25, 1, 13, 13, 7, 1, 25, 3, 13, 7, 13, 1, 19, 7, 19, 7, 7, 1, 43, 1, 7, 13, 11, 7, 25, 1, 13, 7, 25, 1, 33, 1, 7, 13, 13, 7, 25, 1, 25, 7, 7, 1, 43, 7, 7, 7, 19, 1, 43, 7
Offset: 1

Views

Author

Mark Taggart (mt2612f(AT)aol.com), Apr 12 2006

Keywords

Crossrefs

Equals A048691(n) - 2 for n>1. Cf. A117679, A117010, A070824.

Programs

  • Mathematica
    Join[{0},DivisorSigma[0,Range[2,100]^2]-2] (* Harvey P. Dale, Oct 17 2016 *)

Formula

a(n) = A070824(n^2). - Ray Chandler, Nov 08 2018

A244798 Number of moduli m such that (prime(n) mod m) = 3.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jul 06 2014

Keywords

Comments

Except for the initial 0, 0, 0, this is column 3 of the array at A244740.

Examples

			prime(5) = 11 = (2 mod m) for m = 3, 9 so that a(5) = 2.
		

Crossrefs

Programs

  • Mathematica
    z = 300; f[n_, m_] := If[Mod[Prime[n], m] == 3, 1, 0];
    t = Table[f[n, m], {n, 1, z}, {m, 1, Prime[n]}];
    Table[Count[t[[k]], 1], {k, 1, z}] (* A244798 *)

Formula

a(n) = A070824(A086801(n)), for n > 2. - Ridouane Oudra, Mar 17 2024

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

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 2, 0, 5, 1, 2, 0, 50, 0, 2, 2, 55, 0, 185, 0, 243, 2, 2, 0, 8903, 1, 2, 19, 1219, 0, 48824, 0, 5271, 2, 2, 2, 1323569, 0, 2, 2, 369182, 0, 1659512, 0, 36636, 5111, 2, 0, 254187394, 1, 53535, 2, 223502, 0, 65005979, 2, 16774462, 2, 2, 0, 235105418684, 0, 2, 41386, 47350055, 2
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 23 2017

Keywords

Examples

			a(8) = 5 because 8 has 4 divisors {1, 2, 4, 8} among which 2 are nontrivial divisors {2, 4} therefore we have [4, 4], [4, 2, 2], [2, 4, 2], [2, 2, 4] and [2, 2, 2, 2].
		

Crossrefs

Programs

  • Mathematica
    Table[d = Divisors[n]; Coefficient[Series[1/(1 - Sum[Boole[d[[k]] != 1 && d[[k]] != n] x^d[[k]], {k, Length[d]}]), {x, 0, n}], x, n], {n, 0, 65}]

Formula

a(n) = [x^n] 1/(1 - Sum_{d|n, 1 < d < n} x^d).

A325459 Sum of numbers of nontrivial divisors (greater than 1 and less than k) of k for k = 1..n.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 3, 3, 5, 6, 8, 8, 12, 12, 14, 16, 19, 19, 23, 23, 27, 29, 31, 31, 37, 38, 40, 42, 46, 46, 52, 52, 56, 58, 60, 62, 69, 69, 71, 73, 79, 79, 85, 85, 89, 93, 95, 95, 103, 104, 108, 110, 114, 114, 120, 122, 128, 130, 132, 132, 142
Offset: 0

Views

Author

Gus Wiseman, May 04 2019

Keywords

Comments

Also the number of integer partitions of n that are not hooks but whose augmented differences are hooks (original name). The augmented differences aug(y) of an integer partition y of length k are given by aug(y)i = y_i - y{i + 1} + 1 if i < k and otherwise aug(y)_k = y_k. For example, aug(6,5,5,3,3,3) = (2,1,3,1,1,3).
This sequence counts integer partitions with any number of ones and one part > 1 which appears at least twice. The Heinz numbers of these partitions are given by A325359.

Examples

			The a(4) = 1 through a(10) = 8 partitions:
  (22)  (221)  (33)    (331)    (44)      (333)      (55)
               (222)   (2221)   (2222)    (441)      (3331)
               (2211)  (22111)  (3311)    (22221)    (4411)
                                (22211)   (33111)    (22222)
                                (221111)  (222111)   (222211)
                                          (2211111)  (331111)
                                                     (2221111)
                                                     (22111111)
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, 0,
          numtheory[tau](n)-2+a(n-1))
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Oct 11 2019
  • Mathematica
    Table[Length[Select[IntegerPartitions[n],MatchQ[#,{x_,y__,1...}/;x>1&&SameQ[x,y]]&]],{n,0,30}]
    (* Second program: *)
    a[n_] := a[n] = If[n<2, 0, DivisorSigma[0, n] - 2 + a[n-1]];
    a /@ Range[0, 100] (* Jean-François Alcover, May 20 2021, after Alois P. Heinz *)
  • Python
    from math import isqrt
    def A325459(n): return 0 if n == 0 else (lambda m: 2*(sum(n//k for k in range(1, m+1))-n)+(1-m)*(1+m))(isqrt(n)) # Chai Wah Wu, Oct 07 2021

Formula

From M. F. Hasler, Oct 11 2019: (Start)
a(n) = A006218(n) - 2*n + 1, in terms of partial sums of number of divisors.
a(n) = Sum_{k=1..n} A070824(k): partial sums of A070824 = number of nontrivial divisors. (End)

Extensions

Name changed at the suggestion of Patrick James Smalley-Wall and Luc Rousseau by Gus Wiseman, Oct 11 2019

A328458 Maximum run-length of the nontrivial divisors (greater than 1 and less than n) of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 17 2019

Keywords

Comments

By convention, a(1) = 1, and a(p) = 0 for p prime.

Examples

			The non-singleton runs of the nontrivial divisors of 1260 are: {2,3,4,5,6,7} {9,10} {14,15} {20,21} {35,36}, so a(1260) = 6.
		

Crossrefs

Positions of first appearances are A328459.
Positions of 0's and 1's are A088723.
The version that looks at all divisors is A055874.
The number of successive pairs of divisors > 1 of n is A088722(n).
The Heinz number of the multiset of run-lengths of divisors of n is A328166(n).

Programs

  • Mathematica
    Table[Switch[n,1,1,?PrimeQ,0,,Max@@Length/@Split[DeleteCases[Divisors[n],1|n],#2==#1+1&]],{n,100}]
  • PARI
    A328458(n) = if(1==n,n,my(rl=0,pd=0,m=0); fordiv(n, d, if(1(1+pd), m = max(m,rl); rl=0); pd=d; rl++)); max(m,rl)); \\ Antti Karttunen, Feb 23 2023

Extensions

Data section extended up to a(105) by Antti Karttunen, Feb 23 2023

A378216 Dirichlet inverse of A174725.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 22 2024

Keywords

Crossrefs

Programs

  • PARI
    A378216(n) = if(1==n,n,2-numdiv(n));

Formula

a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, dA174725(n/d) * a(d).
For n > 1, a(n) = -A070824(n) = 2-A000005(n).
a(n) = Sum_{d|n} A023900(d) * A033879(n/d) = Sum_{d|n} A378220(d) * A344587(n/d).

A137510 Irregular triangle read by rows in which row n lists the divisors of n in the range 1 < d < n; or 0 if there are no such divisors.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, May 08 2008

Keywords

Comments

The length of row n is A264440(n). - Wolfdieter Lang, Jan 16 2016
Row n lists the nontrivial divisors of n, or 0 if there are no such divisors. - Omar E. Pol, Nov 22 2010

Examples

			From _Omar E. Pol_, Nov 22 2010: (Start)
The irregular triangle begins:
0;
0;
0;
2;
0;
2, 3;
0;
2, 4;
3;
2, 5;
0,
2, 3, 4, 6;
(End)
		

Crossrefs

Cf. A070824, A027750, A027751, A264440 (row length). Row sums give A048050.

Programs

  • Maple
    for n from 1 to 80 do if isprime(n) or n = 1 then printf("0,") ; else dvs := sort(convert(numtheory[divisors](n) minus {1,n},list) ) ; for d in dvs do printf("%d,",d) ; od: fi ; od: # R. J. Mathar, May 23 2008
    with(numtheory): A:=proc (n) local div: div:=divisors(n): `minus`(div, {div[tau(n)], div[1]}) end proc: for n to 35 do A(n) end do: a:=proc (n) if A(n)={} then 0 else seq(A(n)[j],j=1..tau(n)-2) end if end proc: for n to 35 do a(n) end do; # yields sequence in triangular form - Emeric Deutsch, May 25 2008
  • Mathematica
    Array[Complement[Divisors@ #, {1, #}] &, {42}] /. {} -> {0} // Flatten (* Michael De Vlieger, Jan 16 2016 *)

Extensions

More terms from R. J. Mathar and Emeric Deutsch, May 23 2008

A138553 Table read by rows: T(n,k) is the number of divisors of k that are <= n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Suggested by a question from Eric Desbiaux.
The row lengths are the lengths before the pattern for n repeats.
Antidiagonal sums A070824. [From Eric Desbiaux, Dec 10 2009]

Examples

			The first few rows start:
1, [A000012]
1, 2, [A000034]
1, 2, 2, 2, 1, 3, [A083039]
1, 2, 2, 3, 1, 3, 1, 3, 2, 2, 1, 4, [A083040]
		

Crossrefs

Row lengths A003418, row sums A025529, frequencies in rows A096180.

Programs

  • PARI
    lista(nrows) = {for (n=1, nrows, for (k=1, lcm(vector(n, i, i)), print1(sumdiv(k, d, d <=n), ", ");); print(););} \\ Michel Marcus, Jun 19 2014

Formula

T(n,k) = sum_{i|k, i<=n} 1.

Extensions

Definition corrected by Franklin T. Adams-Watters, Jun 19 2014
Previous Showing 21-30 of 54 results. Next