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-10 of 163 results. Next

A069321 Stirling transform of A001563: a(0) = 1 and a(n) = Sum_{k=1..n} Stirling2(n,k)*k*k! for n >= 1.

Original entry on oeis.org

1, 1, 5, 31, 233, 2071, 21305, 249271, 3270713, 47580151, 760192505, 13234467511, 249383390393, 5057242311031, 109820924003705, 2542685745501751, 62527556173577273, 1627581948113854711, 44708026328035782905, 1292443104462527895991, 39223568601129844839353
Offset: 0

Views

Author

Karol A. Penson, Mar 14 2002

Keywords

Comments

The number of compatible bipartitions of a set of cardinality n for which at least one subset is not underlined. E.g., for n=2 there are 5 such bipartitions: {1 2}, {1}{2}, {2}{1}, {1}{2}, {2}{1}. A005649 is the number of bipartitions of a set of cardinality n. A000670 is the number of bipartitions of a set of cardinality n with none of the subsets underlined. - Kyle Petersen, Mar 31 2005
a(n) is the cardinality of the image set summed over "all surjections". All surjections means: onto functions f:{1, 2, ..., n} -> {1, 2, ..., k} for every k, 1 <= k <= n. a(n) = Sum_{k=1..n} A019538(n, k)*k. - Geoffrey Critzer, Nov 12 2012
From Gus Wiseman, Jan 15 2022: (Start)
For n > 1, also the number of finite sequences of length n + 1 covering an initial interval of positive integers with at least two adjacent equal parts, or non-anti-run patterns, ranked by the intersection of A348612 and A333217. The complement is counted by A005649. For example, the a(3) = 31 patterns, grouped by sum, are:
(1111) (1222) (1122) (1112) (1233) (1223)
(2122) (1221) (1121) (1332) (1322)
(2212) (2112) (1211) (2133) (2213)
(2221) (2211) (2111) (2331) (2231)
(1123) (3312) (3122)
(1132) (3321) (3221)
(2113)
(2311)
(3112)
(3211)
Also the number of ordered set partitions of {1,...,n + 1} with two successive vertices together in some block.
(End)

Crossrefs

