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 11-20 of 42 results. Next

A320225 a(1) = 1; a(n > 1) = Sum_{k = 1..n} Sum_{d|k, d < k} a(d).

Original entry on oeis.org

1, 1, 2, 4, 5, 9, 10, 16, 19, 26, 27, 44, 45, 57, 65, 87, 88, 120, 121, 158, 171, 200, 201, 278, 284, 331, 353, 426, 427, 536, 537, 646, 676, 766, 782, 982, 983, 1106, 1154, 1365, 1366, 1617, 1618, 1851, 1943, 2146, 2147, 2589, 2600, 2917, 3008, 3390, 3391
Offset: 1

Views

Author

Gus Wiseman, Oct 07 2018

Keywords

Crossrefs

Programs

  • Mathematica
    sau[n_]:=If[n==1,1,Sum[sau[d],{k,n},{d,Most[Divisors[k]]}]];
    Table[sau[n],{n,30}]
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A320225(n): return 1 if n == 1 else sum(A320225(d)*(n//d-1) for d in range(1,n)) # Chai Wah Wu, Jun 08 2022

Formula

a(1) = 1; a(n > 1) = Sum_{d = 1..n-1} a(d) * floor(n/d-1).
G.f. A(x) satisfies A(x) = x + (1/(1 - x)) * Sum_{k>=2} A(x^k). - Ilya Gutkovskiy, Sep 06 2019

A320226 Number of integer partitions of n whose non-1 parts are all equal.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 9, 10, 13, 15, 18, 19, 24, 25, 28, 31, 35, 36, 41, 42, 47, 50, 53, 54, 61, 63, 66, 69, 74, 75, 82, 83, 88, 91, 94, 97, 105, 106, 109, 112, 119, 120, 127, 128, 133, 138, 141, 142, 151, 153, 158, 161, 166, 167, 174, 177, 184, 187, 190, 191, 202
Offset: 0

Views

Author

Gus Wiseman, Oct 07 2018

Keywords

Examples

			The integer partitions whose non-1 parts are all equal:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (41)     (33)      (61)       (44)
             (111)  (31)    (221)    (51)      (331)      (71)
                    (211)   (311)    (222)     (511)      (611)
                    (1111)  (2111)   (411)     (2221)     (2222)
                            (11111)  (2211)    (4111)     (3311)
                                     (3111)    (22111)    (5111)
                                     (21111)   (31111)    (22211)
                                     (111111)  (211111)   (41111)
                                               (1111111)  (221111)
                                                          (311111)
                                                          (2111111)
                                                          (11111111)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],SameQ@@DeleteCases[#,1]&]],{n,30}]

Formula

a(n > 1) = A002541(n - 1) + 1.

A024917 a(n) = Sum_{k=2..n} k*floor(n/k).

Original entry on oeis.org

2, 5, 11, 16, 27, 34, 48, 60, 77, 88, 115, 128, 151, 174, 204, 221, 259, 278, 319, 350, 385, 408, 467, 497, 538, 577, 632, 661, 732, 763, 825, 872, 925, 972, 1062, 1099, 1158, 1213, 1302, 1343, 1438, 1481, 1564, 1641, 1712, 1759, 1882, 1938, 2030, 2101, 2198, 2251
Offset: 2

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [&+[k*Floor(n/k): k in [2..n]]: n in [2..55]]; // Bruno Berselli, Jan 08 2012
    
  • Mathematica
    Table[Sum[k*Floor[n/k],{k,2,n}],{n,2,60}] (* Harvey P. Dale, Mar 13 2015 *)
  • PARI
    a(n) = sum(k=2,n, k*floor(n/k)); \\ Michel Marcus, Sep 02 2019
    
  • Python
    from math import isqrt
    def A024917(n): return (-(s:=isqrt(n))**2*(s+1)+sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1))>>1)-n # Chai Wah Wu, Oct 23 2023

Formula

G.f.: (1/(1 - x)) * Sum_{k>=2} k*x^k/(1 - x^k). - Ilya Gutkovskiy, Sep 02 2019

A134867 A010766 * A000012.

Original entry on oeis.org

