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 61 results. Next

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

A231715 For n with a unique factorial base representation n = du*u! + ... + d2*2! + d1*1! (each di in range 0..i, cf. A007623), a(n) = Product_{i=1..u} (gcd(d_i,i+1) mod i+1), where u is given by A084558(n).

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 0, 2, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 0, 2, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 0, 2, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2
Offset: 1

Views

Author

Antti Karttunen, Nov 12 2013

Keywords

Examples

			For n=13, with factorial base representation '201' (= A007623(13), 2*3! + 0*2! + 1*1! = 13) we have, starting from the least significant digit, (gcd(1,2) mod 2)*(gcd(0,3) mod 3)*(gcd(2,4) mod 4) = (1 mod 2)*(3 mod 3)*(2 mod 4) = 1*0*2 = 0, thus a(13)=0.
For n=17, with factorial base representation '221' (= A007623(17), 2*3! + 2*2! + 1*1! = 17) we have, starting from the least significant digit, (gcd(1,2) mod 2)*(gcd(2,3) mod 3)*(gcd(2,4) mod 4) = (1 mod 2)*(1 mod 3)*(2 mod 4) = 1*1*2 = 2, thus a(17)=2.
		

Crossrefs

Cf. A231716 (positions of ones), A227157 (the positions of nonzero terms), A007623.
Each a(n) <= A208575(n).

Programs

  • Scheme
    (define (A231715 n) (let loop ((n n) (i 2) (p 1)) (cond ((zero? n) p) (else (loop (floor->exact (/ n i)) (+ i 1) (* p (modulo (gcd (modulo n i) i) i)))))))

A265893 a(n) = A084558(n) - A230403(n); the length of factorial base representation of n without its trailing zeros.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 20 2015

Keywords

Examples

			In factorial base A007623, 0 is shown as "0", but in this case all the zeros are trailing, so we set a(0) = 0 by convention.
For n = 2, A007623(2) = "10", and by discarding the trailing zero only one significant digit "1" is left, thus a(2) = 1.
For n = 132, A007623(132) = "10200", and by discarding its trailing zeros we are left with just three digits "102", thus a(132) = 3.
		

Crossrefs

Column 1 of A265892.

Programs

Formula

a(n) = A084558(n) - A230403(n).

A273673 Square array A(n,k) = (n / prime(1+A084558(k))^e) * prime(1+A084558(k)-A099563(k))^e, where e = A249344((1+A084558(k)), n) = the exponent of the largest power of prime(1+A084558(k)) which divides n. Array is read by descending antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 09 2016

Keywords

Comments

Informally: "clear" the exponent of prime(1+A084558(k)) and add it (the old value of exponent) to the exponent of prime(1+A084558(k)-A099563(k)) in the prime factorization of n.
Auxiliary function for computing array A275723.

Examples

			The top left 6 x 15 corner of the array:
   1,  1,  1,  1,  1,  1
   2,  2,  2,  2,  2,  2
   2,  3,  3,  3,  3,  3
   4,  4,  4,  4,  4,  4
   5,  3,  3,  2,  2,  5
   4,  6,  6,  6,  6,  6
   7,  7,  7,  7,  7,  5
   8,  8,  8,  8,  8,  8
   4,  9,  9,  9,  9,  9
  10,  6,  6,  4,  4, 10
  11, 11, 11, 11, 11, 11
   8, 12, 12, 12, 12, 12
  13, 13, 13, 13, 13, 13
  14, 14, 14, 14, 14, 10
  10,  9,  9,  6,  6, 15
		

Crossrefs

Programs

Formula

A(n,k) = (n / prime(1+A084558(k))^e) * prime(1+A084558(k)-A099563(k))^e, where e = A249344((1+A084558(k)), n), the exponent of the largest power prime(1+A084558(k)) which divides n.