The complement is counted by A005649.
A version for permutations of prime indices is A336107.
A version for factorizations is A348616.
Dominated (n > 1) by A350252, complement A345194, compositions A345192.
A000670 = patterns, ranked by A333217.
A001250 = alternating permutations, complement A348615.
A003242 = anti-run compositions, ranked by A333489.
A019536 = necklace patterns.
A226316 = patterns avoiding (1,2,3), weakly A052709, complement A335515.
A261983 = not-anti-run compositions, ranked by A348612.
A333381 = anti-runs of standard compositions.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1,
          add(b(n-j)*binomial(n, j), j=1..n))
        end:
    a:= n-> `if`(n=0, 2, b(n+1)-b(n))/2:
    seq(a(n), n=0..30);  # Alois P. Heinz, Feb 02 2018
  • Mathematica
    max = 20; t = Sum[n^(n - 1)x^n/n!, {n, 1, max}]; Range[0, max]!CoefficientList[Series[D[1/(1 - y(Exp[x] - 1)), y] /. y -> 1, {x, 0, max}], x] (* Geoffrey Critzer, Nov 12 2012 *)
    Prepend[Table[Sum[StirlingS2[n, k]*k*k!, {k, n}], {n, 18}], 1] (* Michael De Vlieger, Jan 03 2016 *)
    a[n_] := (PolyLog[-n-1, 1/2] - PolyLog[-n, 1/2])/4; a[0] = 1; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Mar 30 2016 *)
    allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    Table[Length[Select[Join@@Permutations/@allnorm[n],MemberQ[Differences[#],0]&]],{n,0,8}] (* Gus Wiseman, Jan 15 2022 *)
  • PARI
    {a(n)=polcoeff(1+sum(m=1, n, (2*m-1)!/(m-1)!*x^m/prod(k=1, m, 1+(m+k-1)*x+x*O(x^n))), n)} \\ Paul D. Hanna, Oct 28 2013

Formula

Representation as an infinite series: a(0) = 1 and a(n) = Sum_{k>=2} (k^n*(k-1)/(2^k))/4 for n >= 1. This is a Dobinski-type summation formula.
E.g.f.: (exp(x) - 1)/((2 - exp(x))^2).
a(n) = (1/2)*(A000670(n+1) - A000670(n)).
O.g.f.: 1 + Sum_{n >= 1} (2*n-1)!/(n-1)! * x^n / (Product_{k=1..n} (1 + (n + k - 1)*x)). - Paul D. Hanna, Oct 28 2013
a(n) = (A000629(n+1) - A000629(n))/4. - Benoit Cloitre, Oct 20 2002
a(n) = A232472(n-1)/2. - Vincenzo Librandi, Jan 03 2016
a(n) ~ n! * n / (4 * (log(2))^(n+2)). - Vaclav Kotesovec, Jul 01 2018
a(n > 0) = A000607(n + 1) - A005649(n). - Gus Wiseman, Jan 15 2022

A276091 Numbers obtained by reinterpreting base-2 representation of n in A001563-base (A276326): a(n) = Sum_{k>=0} A030308(n,k)*A001563(k+1).

Original entry on oeis.org

0, 1, 4, 5, 18, 19, 22, 23, 96, 97, 100, 101, 114, 115, 118, 119, 600, 601, 604, 605, 618, 619, 622, 623, 696, 697, 700, 701, 714, 715, 718, 719, 4320, 4321, 4324, 4325, 4338, 4339, 4342, 4343, 4416, 4417, 4420, 4421, 4434, 4435, 4438, 4439, 4920, 4921, 4924, 4925, 4938, 4939, 4942, 4943, 5016, 5017, 5020, 5021, 5034, 5035, 5038, 5039, 35280, 35281
Offset: 0

Views

Author

Antti Karttunen, Aug 19 2016

Keywords

Comments

Numbers that are sums of distinct terms of A001563.
A number is included if and only if all the nonzero digits in its factorial base representation (A007623) are maximal allowed in those digit positions, thus this sequence gives all numbers n for which A060130(n) = A260736(n).
Numbers n for which A276328(n) = A276337(n), thus from 1 onward the positions of ones in A276336.
Conjectured also to give all numbers n for which A255411(n) = A276340(n) (thus zeros of A276339).

Crossrefs

Programs

  • Mathematica
    Table[Total[Times @@@ Transpose@ {Map[# #! &, Range@ Length@ #], Reverse@ #}] &@ IntegerDigits[n, 2], {n, 64}] (* Michael De Vlieger, Aug 31 2016 *)
  • Python
    from sympy import factorial as f
    def a007623(n, p=2): return n if n

    0 else '0' for i in x)[::-1] return 0 if n==0 else sum(int(y[i])*f(i + 1) for i in range(len(y))) def a(n): return 0 if n==0 else a255411(a(n//2)) if n%2==0 else 1 + a255411(a((n - 1)//2)) print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 20 2017

  • Scheme
    ;; This is a standalone program:
    (define (A276091 n) (let loop ((n n) (s 0) (f 1) (i 2)) (cond ((zero? n) s) ((even? n) (loop (/ n 2) s (* i f) (+ 1 i))) (else (loop (/ (- n 1) 2) (+ s (* (- i 1) f)) (* i f) (+ 1 i))))))
    ;; This implements one of the given recurrences:
    (definec (A276091 n) (cond ((zero? n) n) ((even? n) (A255411 (A276091 (/ n 2)))) (else (+ 1 (A255411 (A276091 (/ (- n 1) 2)))))))
    ;; Alternatively, we can use A276340 in place of A255411:
    (definec (A276091 n) (cond ((zero? n) n) ((even? n) (A276340 (A276091 (/ n 2)))) (else (+ 1 (A276340 (A276091 (/ (- n 1) 2)))))))
    

Formula

a(0) = 0, a(2n) = A255411(a(n)), a(2n+1) = 1+A255411(a(n)).
a(0) = 0, a(2n) = A276340(a(n)), a(2n+1) = 1+A276340(a(n)).
Other identities. For all n >= 0:
a(n) = A225901(A059590(n)).
a(n) = A276090(A275959(n)).
A276328(a(n)) = A276337(a(n)) = A000120(n).

Extensions

Name changed (to emphasize the functional nature of the sequence) with the original definition moved to the comments by Antti Karttunen, Sep 01 2016

A276326 Numbers expressed in greedy A001563-base.

Original entry on oeis.org

0, 1, 2, 3, 10, 11, 12, 13, 20, 21, 22, 23, 30, 31, 32, 33, 40, 41, 100, 101, 102, 103, 110, 111, 112, 113, 120, 121, 122, 123, 130, 131, 132, 133, 140, 141, 200, 201, 202, 203, 210, 211, 212, 213, 220, 221, 222, 223, 230, 231, 232, 233, 240, 241, 300, 301, 302, 303, 310, 311, 312, 313, 320, 321, 322, 323, 330, 331, 332, 333, 340, 341, 400
Offset: 0

Views

Author

Antti Karttunen, Aug 30 2016

Keywords

Comments

Terms A001563(1) = 1, A001563(2) = 4, A001563(3) = 18, ... give the base values for the digit positions from 1 onward. Digit places are filled by always trying to find the largest possible term of A001563 that still fits into the sum.
A130744(8) = 3225600 = 10*A001563(8) is the first number which yields an ambiguous representation when expressed in decimal, because in this base it is actually "A0000000" (where digit "A" stands for ten).

Examples

			To recover n from a(n) the digits in positions i = 1, 2, 3, ... (starting indexing from the least significant digit at right) are multiplied by A001563(i) and added together:
  ----------------
   n         a(n)
  ----------------
   0           0
   1           1
   2           2
   3           3
   4          10
   5          11
   6          12
   7          13
   8          20
   9          21
  10          22
  11          23
  12          30
  13          31
  14          32
  15          33
  16          40
  17          41 (as 4*A001563(2) + 1*A001563(1) = 17)
  18         100 (as 1*A001563(3) + 0*A001563(2) + 0*A001563(1) = 18)
and:
3225599 99111111 (as 3225599 = 9*b(8) + 9*b(7) + b(6) + b(5) + b(4) + b(3) + b(2) + b(1)), where b(n) = A001563(n).
		

Crossrefs

Cf. A276327 (the least significant nonzero digit).
Cf. A276328 (the sum of digits).
Cf. A276333 (the most significant digit).
Cf. A276336 (a largest digit).
Cf. A276337 (number of nonzero digits).
Cf. A033312 (repunits).
Cf. A276091 (no digits larger than one).
Differs from A007090 for the first time at n=16 and from A055655 at n=18.

Programs

  • Mathematica
    f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], (# #!) &[# - i]]], {i, 0, # - 1}] &@ NestWhile[# + 1 &, 0, (# #!) &[# + 1] <= n &]; Rest[a][[All, 1]]]; Table[FromDigits@ f@ n, {n, 72}] (* Michael De Vlieger, Aug 31 2016 *)
  • Scheme
    (define (A276326 n) (let loop ((n n) (s 0)) (if (zero? n) s (let ((dig (A276333 n))) (if (> dig 9) (error "A276326: ambiguous representation of n, digit > 9 would be needed: " n dig) (loop (A276335 n) (+ s (* dig (expt 10 (- (A258198 n) 1))))))))))

A276335 Discard the most significant digit when n is expressed in greedy A001563-base (A276326), then convert back to decimal: a(n) = n - A276334(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 30 2016

Keywords

Crossrefs

Programs

  • Mathematica
    {0}~Join~Table[n - # Floor[n/#] &@(# #!) &@ NestWhile[# + 1 &, 0, # #! <= n &[# + 1] &], {n, 96}] (* Michael De Vlieger, Aug 31 2016 *)
  • Scheme
    (define (A276335 n) (- n (A276334 n)))

Formula

a(n) = n - A276334(n).

A258198 a(n) = largest k for which A001563(k) = k*k! <= n.

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4
Offset: 0

Views

Author

Antti Karttunen, May 23 2015

Keywords

Comments

Number of nonzero terms of A001563 <= n.
Each n occurs A001564(n) times.

Crossrefs

Programs

  • Scheme
    (define (A258198 n) (let loop ((k 1) (f 1)) (if (> (* k f) n) (- k 1) (loop (+ k 1) (* (+ k 1) f)))))

A258199 a(n) = largest term of A001563 <= n.

Original entry on oeis.org

0, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18
Offset: 0

Views

Author

Antti Karttunen, May 23 2015

Keywords

Crossrefs

Programs

  • Mathematica
    Table[# #! &@ NestWhile[# + 1 &, 0, # #! <= n &[# + 1] &], {n, 0, 96}] (* Michael De Vlieger, Aug 31 2016 *)

Formula

a(n) = A001563(A258198(n)).

A276328 Digit sum when n is expressed in greedy A001563-base (A276326).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 30 2016

Keywords

Comments

a(n) is the number of terms of A001563 needed to sum to n using the greedy algorithm.
This seems to give also the minimal number of terms of A001563 that sum to n (checked empirically up to n=3265920), but it would be nice to know for sure whether this holds for all n.

Examples

			For n=1, the largest term of A001563 <= 1 is A001563(1) = 1, thus a(1) = 1.
For n=2, the largest term of A001563 <= 2 is A001563(1) = 1, thus a(2) = 1 + a(2-1) = 2.
For n=18, the largest term of A001563 <= 18 is A001563(3) = 18, thus a(18) = 1.
For n=20, the largest term of A001563 <= 20 is A001563(3) = 18, thus a(20) = 1 + a(20-18) = 3.
For n=36, the largest term of A001563 <= 36 is A001563(3) = 18, thus a(36) = 1 + a(18) = 2.
		

Crossrefs

Cf. A276091 (gives all n for which a(n) = A276337(n)).
Cf. also A007895, A034968, A265744, A265745 for similar sequences.

Programs

  • Mathematica
    f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], (# #!) &[# - i]]], {i, 0, # - 1}] &@NestWhile[# + 1 &, 0, (# #!) &[# + 1] <= n &]; Rest[a][[All, 1]]]; {0}~Join~Table[Total@ f@ n, {n, 120}] (* Michael De Vlieger, Aug 31 2016 *)

Formula

a(0) = 0; for n >= 1, a(n) = 1 + a(n-A258199(n)).
a(0) = 0; for n >= 1, a(n) = A276333(n) + a(A276335(n)).
Other identities and observations. For all n >= 0:
a(A276091(n)) = A000120(n).
a(n) >= A276337(n).
It also seems that a(n) <= A276332(n) for all n.

A276333 The most significant digit in greedy A001563-base (A276326): a(n) = floor(n/A258199(n)), a(0) = 0.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 30 2016

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Floor[n/(# #!)] &@ NestWhile[# + 1 &, 0, # #! <= n &[# + 1] &], {n, 96}] (* or *)
    f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@#, Last@#} &@ QuotientRemainder[a[[-1, -1]], (# #!) &[# - i]]], {i, 0, # - 1}] &@ NestWhile[# + 1 &, 0, (# #!) &[# + 1] <= n &]; Rest[a][[All, 1]]]; {0}~Join~Table[First@ f@ n, {n, 96}] (* Michael De Vlieger, Aug 31 2016 *)
  • Scheme
    (define (A276333 n) (if (zero? n) n (floor->exact (/ n (A258199 n)))))

Formula

a(0) = 0; for n >= 1, a(n) = floor(n/A258199(n)).

A276330 a(n) = largest term of A001563 that divides n, a(0) = 0.

Original entry on oeis.org

0, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 18, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 18, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 18, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 18, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 18, 1, 4, 1, 1, 1, 96
Offset: 0

Views

Author

Antti Karttunen, Aug 30 2016

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], (# #!) &[# - i]]], {i, 0, # - 1}] &@ NestWhile[# + 1 &, 0, (# #!) &[# + 1] <= n &]; Rest[a][[All, 1]]]; {0}~Join~Table[# #! &[Length@ TakeWhile[Reverse@ f@ n, # == 0 &] + 1], {n, 120}] (* Michael De Vlieger, Aug 31 2016 *)
  • Scheme
    (define (A276330 n) (if (zero? n) n (A001563 (A276329 n))))

Formula

a(0) = 0; for n >= 1, a(n) = A001563(A276329(n)).
Other identities. For all n >= 0:
A276331(n) = n - a(n).

A276337 Number of nonzero digits in greedy A001563-base representation of n (A276326).

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 1, 2, 2, 2, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 1, 2, 2, 2, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 1, 2, 2, 2, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 1, 2, 2, 2, 2, 3, 1, 2, 2, 2, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 2, 3, 3, 3, 3, 4, 4
Offset: 0

Views

Author

Antti Karttunen, Aug 30 2016

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], (# #!) &[# - i]]], {i, 0, # - 1}] &@ NestWhile[# + 1 &, 0, (# #!) &[# + 1] <= n &]; Rest[a][[All, 1]]]; {0}~Join~Table[Count[f@ n, d_ /; d > 0], {n, 120}] (* Michael De Vlieger, Aug 31 2016 *)

Formula

a(0) = 0; for n >= 1, a(n) = 1 + a(A276335(n)).
For all n >= 0, a(n) <= A276328(n).
Showing 1-10 of 163 results. Next