1, 3, 1, 5, 2, 1, 8, 4, 2, 1, 10, 5, 3, 2, 1, 14, 8, 5, 3, 2, 1, 16, 9, 6, 4, 3, 2, 1, 20, 12, 8, 6, 4, 3, 2, 1, 23, 14, 10, 7, 5, 4, 3, 2, 1, 27, 17, 12, 9, 7, 5, 4, 3, 2, 1, 29, 18, 13, 10, 8, 6, 5, 4, 3, 2, 1, 35, 23, 17, 13, 10, 8, 6, 5, 4, 3, 2, 1, 37, 24, 18, 14, 11, 9, 7, 6, 5, 4, 3, 2, 1
Offset: 1

Views

Author

Gary W. Adamson, Nov 14 2007

Keywords

Examples

			First few rows of the triangle:
   1;
   3,  1;
   5,  2,  1;
   8,  4,  2, 1;
  10,  5,  3, 2, 1;
  14,  8,  5, 3, 2, 1;
  16,  9,  6, 4, 3, 2, 1;
  20, 12,  8, 6, 4, 3, 2, 1;
  23, 14, 10, 7, 5, 4, 3, 2, 1;
  27, 17, 12, 9, 7, 5, 4, 3, 2, 1;
  ...
		

Crossrefs

Column k=1..4 give: A006218, A002541, A366968, A366972.
Row sums give A024916.

Programs

  • Mathematica
    t = Table[Sum[Floor[n/h], {h, k, n}], {n, 0, 10}, {k, 1, n}];
    u = Flatten[t]  (* A134867 array *)
    TableForm[t]    (* A134867 sequence *)
    (* Clark Kimberling, Oct 11 2014 *)
  • PARI
    T(n, k) = sum(j=k, n, n\j); \\ Seiichi Manyama, Oct 30 2023

Formula

A010766 * A000012 as infinite lower triangular matrices.
Triangle read by rows, partial row sums of A010766 starting fromt the right.
G.f. of column k: 1/(1-x) * Sum_{j>=1} x^(k*j)/(1-x^j) = 1/(1-x) * Sum_{j>=k} x^j/(1-x^j). - Seiichi Manyama, Oct 30 2023

Extensions

More terms from Seiichi Manyama, Oct 30 2023

A264402 Triangle read by rows: T(n,k) is the number of partitions of n that have k parts larger than the smallest part (n>=1, k>=0).

Original entry on oeis.org

1, 2, 2, 1, 3, 2, 2, 4, 1, 4, 5, 2, 2, 8, 4, 1, 4, 9, 7, 2, 3, 12, 10, 4, 1, 4, 14, 15, 7, 2, 2, 17, 20, 12, 4, 1, 6, 18, 27, 17, 7, 2, 2, 23, 33, 26, 12, 4, 1, 4, 24, 44, 35, 19, 7, 2, 4, 27, 51, 49, 28, 12, 4, 1, 5, 30, 64, 63, 41, 19, 7, 2, 2
Offset: 1

Views

Author

Emeric Deutsch, Nov 21 2015

Keywords

Comments

T(n,k) = number of partitions of n in which the 2nd largest part is k (0 if all parts are equal). Example: T(7,2) = 4 because we have [3,2,1,1], [3,2,2], [4,2,1], and [5,2].
The fact that the above two statistics (in Name and in 1st Comment) have the same distribution follows at once by conjugation. - Emeric Deutsch, Dec 11 2015
Row sums yield the partition numbers (A000041).
T(n,0) = A000005(n) = number of divisors of n.
Sum_{k>=0} k*T(n,k) = A182984(n).

Examples

			T(7,2) = 4 because we have [2,2,1,1,1], [3,2,1,1], [3,3,1], and [4,2,1].
Triangle starts:
1;
2;
2,1;
3,2;
2,4,1;
4,5,2;
2,8,4,1;
		

Crossrefs

