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 51-60 of 96 results. Next

A279732 Lexicographically least strictly increasing sequence such that, for any n>0, Sum_{k=1..n} a(k) can be computed without carries in factorial base.

Original entry on oeis.org

1, 2, 6, 8, 24, 30, 48, 120, 240, 720, 840, 1440, 1560, 5040, 10080, 15120, 40320, 45360, 80640, 120960, 362880, 403200, 725760, 1088640, 3628800, 3991680, 7257600, 7620480, 10886400, 39916800, 43545600, 79833600, 119750400, 159667200, 479001600, 958003200
Offset: 1

Views

Author

Rémy Sigrist, Dec 18 2016

Keywords

Comments

This sequence is to factorial base what A278742 is to base 10.
This sequence contains the factorial numbers (A000142); the corresponding indices are 1, 2, 3, 5, 8, 10, 14, 17, 21, 25, 30, 35, 39, 45, 49, 56, 62, 67, 74, 79, 87, 93, 102, 108, 116, 122, 131, 138, 148, 155, ...
Occasionally, the sum of the first n terms equals A033312(k) for some k;
- In that case: a(n+1)=k!, and k! divides a(m) for any m>n,
- The corresponding indices are 1, 7, 13, 34, 44, 61, 73, 101, 115, 147, 343, 387, 487, 605, 657, 788, 1226, 1296, 1575, 2986, 3586, 5152, 5260, 8236, 9173, ...
- Conjecture: this happens infinitely often.

Examples

			The first terms in base 10 and factorial base, alongside their partial sums in factorial base, are:
n    a(n)        a(n) in fact. base      Partial sum in fact. base
--   ---------   ---------------------   -------------------------
1            1                       1                         1
2            2                     1,0                       1,1
3            6                   1,0,0                     1,1,1
4            8                   1,1,0                     2,2,1
5           24                 1,0,0,0                   1,2,2,1
6           30                 1,1,0,0                   2,3,2,1
7           48                 2,0,0,0                   4,3,2,1
8          120               1,0,0,0,0                 1,4,3,2,1
9          240               2,0,0,0,0                 3,4,3,2,1
10         720             1,0,0,0,0,0               1,3,4,3,2,1
11         840             1,1,0,0,0,0               2,4,4,3,2,1
12        1440             2,0,0,0,0,0               4,4,4,3,2,1
13        1560             2,1,0,0,0,0               6,5,4,3,2,1
14        5040           1,0,0,0,0,0,0             1,6,5,4,3,2,1
15       10080           2,0,0,0,0,0,0             3,6,5,4,3,2,1
16       15120           3,0,0,0,0,0,0             6,6,5,4,3,2,1
17       40320         1,0,0,0,0,0,0,0           1,6,6,5,4,3,2,1
18       45360         1,1,0,0,0,0,0,0           2,7,6,5,4,3,2,1
19       80640         2,0,0,0,0,0,0,0           4,7,6,5,4,3,2,1
20      120960         3,0,0,0,0,0,0,0           7,7,6,5,4,3,2,1
21      362880       1,0,0,0,0,0,0,0,0         1,7,7,6,5,4,3,2,1
22      403200       1,1,0,0,0,0,0,0,0         2,8,7,6,5,4,3,2,1
23      725760       2,0,0,0,0,0,0,0,0         4,8,7,6,5,4,3,2,1
24     1088640       3,0,0,0,0,0,0,0,0         7,8,7,6,5,4,3,2,1
25     3628800     1,0,0,0,0,0,0,0,0,0       1,7,8,7,6,5,4,3,2,1
26     3991680     1,1,0,0,0,0,0,0,0,0       2,8,8,7,6,5,4,3,2,1
27     7257600     2,0,0,0,0,0,0,0,0,0       4,8,8,7,6,5,4,3,2,1
28     7620480     2,1,0,0,0,0,0,0,0,0       6,9,8,7,6,5,4,3,2,1
29    10886400     3,0,0,0,0,0,0,0,0,0       9,9,8,7,6,5,4,3,2,1
30    39916800   1,0,0,0,0,0,0,0,0,0,0     1,9,9,8,7,6,5,4,3,2,1
31    43545600   1,1,0,0,0,0,0,0,0,0,0    2,10,9,8,7,6,5,4,3,2,1
32    79833600   2,0,0,0,0,0,0,0,0,0,0    4,10,9,8,7,6,5,4,3,2,1
33   119750400   3,0,0,0,0,0,0,0,0,0,0    7,10,9,8,7,6,5,4,3,2,1
34   159667200   4,0,0,0,0,0,0,0,0,0,0   11,10,9,8,7,6,5,4,3,2,1
		

