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

A258289 Number of partitions of 1, 2, 3, or more copies of n into distinct parts.

Original entry on oeis.org

1, 1, 1, 3, 3, 7, 9, 17, 21, 43, 57, 109, 157, 301, 447, 895, 1307, 2663, 4207, 8463, 13283, 28489, 45151, 95485, 157767, 336711, 561603, 1236963, 2061173, 4567227, 7946575, 17516101, 30324977, 69519697, 121465499, 276609723, 496333307, 1137900605
Offset: 0

Views

Author

Alois P. Heinz, May 25 2015

Keywords

Examples

			a(0) = 1: [].
a(1) = 1: [1].
a(2) = 1: [2].
a(3) = 3: [3], [2,1], [3;2,1].
a(4) = 3: [4], [3,1], [4;3,1].
a(5) = 7: [5], [4,1], [3,2], [5;4,1], [5;3,2], [4,1;3,2], [5;4,1;3,2].
a(7) = 17: [7], [6,1], [5,2], [4,3], [4,2,1], [7;6,1], [7;5,2], [7;4,3], [7;4,2,1], [6,1;5,2], [6,1;4,3], [5,2;4,3], [7;6,1;5,2], [7;6,1;4,3], [7;5,2;4,3], [6,1;5,2;4,3], [7;6,1;5,2;4,3].
		

Crossrefs

Programs

  • Maple
    b:= proc() option remember; local m; m:= args[nargs];
         `if`(nargs=1, 1, `if`(args[1]=0, b(args[t] $t=2..nargs),
         `if`(m=0 or add(args[i], i=1..nargs-1)> m*(m+1)/2, 0,
          b(args[t] $t=1..nargs-1, m-1)+add(`if`(args[j]-m<0, 0,
          b(sort([seq(args[i]-`if`(i=j, m, 0), i=1..nargs-1)])[]
          , m-1)), j=1..nargs-1))))
        end:
    a:= n-> add(b(n$k+1)/k!, k=1..max(1, ceil(n/2))):
    seq(a(n), n=0..20);
  • Mathematica
    disParts[n_] := disParts[n] = Select[IntegerPartitions[n], Length[#] == Length[Union[#]]&];
    T[n_, k_] := Select[Subsets[disParts[n], {k}], Length[Flatten[#]] == Length[Union[Flatten[#]]]&] // Length;
    a[n_] := a[n] = If[n == 0, 1, Sum[T[n, k], {k, 1, Quotient[n+1, 2]}]];
    Table[Print[n, " ", a[n]]; a[n], {n, 0, 16}] (* Jean-François Alcover, May 01 2022 *)

Formula

a(n) = Sum_{k=1..A065033(n)} A258280(n,k).
a(n) = Sum_{k=1..max(1,ceiling(n/2))} 1/k! * [Product_{i=1..k} x_i^n] Product_{j>0} (1+Sum_{i=1..k} x_i^j).

A363377 Largest positive integer having n holes that can be made using the fewest possible digits.

Original entry on oeis.org

7, 9, 8, 98, 88, 988, 888, 9888, 8888, 98888, 88888, 988888, 888888, 9888888, 8888888, 98888888, 88888888, 988888888, 888888888, 9888888888, 8888888888, 98888888888, 88888888888, 988888888888, 888888888888, 9888888888888, 8888888888888, 98888888888888, 88888888888888, 988888888888888
Offset: 0

Views

Author

Julia Zimmerman, May 29 2023

Keywords

Comments

Each decimal digit has 0, 1 or 2 holes so that n holes requires A065033(n) digits.

Examples

			For n=0, the largest integer with no holes in it that is as short as possible is 7 (9 is larger, but has 1 hole; 11 is larger and has no holes, but is longer at length 2 > length 1).
For n=1, the largest integer with 1 hole that is as short as possible is 9 (following the same kind of reasoning as with n=0).
		

Crossrefs

Cf. A002281 and A002282 (number of holes), A065033 (digits required).
Cf. A249572 and A250256 (smallest number).
Cf. A337099 (largest 7-segment).

Programs

  • Mathematica
    CoefficientList[Series[(7 + 2 x - 71 x^2 + 70 x^3)/((1 - x) (1 - 10 x^2)), {x, 0, 30}], x] (* Michael De Vlieger, Jul 05 2023 *)
  • Python
    A363377=lambda n: (8+n%2*81)*10**(n>>1)//9 if n else 7
    print([A363377(n) for n in range(30)]) # Natalia L. Skirrow, Jun 26 2023

Formula

From Natalia L. Skirrow, Jun 26 2023: (Start)
a(n) = (89*(10^((n-1)/2))-8)/9 for odd n; a(n) = 8*(10^(n/2)-1)/9 for even n >= 2.
a(n) = a(n-1) + 10*a(n-2) - 10*a(n-3), for n >= 4.
G.f.: (7+2*x-71*x^2+70*x^3)/((1-x)*(1-10*x^2)).
E.g.f.: (80*cosh(sqrt(10)*x) + 89*sqrt(10)*sinh(sqrt(10)*x) - 80*e^x)/90 + 7. (End)

A077219 Floor(geometric mean of the reduced residue system modulo n).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 9, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, 12, 13, 14, 14, 14, 14, 15, 15, 16, 16, 16, 16, 17, 17, 18, 18, 18, 19, 20, 19, 20, 20, 20, 21, 22, 22, 23, 22, 23, 23, 23, 24, 25, 25, 25, 25, 26, 26, 27, 27, 27, 27, 28, 28
Offset: 1

Views

Author

Joseph L. Pe, Nov 30 2002

Keywords

Comments

1. The reduced residue system modulo n is the set of integers k between 1 and n which are coprime to n. The geometric mean of the positive integers a_1,...,a_n is the n-th root of a_1*...*a_n. 2. The arithmetic mean of the reduced residue system modulo n is A065033.

Programs

  • Mathematica
    gm[l_] := Module[{k, p}, k = Length[l]; p = Product[l[[i]], {i, 1, k}]; p^(1/k)]; rp[n_] := Module[{a, i}, a = {1}; For[i = 2, i < n, i++, If[GCD[i, n] == 1, a = Append[a, i]]]; a];
Previous Showing 21-23 of 23 results.