Programs

  • Maple
    g := sum(x^i/((1-x^i)*(product(1-t*x^j, j = i+1 .. 100))), i = 1 .. 100): gser := simplify(series(g, x = 0, 30)): for n to 27 do P[n] := sort(coeff(gser, x, n)) end do: for n to 27 do seq(coeff(P[n], t, j), j = 0 .. degree(P[n])) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0, [1, 0],
          `if`(i<1, 0, b(n, i-1) +add((p->[0, p[1]+
           expand(p[2]*x^j)])(b(n-i*j, i-1)) , j=1..n/i)))
        end:
    T:= n->(p->seq(coeff(p, x, i), i=0..degree(p)))(b(n$2)[2]):
    seq(T(n), n=1..20);  # Alois P. Heinz, Nov 29 2015
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0, {1, 0}, If[i<1, {0, 0}, b[n, i-1] + Sum[ Function[p, {0, p[[1]] + Expand[p[[2]]*x^j]}][b[n-i*j, i-1]], {j, 1, n/i} ]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, n][[2]]]; Table[T[n], {n, 1, 20}] // Flatten (* Jean-François Alcover, Jan 15 2016, after Alois P. Heinz *)

Formula

G.f.: G(t,x) = Sum_{i>=1} (x^i/((1 - x^i)*Product_{j>=i+1}(1-t*x^j))).

A275495 a(n) = Sum_{k=2..n} floor(n/k) - 2*floor(n/(2*k)).

Original entry on oeis.org

0, 1, 2, 2, 3, 4, 5, 4, 6, 7, 8, 7, 8, 9, 12, 10, 11, 12, 13, 12, 15, 16, 17, 14, 16, 17, 20, 19, 20, 21, 22, 19, 22, 23, 26, 24, 25, 26, 29, 26, 27, 28, 29, 28, 33, 34, 35, 30, 32, 33, 36, 35, 36, 37, 40, 37, 40, 41, 42, 39, 40, 41, 46, 42, 45, 46, 47, 46, 49
Offset: 1

Views

Author

Peter Luschny, Jul 30 2016

Keywords

Crossrefs

Cf. A002541, row sums of A275510, A059851.

Programs

  • Maple
    seq(add(floor(n/k)-2*floor(n/(2*k)), k=2..n), n=1..60); # Ridouane Oudra, Oct 20 2019
  • Mathematica
    Table[Sum[Floor[n/k] - 2*Floor[n/(2*k)], {k, 2, n}], {n, 1, 50}] (* G. C. Greubel, Jul 30 2016 *)
  • PARI
    a(n)=sum(k=2,n,n\k) - 2*sum(k=2,n\2,n\(2*k)) \\ Charles R Greathouse IV, Jul 30 2016
  • Sage
    [sum([floor(n/k) - 2*floor(n/(2*k)) for k in (2..n)]) for n in (1..69)]
    

Formula

a(n) = Sum_{i=1..n} floor((n-i)/i)*(-1)^(i+1). - Wesley Ivan Hurt, Sep 13 2017
a(n) = Sum_{i=2..n} (floor(n/i) mod 2) = A059851(n) - (n mod 2). - Ridouane Oudra, Oct 20 2019
a(n) ~ log(2) * n. - Vaclav Kotesovec, May 28 2021

A284755 Numbers n such that the average of all proper divisors of all positive integers <= n is an integer.

Original entry on oeis.org

2, 3, 63, 1249, 4696, 1200509
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 02 2017

Keywords

Comments

Numbers n such that A002541(n)|A153485(n).
a(7) > 10^12. - Giovanni Resta, Apr 13 2017

Crossrefs