Crossrefs

Programs

  • Mathematica
    r = MixedRadix[Reverse@ Range[2, 30]]; f[a_] := Function[w, Function[s, Total@ Map[PadLeft[#, s] &, w]]@ Max@ Map[Length, w]]@ Map[IntegerDigits[#, r] &, a]; g[w_] := Times @@ Boole@ MapIndexed[#1 <= First@ #2 &, Reverse@ w] > 0; a = {1}; Do[k = Max@ a + 1; While[! g@ f@ Join[a, {k}], k++]; AppendTo[a, k], {n, 2, 16}]; a (* Michael De Vlieger, Dec 18 2016 *)

A317826 Number of partitions of n with carry-free sum in factorial base.

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 1, 2, 2, 5, 4, 11, 2, 4, 4, 11, 9, 26, 3, 7, 7, 21, 16, 52, 1, 2, 2, 5, 4, 11, 2, 5, 5, 15, 11, 36, 4, 11, 11, 36, 26, 92, 7, 21, 21, 74, 52, 198, 2, 4, 4, 11, 9, 26, 4, 11, 11, 36, 26, 92, 9, 26, 26, 92, 66, 249, 16, 52, 52, 198, 137, 560, 3, 7, 7, 21, 16, 52, 7, 21, 21, 74, 52, 198, 16, 52, 52, 198, 137, 560, 31, 109
Offset: 0

Views

Author

Antti Karttunen, Aug 08 2018

Keywords

Comments

"Carry-free sum" in this context means that when the digits of summands (written in factorial base, see A007623) are lined up (right-justified), then summing up of each column will not result in carries to any columns left of that column, that is, the sum of digits of the k-th column from the right (with the rightmost as column 1) over all the summands is the same as the k-th digit of n, thus at most k. Among other things, this implies that in any solution, at most one of the summands may be odd. Moreover, such an odd summand is present if and only if n is odd.
a(n) is the number of set partitions of the multiset that contains d copies of each number k, collected over all k in which digit-positions (the rightmost being k=1) there is a nonzero digit d in true factorial base representation of n, where also digits > 9 are allowed.
Distinct terms are the distinct terms in A050322, that is, A045782. - David A. Corneth & Antti Karttunen, Aug 10 2018

Examples

			  n  in fact.base  a(n) carry-free partitions
------------------------------
  0     "0"         1   {}    (unique empty partition, thus a(0) = 1)
  1     "1"         1   {1}
  2    "10"         1   {2}
  3    "11"         2   {2, 1} and {3}, in fact.base: {"10", "1"} and {"11"}
  4    "20"         2   {2, 2} and {4}, in fact.base: {"10" "10"} and {"20"}
  5    "21"         4   {2, 2, 1}, {3, 2}, {4, 1} and {5},
    in factorial base:  {"10", "10", "1"}, {"11", "10"}, {"20", "1"} and {"21"}.
		

Crossrefs

Cf. A001055, A007623, A025487, A045782 (range of this sequence), A050322, A276076, A278236.
Cf. A317827 (positions of records), A317828 (record values), A317829.
Cf. also A227154, A317836.

Programs

  • PARI
    fcnt(n, m) = {local(s); s=0; if(n == 1, s=1, fordiv(n, d, if(d > 1 & d <= m, s=s+fcnt(n/d, d)))); s};
    A001055(n) = fcnt(n, n); \\ From A001055
    A276076(n) = { my(i=0,m=1,f=1,nextf); while((n>0),i=i+1; nextf = (i+1)*f; if((n%nextf),m*=(prime(i)^((n%nextf)/f));n-=(n%nextf));f=nextf); m; };
    A317826(n) = A001055(A276076(n));
    
  • PARI
    \\ Slightly faster, memoized version:
    memA001055 = Map();
    A001055(n) = {my(v); if(mapisdefined(memA001055,n), v = mapget(memA001055,n), v = fcnt(n, n); mapput(memA001055,n,v); (v));}; \\ Cached version.
    A276076(n) = { my(i=0,m=1,f=1,nextf); while((n>0),i=i+1; nextf = (i+1)*f; if((n%nextf),m*=(prime(i)^((n%nextf)/f));n-=(n%nextf));f=nextf); m; };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
    A317826(n) = A001055(A046523(A276076(n)));

Formula

a(n) = A001055(A276076(n)) = A001055(A278236(n)).
a(A000142(n)) = 1.
a(A001563(n)) = A000041(n).
a(A033312(n+1)) = A317829(n) for n >= 1.

A026243 a(n) = A000522(n) - 2.

Original entry on oeis.org

0, 3, 14, 63, 324, 1955, 13698, 109599, 986408, 9864099, 108505110, 1302061343, 16926797484, 236975164803, 3554627472074, 56874039553215, 966858672404688, 17403456103284419, 330665665962403998, 6613313319248079999, 138879579704209680020, 3055350753492612960483
Offset: 1

Views

Author

N. J. A. Sloane, based on a message from a correspondent who wishes to remain anonymous, Dec 21 2003

Keywords

Comments

Number of operations of addition and multiplication needed to evaluate a determinant of order n by cofactor expansion.

Examples

			To calculate a determinant of order 3:
    |a b c|       |e f|       |d f|       |d e|
D = |d e f| = a * |h i| - b * |g i| + c * |g h| =
    |g h i|
   = a * (e*i - f*h) - b * (d*i - f*g) + c * (d*h - e*g).
There are 9 multiplications * and 5 additions (+ or -), so 14 operations and a(3) = 14. - _Bernard Schott_, Apr 21 2019
		

Crossrefs

Cf. A000522, A007526. Equals A033312 + A038156.
Cf. A001339.

Programs

  • Maple
    a:= proc(n) a(n):= n*(a(n-1)+2)-1: end: a(1):= 0:
    seq (a(n), n=1..30);  # Alois P. Heinz, May 25 2012
  • Mathematica
    Table[E*Gamma[n+1, 1] - 2, {n, 1, 30}] (* Jean-François Alcover, May 18 2018 *)

Formula

a(n) = n*(a(n-1)+2)-1 for n>1, a(1) = 0. - Alois P. Heinz, May 25 2012
Conjecture: a(n) +(-n-2)*a(n-1) +(2*n-1)*a(n-2) +(-n+2)*a(n-3)=0. - R. J. Mathar, Jun 23 2013 [Confirmed by Altug Alkan, May 18 2018]
a(n) = floor(e*n!) - 2. - Bernard Schott, Apr 21 2019

A056110 Highest proper factor of n!-1, or a(n)=1 if n!-1 is not composite.

Original entry on oeis.org

1, 1, 1, 17, 1, 1, 1753, 32989, 125131, 3070523, 1, 3593203, 1, 76922021647, 6880233439, 18720390952421, 108514808571661, 186286524362683, 19499250680671, 2221345311813453913, 10311933282363373211, 498390560021687969, 991459181683, 104102080827724738147651, 19739193437746837432529
Offset: 2

Views

Author

Henry Bottomley, Jun 12 2000

Keywords

Crossrefs

Cf. A002582.

Programs

  • Mathematica
    pf[n_]:=Module[{c=n!-1},If[PrimeQ[c],1,c/FactorInteger[c][[1,1]]]]; Array[pf,30,2] (* Harvey P. Dale, Dec 13 2012 *)
  • PARI
    A056110(n)={n=factor(n!-1);if(norml2(n[,2])>1,factorback(n)/n[1,1],1)} \\ M. F. Hasler, Oct 31 2012

Formula

a(n) = A033312(n)/A054415(n)

Extensions

Edited and extended by M. F. Hasler, Oct 31 2012

A230429 Triangle T(n,k) giving the largest member of "the infinite trunk of factorial beanstalk" (A219666) whose factorial base representation contains n digits (A084558) and the most significant such digit (A099563) is k.

Original entry on oeis.org

1, 2, 5, 10, 17, 23, 46, 70, 92, 119, 238, 358, 476, 597, 719, 1438, 2158, 2876, 3597, 4319, 5039, 10078, 15118, 20156, 25197, 30239, 35279, 40319, 80638, 120958, 161276, 201597, 241919, 282239, 322558, 362879, 725758, 1088638, 1451516, 1814397, 2177279, 2540159, 2903038, 3265912, 3628799
Offset: 1

Views

Author

Antti Karttunen, Oct 18 2013

Keywords

Comments

See A007623 for the factorial number system representation.

Examples

			The first rows of this triangular table are:
1;
2, 5;
10, 17, 23;
46, 70, 92, 119;
238, 358, 476, 597, 719;
...
T(3,1) = 10 as 10 has factorial base representation 120, which is the largest such three digit term in A219666 beginning with factorial base digit 1 (in other words, for which A084558(x)=3 and A099563(x)=1).
T(3,2) = 17 as 17 has factorial base representation 221, which is the largest such three digit term in A219666 beginning with factorial base digit 2.
T(3,3) = 23 as 23 has factorial base representation 321, which is the largest such three digit term in A219666 beginning with factorial base digit 3.
		

Crossrefs

Subset of A219666. Corresponding smallest terms: A230428. Can be used to compute A230420. Right edge: A033312.

Programs

A275843 Fixed points of A275957; numbers n for which A060125(n) = A225901(n).

Original entry on oeis.org

0, 1, 3, 5, 9, 12, 23, 33, 53, 71, 75, 81, 119, 153, 252, 360, 361, 372, 492, 719, 873, 1493, 1511, 2183, 2231, 2279, 2879, 2889, 2913, 2961, 3033, 3675, 3681, 5039, 5913, 10332, 15195, 15201, 18081, 18795, 18801, 20160, 20161, 20163, 20165, 20213, 20235, 20520, 20521, 21653, 23835, 25253, 25271, 26693, 26711, 27431, 30732, 40319, 46233, 82133, 82151
Offset: 0

Views

Author

Antti Karttunen, Aug 16 2016

Keywords

Comments

Indexing starts from zero because a(0) = 0 is a special case in this sequence.

Crossrefs

Fixed points of permutation pair A275957 & A275958.
Complement: A275844.
Subsequences: A007489 and A033312.

A276001 Numbers n for which A060502(n) <= 1; numbers with at most one distinct slope in their factorial representation.

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 12, 14, 18, 19, 22, 23, 24, 48, 54, 72, 74, 84, 86, 96, 97, 100, 101, 114, 115, 118, 119, 120, 240, 264, 360, 366, 408, 414, 480, 482, 492, 494, 552, 554, 564, 566, 600, 601, 604, 605, 618, 619, 622, 623, 696, 697, 700, 701, 714, 715, 718, 719, 720, 1440, 1560, 2160, 2184, 2400, 2424, 2880, 2886, 2928, 2934, 3240, 3246, 3288, 3294
Offset: 0

Views

Author

Antti Karttunen, Aug 16 2016

Keywords

Comments

Indexing starts from zero, because a(0)=0 is a special case in this sequence. To get those n for which A060502(n) = 1, start listing terms from a(1) = 1 onward.
From n=1 onward numbers in whose factorial base representation (A007623) the difference i_x - d_x is the same for all nonzero digits d_x present. Here i_x is the position of digit d_x from the least significant end.
From n=1 onward also n such that A060498(n) is a one-ball juggling pattern.

Examples

			4 ("20" in factorial base) is present, because all nonzero digits are on the same slope as there is only one nonzero digit.
14 ("210" in factorial base) is present, because all nonzero digits are on the same slope, as 3-2 = 2-1.
19 ("301" in factorial base) is present, because all nonzero digits are on the same slope, as 3-3 = 1-1.
21 ("311" in factorial base) is NOT present, because not all of its nonzero digits are on the same slope, as 3-3 <> 2-1.
		

Crossrefs

Cf. A000142, A033312, A051683 (subsequences).

A286181 Lesser of Wilson's pseudo-twin primes: primes p such that p! == 1 (mod q), where q=A151800(p) is the next prime after p, and q-p>2.

Original entry on oeis.org

7841, 594278556271608991, 4259842839142238791410741595983041626644087433
Offset: 1

Views

Author

Max Alekseyev and Thomas Ordowski, May 04 2017

Keywords

Comments

By Wilson's theorem, p! == 1 (mod p+2) whenever p,p+2 are twin primes. This sequence and A286208 concern consecutive primes p,q satisfying p! = 1 (mod q), where d = q-p > 2.
It follows that (d-1)! == 1 (mod q), and so q divides A033312(d-1).
Listed terms correspond to d = 12, 30, 76 (cf. A286230). Further terms should have d>=140.
Also, primes p=prime(n) such that A275111(n)=1, and (prime(n),prime(n+1)) are not twin primes (i.e., p is not a term of A001359).

Examples

			For a(1)=7841, we have 7841! == 1 (mod 7853), where 7841 and 7853=7841+12 are consecutive primes. Also, 7853 | (12-1)!-1.
		

Crossrefs

A321682 Numbers with distinct digits in factorial base.

Original entry on oeis.org

0, 1, 2, 4, 5, 10, 13, 14, 19, 20, 22, 23, 46, 67, 68, 77, 82, 85, 86, 101, 106, 109, 110, 115, 116, 118, 119, 238, 355, 356, 461, 466, 469, 470, 503, 526, 547, 548, 557, 562, 565, 566, 623, 646, 667, 668, 677, 682, 685, 686, 701, 706, 709, 710, 715, 716, 718
Offset: 1

Views

Author

Rémy Sigrist, Nov 16 2018

Keywords

Comments

This sequence is a variant of A010784; however here we have infinitely many terms (for example all the terms of A033312 belong to this sequence).

Examples

			The first terms, alongside the corresponding factorial base representations, are:
  n   a(n)  fac(a(n))
  --  ----  ---------
   1     0        (0)
   2     1        (1)
   3     2      (1,0)
   4     4      (2,0)
   5     5      (2,1)
   6    10    (1,2,0)
   7    13    (2,0,1)
   8    14    (2,1,0)
   9    19    (3,0,1)
  10    20    (3,1,0)
  11    22    (3,2,0)
  12    23    (3,2,1)
  13    46  (1,3,2,0)
  14    67  (2,3,0,1)
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) local r; `if`(n (l-> is(nops(l)=nops({l[]})))(b(n, 2)):
    select(t, [$0..1000])[];  # Alois P. Heinz, Nov 16 2018
  • Mathematica
    q[n_] := Module[{k = n, m = 2, r, s = {}}, While[{k, r} = QuotientRemainder[k, m]; k != 0|| r != 0, AppendTo[s, r]; m++]; UnsameQ @@ s]; Select[Range[0, 720], q] (* Amiram Eldar, Feb 21 2024 *)
  • PARI
    is(n) = my (s=0); for (k=2, oo, if (n==0, return (1)); my (d=n%k); if (bittest(s,d), return (0), s+=2^d; n\=k))

A327722 Number T(m,n) of permutations of [n] avoiding the consecutive pattern 12...(m+1)(m+3)(m+2), where m, n >= 0; array read by ascending antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 2, 5, 1, 1, 2, 6, 16, 1, 1, 2, 6, 23, 63, 1, 1, 2, 6, 24, 110, 296, 1, 1, 2, 6, 24, 119, 630, 1623, 1, 1, 2, 6, 24, 120, 708, 4204, 10176, 1, 1, 2, 6, 24, 120, 719, 4914, 32054, 71793, 1, 1, 2, 6, 24, 120, 720, 5026, 38976, 274914, 562848
Offset: 0

Views

Author

Petros Hadjicostas, Nov 02 2019

Keywords

Comments

By taking complements of permutations, we see that T(m,n) is also the number of permutations of [n] avoiding the consecutive pattern (m+3)(m+2)...(3)(1)(2). [The complement of permutation (c_1,c_2,...,c_n) of [n] is (n + 1 - c_1, n + 1 - c_2, ..., n + 1 - c_n).]
If we let S(n,k) = T(n-k, k) for n >= 0 and 0 <= k <= n, we get a triangular array shown in the Example section below.
Note that lim_{n -> oo} S(n,k) = k! = A000142(k) for k >= 0.
By using the ratio test and the Stirling approximation to the Gamma function, we may show that the radius of convergence of the power series W_m(z) = 1 + Sum_{n >= 0} (-1)^(n+1)* z^((m+2)*n + 1)/(b(n, m+2)*((m + 2)*n + 1)) is infinity (for each m >= 0). Thus, the function W_m(z) (as defined by the power series) is entire.

Examples

			Array T(m, n) (with rows m >= 0 and columns n >= 0) begins as follows:
  1, 1, 2, 5, 16,  63, 296, 1623, 10176,  71793, ...
  1, 1, 2, 6, 23, 110, 630, 4204, 32054, 274914, ...
  1, 1, 2, 6, 24, 119, 708, 4914, 38976, 347765, ...
  1, 1, 2, 6, 24, 120, 719, 5026, 40152, 360864, ...
  1, 1, 2, 6, 24, 120, 720, 5039, 40304, 362664, ...
  1, 1, 2, 6, 24, 120, 720, 5040, 40319, 362862, ...
  ...
Triangular array S(n, k) = T(n-k, k) (with rows n >= 0 and columns k >= 0) begins as follows:
  1;
  1, 1;
  1, 1, 2;
  1, 1, 2, 5;
  1, 1, 2, 6, 16;
  1, 1, 2, 6, 23,  63;
  1, 1, 2, 6, 24, 110, 296;
  1, 1, 2, 6, 24, 119, 630, 1623;
  1, 1, 2, 6, 24, 120, 708, 4204, 10176;
  1, 1, 2, 6, 24, 120, 719, 4914, 32054,  71793;
  1, 1, 2, 6, 24, 120, 720, 5026, 38976, 274914, 562848;
  ...
		

Crossrefs

Rows include A111004 (m = 0, pattern 132), A117226 (m = 1, pattern 1243), A202213 (m = 2, pattern 12354).

Formula

E.g.f for row m >= 0: 1/W_m(z), where W_m(z) = 1 + Sum_{n >= 0} (-1)^(n+1)* z^((m+2)*n + 1)/(b(n, m+2)*((m + 2)*n + 1)) with b(n, k) = A329070(n, k) = (k*n)!/(k^n * (1/k)_n). (Here (x)_n = x*(x + 1)*...*(x + n - 1) is the Pochhammer symbol, or rising factorial, which is denoted by (x)^n in some papers and books.)
The function W_m(z) satisfies the o.d.e. W_m^(m+2)(z) + z*W_m'(z) = 0 with W_m(0) = 1, W_m'(0) = -1, and W_m^(s)(0) = 0 for s = 2..(m + 1).
T(m, n) = Sum_{s = 0..floor((n - 1)/(m + 2))} (-(m + 2))^s * (1/(m + 2))_s * binomial(n, (m + 2)*s + 1) * T(m, n - (m + 2)*s - 1) for n >= 1 with T(m, 0) = 1.
T(m, n) = n! for 0 <= n <= m + 2.
T(m, m+3) = (m + 3)! - 1 = A000142(m + 3) - 1 = A033312(m + 3) for m >= 0. [In the set of permutations of [m + 3] there is exactly one permutation that contains the pattern 12...(m+1)(m+3)(m+2).]
Conjecture: T(m, m + 4) = A242569(m + 4) = (m + 4)! - 2*(m + 4) for m >= 0.
Limit_{m -> oo} T(m, n) = n! = A000142(n) for n >= 0.
Previous Showing 51-60 of 96 results. Next