A275850 Number of digits in range [1..A084558(n)] that do not occur in factorial base representation of n: a(n) = A084558(n) - A275806(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 15 2016

Keywords

Examples

			For n=6 ("100" in factorial base representation A007623) there are two digits in interval [1..A084558(6)] = [1..3] that are not used, namely 2 and 3, thus a(6)=2.
For n=12 ("200") there are also two digits in interval [1..3] that are not used, namely 1 and 3, thus a(12)=2.
For n=23 ("321") all the digits in interval [1..3] are in use, thus a(23)=0.
		

Crossrefs

Cf. A033312 (indices of zeros).
Cf. also A007623, A225901, A275849.

Programs

Formula

a(n) = A084558(n) - A275806(n).
Other identities. For all n >= 0:
a(n) = A275849(A225901(n)).

A276149 a(0) = 0; for n >= 1, a(n) = A048764(n) * (1+(A084558(n)-A099563(n))).

Original entry on oeis.org

0, 1, 4, 4, 2, 2, 18, 18, 18, 18, 18, 18, 12, 12, 12, 12, 12, 12, 6, 6, 6, 6, 6, 6, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 48
Offset: 0

Views

Author

Antti Karttunen, Aug 29 2016

Keywords

Comments

Auxiliary function for computing A225901: the most significant digit in factorial base representation of n is "inverted", the rest of digits are "cleared" (replaced with zeros).

Crossrefs

Programs

Formula

a(0) = 0; for n >= 1, a(n) = A048764(n) * (1+(A084558(n)-A099563(n))).

A343476 Numbers k whose representations in factorial base include each of the digits from 0 to d-1 exactly once, where d = A084558(k) is the number of digits of k in factorial base.

Original entry on oeis.org

0, 2, 10, 13, 14, 46, 67, 68, 77, 82, 85, 86, 238, 355, 356, 461, 466, 469, 470, 503, 526, 547, 548, 557, 562, 565, 566, 1438, 2155, 2156, 2861, 2866, 2869, 2870, 3503, 3526, 3547, 3548, 3557, 3562, 3565, 3566, 3719, 3838, 3955, 3956, 4061, 4066, 4069, 4070, 4103
Offset: 1

Views

Author

Amiram Eldar, Apr 16 2021

Keywords

Comments

The number of terms with k > 1 digits in factorial base is 2^(k-1) - 1 = A000225(k-1).
The number of terms below k!, for k >= 1, is 2^(k-1) - (k-1) = A000325(k-1).

Examples

			2 is a term since its factorial base representation is {1, 0}.
10, 13 and 14 are terms since their factorial base representations are {1, 2, 0}, {2, 0, 1} and {2, 1, 0}, respectively.
		

Crossrefs

A065355 is a subsequence.

Programs

  • Mathematica
    m = 7; bases = Reverse @ Range[2, m]; max = Times @@ bases; factBase[n_] := IntegerDigits[n, MixedRadix[bases]]; q[n_] := Union[(fd = factBase[n])] == Range[0, Length[fd] - 1]; Select[Range[0, max], q]

A092139 Duplicate of A084558.

Original entry on oeis.org

0, 1, 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
Offset: 0

Views

Author

Keywords

A055089 List of all finite permutations in reversed colexicographic ordering.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 18 2000

Keywords

Examples

			In this table, each row consists of A001563(n) permutations of n+1 terms; i.e., we have (1/) 2,1/ 1,3,2; 3,1,2; 2,3,1; 3,2,1/ 1,2,4,3; 2,1,4,3; ... .
Append to each an infinite number of fixed terms and we get a list of rearrangements of the natural numbers, but with only a finite number of terms permuted:
1/2,3,4,5,6,7,8,9,...
2,1/3,4,5,6,7,8,9,...
1,3,2/4,5,6,7,8,9,...
3,1,2/4,5,6,7,8,9,...
2,3,1/4,5,6,7,8,9,...
3,2,1/4,5,6,7,8,9,...
1,2,4,3/5,6,7,8,9,...
2,1,4,3/5,6,7,8,9,...
Alternatively, if we take only the first n terms of each such infinite row, then the first n! rows give all permutations of the elements 1,2,...,n.
		

Crossrefs

Inversion vectors: A007623, cycle counts: A055090, minimum number of transpositions: A055091, minimum number of adjacent transpositions: A034968, order of each permutation: A055092, number of non-fixed elements: A055093, positions of inverses: A056019, positions after Foata transform: A065181; positions of fixed-point-free involutions: A064640.
Cf. A195663, array of the infinite rows.
This permutation list gives essentially the same information as A030298/A030299, but in a more compact way, by skipping those permutations of A030298 that start with a fixed element.
A220658(n) gives the rank r of the permutation of which the term at a(n) is an element.
A220659(n) gives the zero-based position (from the left) of that a(n) in that permutation of rank r.
A084558(r)+1 gives the size of the finite subsequence (of the r-th infinite, but finitary permutation) which has been included in this list.

Programs

  • Maple
    factorial_base := proc(nn) local n,a,d,j,f; n := nn; if(0 = n) then RETURN([0]); fi; a := []; f := 1; j := 2; while(n > 0) do d := floor(`mod`(n,(j*f))/f); a := [d,op(a)]; n := n - (d*f); f := j*f; j := j+1; od; RETURN(a); end;
    fexlist2permlist := proc(a) local n,b,j; n := nops(a); if(0 = n) then RETURN([1]); fi; b := fexlist2permlist(cdr(a)); for j from 1 to n do if(b[j] >= ((n+1)-a[1])) then b[j] := b[j]+1; fi; od; RETURN([op(b),(n+1)-a[1]]); end;
    fac_base := n -> fac_base_aux(n,2); fac_base_aux := proc(n,i) if(0 = n) then RETURN([]); else RETURN([op(fac_base_aux(floor(n/i),i+1)), (n mod i)]); fi; end;
    PermRevLexUnrank := n -> `if`((0 = n),[1],fexlist2permlist(fac_base(n)));
    cdr := proc(l) if 0 = nops(l) then ([]) else (l[2..nops(l)]); fi; end; # "the tail of the list"
    # Same algorithm in different guise, showing how permutations are composed of adjacent transpositions (compare to algorithm PermUnrank3R at A060117):
    PermRevLexUnrankAMSDaux := proc(n,r, pp) local s,p,k; p := pp; if(0 = r) then RETURN(p); else s := floor(r/((n-1)!)); for k from n-s to n-1 do p := permul(p,[[k,k+1]]); od; RETURN(PermRevLexUnrankAMSDaux(n-1, r-(s*((n-1)!)), p)); fi; end;
    PermRevLexUnrankAMSD := proc(r) local n; n := nops(factorial_base(r)); convert(PermRevLexUnrankAMSDaux(n+1,r,[]),'permlist',1+(((r+2) mod (r+1))*n)); end;
  • Mathematica
    A055089L[n_] := Reverse@SortBy[DeleteCases[Permutations@Range@n, {, n}], Reverse]; Flatten@Array[A055089L, 4] (* JungHwan Min, Aug 28 2016 *)

Formula

[seq(op(PermRevLexUnrank(j)), j=0..)]; (see Maple code given below).

Extensions

Name changed by Tilman Piesk, Feb 01 2012

A060130 Number of nonzero digits in factorial base representation (A007623) of n; minimum number of transpositions needed to compose each permutation in the lists A060117 & A060118.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 02 2001

Keywords

Examples

			19 = 3*(3!) + 0*(2!) + 1*(1!), thus it is written as "301" in factorial base (A007623). The count of nonzero digits in that representation is 2, so a(19) = 2.
		

Crossrefs

Cf. A227130 (positions of even terms), A227132 (of odd terms).
The topmost row and the leftmost column in array A230415, the left edge of triangle A230417.
Differs from similar A267263 for the first time at n=30.

Programs

  • Maple
    A060130(n) = count_nonfixed(convert(PermUnrank3R(n), 'disjcyc'))-nops(convert(PermUnrank3R(n), 'disjcyc')) or nops(fac_base(n))-nops(positions(0, fac_base(n)))
    fac_base := n -> fac_base_aux(n, 2); fac_base_aux := proc(n, i) if(0 = n) then RETURN([]); else RETURN([op(fac_base_aux(floor(n/i), i+1)), (n mod i)]); fi; end;
    count_nonfixed := l -> convert(map(nops, l), `+`);
    positions := proc(e, ll) local a, k, l, m; l := ll; m := 1; a := []; while(member(e, l[m..nops(l)], 'k')) do a := [op(a), (k+m-1)]; m := k+m; od; RETURN(a); end;
    # For procedure PermUnrank3R see A060117
  • Mathematica
    Block[{nn = 105, r}, r = MixedRadix[Reverse@ Range[2, -1 + SelectFirst[Range@ 12, #! > nn &]]]; Array[Count[IntegerDigits[#, r], k_ /; k > 0] &, nn, 0]] (* Michael De Vlieger, Dec 30 2017 *)
  • Scheme
    (define (A060130 n) (let loop ((n n) (i 2) (s 0)) (cond ((zero? n) s) (else (loop (quotient n i) (+ 1 i) (+ s (if (zero? (remainder n i)) 0 1)))))))
    ;; Two other implementations, that use memoization-macro definec:
    (definec (A060130 n) (if (zero? n) n (+ 1 (A060130 (A257687 n)))))
    (definec (A060130 n) (if (zero? n) n (+ (A257511 n) (A060130 (A257684 n)))))
    ;; Antti Karttunen, Dec 30 2017

Formula

a(0) = 0; for n > 0, a(n) = 1 + a(A257687(n)).
a(0) = 0; for n > 0, a(n) = A257511(n) + a(A257684(n)).
a(n) = A060129(n) - A060128(n).
a(n) = A084558(n) - A257510(n).
a(n) = A275946(n) + A275962(n).
a(n) = A275948(n) + A275964(n).
a(n) = A055091(A060119(n)).
a(n) = A069010(A277012(n)) = A000120(A275727(n)).
a(n) = A001221(A275733(n)) = A001222(A275733(n)).
a(n) = A001222(A275734(n)) = A001222(A275735(n)) = A001221(A276076(n)).
a(n) = A046660(A275725(n)).
a(A225901(n)) = a(n).
A257511(n) <= a(n) <= A034968(n).
A275806(n) <= a(n).
a(A275804(n)) = A060502(A275804(n)). [A275804 gives all the positions where this coincides with A060502.]
a(A276091(n)) = A260736(A276091(n)). [A276091 gives all the positions where this coincides with A260736.]

Extensions

Example-section added, name edited, the old Maple-code moved away from the formula-section, and replaced with all the new formulas by Antti Karttunen, Dec 30 2017
Previous Showing 11-20 of 61 results. Next