Programs

  • Mathematica
    Select[Range[2, 1300000], Mod[Sum[DivisorSigma[1, k] - k, {k, 1, #}], Sum[DivisorSigma[0, k] - 1, {k, 1, #}]] == 0 &]

A339370 a(n) = Sum_{k=1..floor(n/2)} (n-k) * floor((n-k)/k).

Original entry on oeis.org

0, 1, 4, 11, 19, 36, 50, 76, 102, 138, 165, 227, 262, 318, 381, 460, 510, 614, 672, 791, 889, 990, 1064, 1249, 1353, 1477, 1610, 1790, 1891, 2133, 2244, 2455, 2626, 2798, 2983, 3312, 3452, 3649, 3857, 4198, 4356, 4715, 4883, 5190, 5514, 5763, 5949, 6446, 6686, 7045
Offset: 1

Views

Author

Wesley Ivan Hurt, Dec 01 2020

Keywords

Comments

Total area of all y X z rectangles such that x + y = n, with x and y integers, 0 < x <= y and z = floor(y/x). - Wesley Ivan Hurt, Dec 21 2020

Crossrefs

Programs

  • Mathematica
    Table[Sum[(n - k)*Floor[(n - k)/k], {k, Floor[n/2]}], {n, 60}]
  • PARI
    a(n) = sum(k=1, n\2, (n-k) * ((n-k)\k)); \\ Michel Marcus, Dec 02 2020
    
  • Python
    from math import isqrt
    def A339370(n): return n*(1-n)+(s:=isqrt(n))**2*(s+1-(n<<1))-sum((q:=n//k)*((k-(n<<1)<<1)+q+1) for k in range(1,s+1))>>1 # Chai Wah Wu, Oct 27 2023

Formula

a(n) ~ n^2*(log(n) + 2*EulerGamma - Pi^2/12 - 3/2). - Rok Cestnik, Dec 20 2020
a(n) = n*A002541(n) - A153485(n). - Vaclav Kotesovec, Dec 21 2020

A355538 Partial sum of A001221 (number of distinct prime factors) minus 1, ranging from 2 to n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 4, 5, 5, 5, 6, 6, 7, 8, 9, 9, 10, 10, 11, 11, 12, 12, 14, 14, 14, 15, 16, 17, 18, 18, 19, 20, 21, 21, 23, 23, 24, 25, 26, 26, 27, 27, 28, 29, 30, 30, 31, 32, 33, 34, 35, 35, 37, 37, 38, 39, 39, 40, 42, 42, 43, 44, 46, 46
Offset: 1

Views

Author

Gus Wiseman, Jul 23 2022

Keywords

Comments

For initial terms up to 30 we have a(n) = Log_2 A355537(n).

Crossrefs

The sum of the same range is A000096.
The product of the same range is A000142, Heinz number A070826.
For divisors (not just prime factors) we get A002541, also A006218, A077597.
A shifted variation is A013939.
The unshifted version is A022559, product A327486, w/o multiplicity A355537.
The ranges themselves are the rows of A131818 (shifted).
Partial sums of A297155 (shifted).
A001221 counts distinct prime factors, with sum A001414.
A001222 counts prime factors with multiplicity.
A003963 multiplies together the prime indices of n.
A056239 adds up prime indices, row sums of A112798.
A066843 gives partial sums of A000005.

Programs

  • Mathematica
    Table[Total[(PrimeNu[#]-1)&/@Range[2,n]],{n,1,100}]

Formula

a(n) = A013939(n) - n + 1.

A156745 a(n) = Sum_{k=1..n} floor((n+k)/k) = n + Sum_{k=1..n} sigma_0(k), where sigma_0(k) is A000005(k). Also a(n) = n + A006218(n).

Original entry on oeis.org

2, 5, 8, 12, 15, 20, 23, 28, 32, 37, 40, 47, 50, 55, 60, 66, 69, 76, 79, 86, 91, 96, 99, 108, 112, 117, 122, 129, 132, 141, 144, 151, 156, 161, 166, 176, 179, 184, 189, 198, 201, 210, 213, 220, 227, 232, 235, 246, 250, 257, 262, 269, 272, 281, 286, 295, 300
Offset: 1

Views

Author

Ctibor O. Zizka, Feb 14 2009

Keywords

Comments

Generalized sequence b(n) = Sum_{k=1..n} floor((n+k*t)/k) = t*n + Sum_{k=1..n} sigma_0(k), where sigma_0(k) is A000005(k). Also b(n) = t*n + A006218(n).
Partial sums of A334954. - Omar E. Pol, Sep 26 2020

Crossrefs

Programs

  • PARI
    a(n) = n + sum(k=1, n, numdiv(k)); \\ Michel Marcus, Oct 02 2020
    
  • Python
    from math import isqrt
    def A156745(n): return n-(s:=isqrt(n))**2+(sum(n//k for k in range(1,s+1))<<1) # Chai Wah Wu, Oct 23 2023

Formula

a(n) = 2*n + Sum_{k=1..floor(n/2)} floor((n-k)/k). - Wesley Ivan Hurt, Dec 25 2020
a(n) = A005843(n) + A002541(n), after Wesley Ivan Hurt. - Omar E. Pol, Dec 25 2020

Extensions

More terms from Eric M. Schmidt, Feb 28 2014
Previous Showing 11-20 of 42 results. Next