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

A064637 Setwise difference of A060132 and A059590. Those terms of A060132 which are not representable as a sum of distinct factorials.

Original entry on oeis.org

16, 17, 40, 41, 60, 61, 62, 63, 136, 137, 160, 161, 180, 181, 182, 183, 288, 289, 290, 291, 294, 295, 296, 297, 304, 305, 316, 317, 450, 451, 452, 453, 736, 737, 760, 761, 780, 781, 782, 783, 856, 857, 880, 881, 900, 901, 902, 903, 1008, 1009, 1010, 1011
Offset: 0

Views

Author

Antti Karttunen, Oct 02 2001

Keywords

Comments

16 is included, as 16 = 220 in factorial base and by following the algorithm PermRevLexUnrankAMSD in A055089 we get the composition (2 3)(3 4) (1 2)(2 3) which, although consisting of different transpositions, is equal to the composition (4 2)(3 1) = 3412 produced by algorithm PermUnrank3R at A060117.

Crossrefs

A064637 := list_diff(A060132, A059590),
Cf. A064477.

Programs

  • Maple
    list_diff := proc(a,b) local c,e; c := []; for e in a do if(not member(e,b)) then c := [op(c),e]; fi; od; RETURN(c); end;

A257260 One-based position of the rightmost zero in the factorial base representation of n (A007623), 0 if no nonleading zeros present.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 29 2015

Keywords

Comments

a(n) gives the distance of the rightmost zero from the right hand end of factorial base representation of n (A007623), particularly, 1 when n is even, and 0 for those cases when there are no nonleading zeros present (terms of A227157).
Sequence starts from n=1, to avoid ambiguities with case zero.

Examples

			For n = 1, with factorial base representation (A007623) "1", there are no nonleading zeros at all, thus a(1) = 0.
For n = 6, with representation "100", the rightmost zero occurs at digit-position 1 (when the least significant digit has index 1, etc.), thus a(6) = 1.
For n = 7, with representation "101", the rightmost zero occurs at position 2, thus a(7) = 2.
		

Crossrefs

Cf. A007623, A227157 (positions of zeros), A000012 (even bisection).
Cf. also A257261, A230403, and arrays of permutations A060117 and A060118.

Programs

  • Mathematica
    a[n_] := Module[{k = n, m = 2, r, s = {}, p}, While[{k, r} = QuotientRemainder[k, m]; k != 0|| r != 0, AppendTo[s, r]; m++]; If[MissingQ[(p = FirstPosition[s, 0])], 0, p[[1]]]]; Array[a, 100] (* Amiram Eldar, Feb 07 2024 *)
  • Scheme
    (define (A257260 n) (let loop ((n n) (i 2)) (cond ((zero? n) 0) ((zero? (modulo n i)) (- i 1)) (else (loop (floor->exact (/ n i)) (+ 1 i))))))

A375302 a(n) is the rank of row n of A375301 in a lexicographic permutation of [1, ..., n].

Original entry on oeis.org

0, 0, 5, 14, 5, 119, 5039, 34406, 22589, 10919, 7625519, 83825279, 39916799
Offset: 1

Views

Author

Hugo Pfoertner, Aug 25 2024

Keywords

Comments

See A375301 for more information.

Crossrefs

Programs

  • PARI
    \\ Blai Bonet's ranking algorithm
    rank(P) = {my(n=#P, k=logint(n,2)+1, T=vector(2^(k+1)-1,i,0), r=0);
    for(i=1, n, my(ctr=P[i], node=2^k+P[i]); for(j=1, k, if(node%2, ctr-=T[(node>>1)<<1]); T[node]++; node=node>>1); T[node]++; r=r*(n+1-i)+ctr); r-sum(k=0, n-1, k!)};
    \\ uses function a375301_row from A375301
    a(n) = rank(a375301_row(n))

A275852 Positions of zeros in A275851.

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 15, 16, 17, 20, 21, 23, 27, 29, 31, 33, 35, 39, 40, 41, 44, 45, 47, 55, 57, 59, 61, 63, 64, 65, 67, 68, 69, 71, 79, 81, 82, 83, 87, 88, 89, 92, 93, 94, 95, 103, 104, 105, 107, 110, 111, 112, 113, 116, 117, 119, 127, 129, 131, 135, 136, 137, 140, 141, 143, 147, 149, 151, 153, 155, 159, 160, 161, 164, 165, 167, 175, 177, 179, 181
Offset: 1

Views

Author

Antti Karttunen, Aug 11 2016

Keywords

Comments

These are indices of derangements in permutation lists A060117 & A060118 when only elements in range [1..(1+A084558(n))] are considered to be a part of the finite permutation whose rank number is n.

Crossrefs

Subsequence of A273670.
Previous Showing 51-54 of 54 results.