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

A225901 Write n in factorial base, then replace each nonzero digit d of radix k with k-d.

Original entry on oeis.org

0, 1, 4, 5, 2, 3, 18, 19, 22, 23, 20, 21, 12, 13, 16, 17, 14, 15, 6, 7, 10, 11, 8, 9, 96, 97, 100, 101, 98, 99, 114, 115, 118, 119, 116, 117, 108, 109, 112, 113, 110, 111, 102, 103, 106, 107, 104, 105, 72, 73, 76, 77, 74, 75, 90, 91, 94, 95, 92, 93, 84, 85, 88, 89, 86, 87, 78, 79, 82, 83, 80, 81, 48, 49, 52, 53, 50, 51, 66, 67, 70, 71, 68
Offset: 0

Views

Author

Paul Tek, May 20 2013

Keywords

Comments

Analogous to A004488 or A048647 for the factorial base.
A self-inverse permutation of the natural numbers.
From Antti Karttunen, Aug 16-29 2016: (Start)
Consider the following way to view a factorial base representation of nonnegative integer n. For each nonzero digit d_i present in the factorial base representation of n (where i is the radix = 2.. = one more than 1-based position from the right), we place a pebble to the level (height) d_i at the corresponding column i of the triangular diagram like below, while for any zeros the corresponding columns are left empty:
.
Level
6 o
─ ─
5 . .
─ ─ ─
4 . . .
─ ─ ─ ─
3 . . . .
─ ─ ─ ─ ─
2 . . o . .
─ ─ ─ ─ ─ ─
1 . o . . o o
─ ─ ─ ─ ─ ─ ─
Radix: 7 6 5 4 3 2
Digits: 6 1 2 0 1 1 = A007623(4491)
Instead of levels, we can observe on which "slope" each pebble (nonzero digit) is located at. Formally, the slope of nonzero digit d_i with radix i is (i - d_i). Thus in above example, both the most significant digit (6) and the least significant 1 are on slope 1 (called "maximal slope", because it contains digits that are maximal allowed in those positions), while the second 1 from the right is on slope 2 ("submaximal slope").
This involution (A225901) sends each nonzero digit at level k to the slope k (and vice versa) by flipping such a diagram by the shallow diagonal axis that originates from the bottom right corner. Thus, from above diagram we obtain:
Slope (= digit's radix - digit's value)
1
2 .
3 . .╲
4 . .╲o╲
5 . .╲.╲.╲
6 . .╲.╲o╲.╲
. .╲.╲.╲.╲o╲
o╲.╲.╲.╲.╲o╲
-----------------
1 5 3 0 2 1 = A007623(1397)
and indeed, a(4491) = 1397 and a(1397) = 4491.
Thus this permutation maps between polynomial encodings A275734 & A275735 and all the respective sequences obtained from them, where the former set of sequences are concerned with the "slopes" and the latter set with the "levels" of the factorial base representation. See the Crossrefs section.
Sequences A231716 and A275956 are closed with respect to this sequence, in other words, for all n, a(A231716(n)) is a term of A231716 and a(A275956(n)) is a term of A275956.
(End)

Examples

			a(1000) = a(1*6! + 2*5! + 1*4! + 2*3! + 2*2!) = (7-1)*6! + (6-2)*5! + (5-1)*4! + (4-2)*3! + (3-2)*2! = 4910.
a(1397) = a(1*6! + 5*5! + 3*4! + 0*3! + 2*2! + 1*1!) = (7-1)*6! + (6-5)*5! + (5-3)*4! + (3-2)*2! + (2-1)*1! = 4491.
		

Crossrefs

Cf. A275959 (fixed points), A231716, A275956.
This involution maps between the following sequences related to "levels" and "slopes" (see comments): A275806 <--> A060502, A257511 <--> A260736, A264990 <--> A275811, A275729 <--> A275728, A275948 <--> A275946, A275949 <--> A275947, A275964 <--> A275962, A059590 <--> A276091.

Programs

  • Mathematica
    b = MixedRadix[Reverse@ Range[2, 12]]; Table[FromDigits[Map[Boole[# > 0] &, #] (Reverse@ Range[2, Length@ # + 1] - #), b] &@ IntegerDigits[n, b], {n, 0, 82}] (* Version 10.2, or *)
    f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], Times @@ Range[# - i]]], {i, 0, #}] &@ NestWhile[# + 1 &, 0, Times @@ Range[# + 1] <= n &]; Most@ Rest[a][[All, 1]] /. {} -> {0}]; g[w_List] := Total[Times @@@ Transpose@ {Map[Times @@ # &, Range@ Range[0, Length@ w]], Reverse@ Append[w, 0]}]; Table[g[Map[Boole[# > 0] &, #] (Reverse@ Range[2, Length@ # + 1] - #)] &@ f@ n, {n, 0, 82}] (* Michael De Vlieger, Aug 29 2016 *)
  • PARI
    a(n)=my(s=0,d,k=2);while(n,d=n%k;n=n\k;if(d,s=s+(k-d)*(k-1)!);k=k+1);return(s)
    
  • Python
    from sympy import factorial as f
    def a(n):
        s=0
        k=2
        while(n):
            d=n%k
            n=(n//k)
            if d: s=s+(k - d)*f(k - 1)
            k+=1
        return s
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 19 2017
  • Scheme
    (define (A225901 n) (let loop ((n n) (z 0) (m 2) (f 1)) (cond ((zero? n) z) (else (loop (quotient n m) (if (zero? (modulo n m)) z (+ z (* f (- m (modulo n m))))) (+ 1 m) (* f m))))))
    ;; One implementing the first recurrence, with memoization-macro definec:
    (definec (A225901 n) (if (zero? n) n (+ (A276091 (A275736 n)) (A153880 (A225901 (A257684 n))))))
    ;; Antti Karttunen, Aug 29 2016
    

Formula

From Antti Karttunen, Aug 29 2016: (Start)
a(0) = 0; for n >= 1, a(n) = A276091(A275736(n)) + A153880(a(A257684(n))).
or, for n >= 1, a(n) = A276149(n) + a(A257687(n)).
(End)
Other identities. For n >= 0:
a(n!) = A001563(n).
a(n!-1) = A007489(n-1).
From Antti Karttunen, Aug 16 2016: (Start)
A275734(a(n)) = A275735(n) and vice versa, A275735(a(n)) = A275734(n).
A060130(a(n)) = A060130(n). [The flip preserves the number of nonzero digits.]
A153880(n) = a(A255411(a(n))) and A255411(n) = a(A153880(a(n))). [This involution conjugates between the two fundamental factorial base shifts.]
a(n) = A257684(a(A153880(n))) = A266193(a(A255411(n))). [Follows from above.]
A276011(n) = A273662(a(A273670(n))).
A276012(n) = A273663(a(A256450(n))).
(End)

A153880 Shift factorial base representation left by one digit.

Original entry on oeis.org

0, 2, 6, 8, 12, 14, 24, 26, 30, 32, 36, 38, 48, 50, 54, 56, 60, 62, 72, 74, 78, 80, 84, 86, 120, 122, 126, 128, 132, 134, 144, 146, 150, 152, 156, 158, 168, 170, 174, 176, 180, 182, 192, 194, 198, 200, 204, 206, 240, 242, 246, 248, 252, 254, 264, 266, 270, 272
Offset: 0

Views

Author

Antti Karttunen, Jan 03 2009

Keywords

Comments

Equally, append 0 to the end of the factorial base representation of n (= A007623(n)), then convert back to decimal.
Involution A225901 maps each term of this sequence to a unique term of A255411, and vice versa.

Examples

			Factorial base representation of 5 is A007623(5) = "21". Shifting this once left (that is, appending 0 to the end) yields "210", which is factorial base representation for 14. Thus a(5) = 14.
		

Crossrefs

Indices of zeros in A260736.
Cf. A153883 (terms divided by 2).
Cf. A266193 (a left inverse).
Cf. A273670 (complement).
Cf. also A007623, A225901, A255411.

Programs

  • Mathematica
    Table[Function[b, FromDigits[IntegerDigits[n, b]~Join~{0}, b]]@ MixedRadix[Reverse@ Range@ 12], {n, 0, 57}] (* Michael De Vlieger, May 30 2016, Version 10.2 *)
  • Python
    from sympy import factorial as f
    def a007623(n, p=2): return n if n
  • Scheme
    (define (A153880 n) (let loop ((n n) (z 0) (i 2) (f 2)) (cond ((zero? n) z) (else (loop (floor->exact (/ n i)) (+ (* f (modulo n i)) z) (+ 1 i) (* f (+ i 1)))))))
    

Formula

Other identities. For all n >= 0:
A266193(a(n)) = n.

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

A273670 Numbers with at least one maximal digit in their factorial base representation.

Original entry on oeis.org

1, 3, 4, 5, 7, 9, 10, 11, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 27, 28, 29, 31, 33, 34, 35, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 51, 52, 53, 55, 57, 58, 59, 61, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 75, 76, 77, 79, 81, 82, 83, 85, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105
Offset: 0

Views

Author

Antti Karttunen, May 29 2016

Keywords

Comments

Indexing starts from 0 (with a(0) = 1) to tally with the indexing used in A256450.
Numbers n for which is A260736(n) > 0.
Involution A225901 maps each term of this sequence to a unique term of A256450, and vice versa.

Crossrefs

Cf. A153880 (complement).
Cf. A273663 (a left inverse).
Cf. A260736.
Cf. also A225901, A256450.

Programs

  • Mathematica
    r = MixedRadix[Reverse@ Range[2, 12]]; Select[Range@ 105, Total@ Boole@ Map[SameQ @@ # &, Transpose@{#, Range@ Length@ #}] > 0 &@ Reverse@ IntegerDigits[#, r] &] (* Michael De Vlieger, Aug 14 2016, Version 10.2 *)
  • 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==1 else sum([int(y[i])*f(i + 1) for i in range(len(y))]) def a260736(n): return 0 if n==0 else n%2 + a260736(a257684(n)) print([n for n in range(106) if a260736(n)>0]) # Indranil Ghosh, Jun 20 2017

Formula

a(0) = 1, and for n > 1, if A260736(1+a(n-1)) > 0, then a(n) = a(n-1) + 1, otherwise a(n-1) + 2. [In particular, if the previous term is 2k, then the next term is 2k+1, because all odd numbers are members.]
Other identities. For all n >= 0:
A273663(a(n)) = n.

A060502 a(n) = number of occupied digit slopes in the factorial base representation of n (see comments for the definition); number of drops in the n-th permutation of list A060117.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 22 2001

Keywords

Comments

From Antti Karttunen, Aug 11-24 2016: (Start)
a(n) gives the number of occupied "digit slopes" in the factorial base representation of n, or more formally, the number of distinct elements in a multiset [(i_x - d_x) | where d_x ranges over each nonzero digit present in factorial base representation of n and i_x is that digit's position from the right]. Here one-based indexing is used, thus the least significant digit is in position 1. Each value {digit's position} - {digit's value} determines on which slope that particular nonzero digit is. The nonzero digits for which (position - digit) = 0, are said to be on the "maximal slope" (see A260736), those with value 1 on "sub-maximal", etc.
The number of occupied digit slopes translates directly to the number of drops in the n-th permutation as given in the list A060117 because only the largest (and thus leftmost) of all nonzero digits on any particular slope adds a (single) drop to the permutation, when constructed by the unranking algorithm employed in A060117.
The original definition of this sequence is (essentially):
a(n) = the average of digits (where "digits" may eventually obtain also any values > 9) in each siteswap pattern A060498(n) constructed from each permutation in list A060117, which is equal to number of balls used in that pattern.
The equivalence of the old and the new definitions is seen from the following (as kindly pointed by Olivier Gérard in personal mail): For any permutation p of [1..n], Sum(i=1..n) p(i)-i = 0 (whether taken modulo n or not), thus Sum(i=1..n) (p(i)-i modulo n) = Sum(i={set of nondrops}) (p(i)-i) + Sum(i={set of drops}) (n + (p(i)-i)) = 0 + n * #{set of drops}, where drops is the set of those i where p[i] < i and nondrops are those i for which p[i] >= 1.
Involution A225901 maps this metric to another metric A275806 which gives the number of distinct nonzero digits in factorial base representation of n. See also A275811.
A007489 (repunits in this context) gives the positions where a(n) = A084558(n) (the length of factorial base representation of n). These are also the positions of records.
(End)

Examples

			For n=23 ("321" in factorial base representation, A007623), all the digits are maximal for their positions (they occur on the "maximal slope"), thus there is only one distinct digit slope present and a(23)=1. Also, for the 23rd permutation in the ordering A060117, [2341], there is just one drop, as p[4] = 1 < 4.
For n=29 ("1021"), there are three nonzero digits, where both 2 and the rightmost 1 are on the maximal slope, while the most significant 1 is on the "sub-sub-sub-maximal", thus there are two occupied slopes in total, and a(29) = 2. In the 29th permutation of A060117, [23154], there are two drops as p[3] = 1 < 3 and p[5] = 4 < 5.
For n=37 ("1201"), there are three nonzero digits, where the rightmost 1 is on the maximal slope, 2 is on the submaximal, and the most significant 1 is on the "sub-sub-sub-maximal", thus there are three occupied slopes in total, and a(37) = 3. In the 37th permutation of A060117, [51324], there are three drops at indices 2, 4 and 5.
		

Crossrefs

Cf. A007489 (positions of records, the first occurrence of each n).
Cf. A276001, A276002, A276003 (positions where a(n) obtains values 1, 2, 3).

Programs

  • Maple
    # The following program follows the original 2001 interpretation of this sequence:
    A060502 := n -> avg(Perm2SiteSwap3(PermUnrank3R(n)));
    with(group);
    permul := (a, b) -> mulperms(b, a);
    # factorial_base(n) gives the digits of A007623(n) as a list, uncorrupted even when there are digits > 9:
    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;
    # PermUnrank3R(r) gives the permutation with rank r in list A060117:
    PermUnrank3R := proc(r) local n; n := nops(factorial_base(r)); convert(PermUnrank3Raux(n+1, r, []), 'permlist', 1+(((r+2) mod (r+1))*n)); end;
    PermUnrank3Raux := proc(n, r, p) local s; if(0 = r) then RETURN(p); else s := floor(r/((n-1)!)); RETURN(PermUnrank3Raux(n-1, r-(s*((n-1)!)), permul(p, [[n, n-s]]))); fi; end;
    Perm2SiteSwap3 := proc(p) local ip,n,i,a; n := nops(p); ip := convert(invperm(convert(p,'disjcyc')),'permlist',n); a := []; for i from 1 to n do if(0 = ((ip[i]-i) mod n)) then a := [op(a),0]; else a := [op(a), n-((ip[i]-i) mod n)]; fi; od; RETURN(a); end;
    avg := a -> (convert(a, `+`)/nops(a));

Formula

From Antti Karttunen, Aug 11-21 2016: (Start)
The following formula reflects the original definition of computing the average, with a few unnecessary steps eliminated:
a(n) = 1/s * Sum_{i=1..s} ((p[i]-i) modulo s), where p is the permutation of rank n as ordered in the list A060117, and s is its size (the number of its elements) computed as s = 1+A084558(n).
a(n) = Sum_{i=1..s} [p[i]
a(n) = 1/s * Sum_{i=1..s} ((i-p[i]) modulo s). [If inverse permutations from list A060118 are used, then we just flip the order of difference that is used in the first formula].
Following formulas do not need intermediate construction of permutation lists:
a(n) = A001221(A275734(n)).
a(n) = A275806(A225901(n)).
a(n) = A000120(A276010(n)).
Other identities and observations. For all n >= 0:
a(n) = A275946(n) + A275947(n).
a(n) = A060500(A060125(n)).
a(n) = A060128(n) + A276004(n).
a(n) = A060129(n) - A060500(n).
a(n) = A084558(n) - A275849(n) = 1 + A084558(n) - A060501(n).
a(A007489(n)) = n. [Particularly, A007489(n) gives the position of the first occurrence of each n.]
A060128(n) <= a(n) <= A060129(n).
a(n!) = 1.
a(A033312(n)) = 1 for all n > 1.
a(A059590(n)) = A000120(n).
a(A060112(n)) = A007895(n).
a(n) = a(A153880(n)) = a(A255411(n)). [The shift-operations do not change the number of distinct slopes.]
a(A275804(n)) = A060130(A275804(n)). [A275804 gives all the positions where this coincides with A060130.]
(End)

Extensions

Entry revised, with a new interpretation and formulas. Maple-code cleaned up. - Antti Karttunen, Aug 11 2016
Another new interpretation added and the original definition moved to the comments - Antti Karttunen, Aug 24 2016

A275734 Prime-factorization representations of "factorial base slope polynomials": a(0) = 1; for n >= 1, a(n) = A275732(n) * a(A257684(n)).

Original entry on oeis.org

1, 2, 3, 6, 2, 4, 5, 10, 15, 30, 10, 20, 3, 6, 9, 18, 6, 12, 2, 4, 6, 12, 4, 8, 7, 14, 21, 42, 14, 28, 35, 70, 105, 210, 70, 140, 21, 42, 63, 126, 42, 84, 14, 28, 42, 84, 28, 56, 5, 10, 15, 30, 10, 20, 25, 50, 75, 150, 50, 100, 15, 30, 45, 90, 30, 60, 10, 20, 30, 60, 20, 40, 3, 6, 9, 18, 6, 12, 15, 30, 45, 90, 30, 60, 9, 18, 27
Offset: 0

Author

Antti Karttunen, Aug 08 2016

Keywords

Comments

These are prime-factorization representations of single-variable polynomials where the coefficient of term x^(k-1) (encoded as the exponent of prime(k) in the factorization of n) is equal to the number of nonzero digits that occur on the slope (k-1) levels below the "maximal slope" in the factorial base representation of n. See A275811 for the definition of the "digit slopes" in this context.

Examples

			For n=23 ("321" in factorial base representation, A007623), all three nonzero digits are maximal for their positions (they all occur on "maximal slope"), thus a(23) = prime(1)^3 = 2^3 = 8.
For n=29 ("1021"), there are three nonzero digits, where both 2 and the rightmost 1 are on the "maximal slope", while the most significant 1 is on the "sub-sub-sub-maximal", thus a(29) = prime(1)^2 * prime(4)^1 = 2*7 = 28.
For n=37 ("1201"), there are three nonzero digits, where the rightmost 1 is on the maximal slope, 2 is on the sub-maximal, and the most significant 1 is on the "sub-sub-sub-maximal", thus a(37) = prime(1) * prime(2) * prime(4) = 2*3*7 = 42.
For n=55 ("2101"), the least significant 1 is on the maximal slope, and the digits "21" at the beginning are together on the sub-sub-maximal slope (as they are both two less than the maximal digit values 4 and 3 allowed in those positions), thus a(55) = prime(1)^1 * prime(3)^2 = 2*25 = 50.
		

Crossrefs

Cf. A275811.
Cf. A275804 (indices of squarefree terms), A275805 (of terms not squarefree).
Cf. also A275725, A275733, A275735, A276076 for other such prime factorization encodings of A060117/A060118-related polynomials.

Programs

  • Python
    from operator import mul
    from sympy import prime, factorial as f
    def a007623(n, p=2): return n if n

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

Formula

a(0) = 1; for n >= 1, a(n) = A275732(n) * a(A257684(n)).
Other identities and observations. For all n >= 0:
a(n) = A275735(A225901(n)).
a(A007489(n)) = A002110(n).
A001221(a(n)) = A060502(n).
A001222(a(n)) = A060130(n).
A007814(a(n)) = A260736(n).
A051903(a(n)) = A275811(n).
A048675(a(n)) = A275728(n).
A248663(a(n)) = A275808(n).
A056169(a(n)) = A275946(n).
A056170(a(n)) = A275947(n).
A275812(a(n)) = A275962(n).

A257511 Number of 1's in factorial base representation of n (A007623).

Original entry on oeis.org

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

Author

Antti Karttunen, Apr 27 2015

Keywords

Crossrefs

Cf. A255411 (numbers n such that a(n) = 0), A255341 (such that a(n) = 1), A255342 (such that a(n) = 2), A255343 (such that a(n) = 3).
Positions of records: A007489.
Cf. also A257510.

Programs

  • Mathematica
    factBaseIntDs[n_] := Module[{m, i, len, dList, currDigit}, i = 1; While[n > i!, i++]; m = n; len = i; dList = Table[0, {len}]; Do[currDigit = 0; While[m >= j!, m = m - j!; currDigit++]; dList[[len - j + 1]] = currDigit, {j, i, 1, -1}]; If[dList[[1]] == 0, dList = Drop[dList, 1]]; dList]; s = Table[FromDigits[factBaseIntDs@ n], {n, 0, 120}];
    First@ DigitCount[#] & /@ s (* Michael De Vlieger, Apr 27 2015, after Alonso del Arte at A007623 *)
    nn = 120; b = Module[{m = 1}, While[Factorial@ m < nn, m++]; MixedRadix[Reverse@ Range[2, m]]]; Table[Count[IntegerDigits[n, b], 1], {n, 0, nn}] (* Michael De Vlieger, Aug 29 2016, Version 10.2 *)
  • Scheme
    (define (A257511 n) (let loop ((n n) (i 2) (s 0)) (cond ((zero? n) s) (else (loop (floor->exact (/ n i)) (+ 1 i) (+ s (if (= 1 (modulo n i)) 1 0)))))))

Formula

a(0) = 0; for n >= 1, a(n) = A265333(n) + a(A257687(n)). - Antti Karttunen, Aug 29 2016
Other identities and observations. For all n >= 0:
a(n) = A260736(A225901(n)).
a(n) = A001221(A275732(n)) = A001222(A275732(n)).
a(n) = A007814(A275735(n)).
a(n) = A056169(A276076(n)).
a(A007489(n)) = n. [Particularly, A007489(n) gives the position where n first appears.]
a(n) <= A060130(n) <= A034968(n).

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

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).

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

A275811 Number of nonzero digits on a maximally occupied slope of factorial base representation of n: a(n) = A051903(A275734(n)). See comments for the definition.

Original entry on oeis.org

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

Author

Antti Karttunen, Aug 10 2016

Keywords

Comments

Digit slopes are called "maximal", "sub-maximal", "sub-sub-maximal", etc. For digit-positions we employ one-based indexing, thus we say that the least significant digit of factorial base expansion of n is in position 1, etc. The maximal digit slope is occupied when there is at least one digit-position k that contains digit k (maximal digit allowed in that position), so that A260736(n) > 0, and n is thus a term of A273670. The sub-maximal digit slope is occupied when there is at least one nonzero digit k in a digit-position k+1. The sub-sub-maximal slope is occupied when there is at least one nonzero digit k in a digit-position k+2, etc. This sequence gives the number of nonzero digits on a slope (of possibly several) for which there exists no other slopes with more nonzero digits. See the examples.
In other words: a(n) gives the number of occurrences of a most common element in the multiset [(i_x - d_x) | where d_x ranges over each nonzero digit present in factorial base representation of n and i_x is that digit's position from the right].
Involution A225901 maps this metric to another metric A264990 which gives the maximal number of equal nonzero digits occurring in factorial base representation (A007623) of n. See also A060502.

Examples

			For n=23 ("321" in factorial base representation, A007623), all three nonzero digits are maximal for their positions (they all occur on "maximal slope"), thus the "maximal slope" is also the "maximally occupied slope" (as there are no other occupied slopes present), and a(23) = 3.
For n=29 ("1021"), there are three nonzero digits, where both 2 and the rightmost 1 are on the "maximal slope", while the most significant 1 is on the "sub-sub-sub-maximal", thus here the "maximal slope" is also the "maximally occupied slope" (with 2 nonzero digits present), and a(29) = 2.
For n=37 ("1201"), there are three nonzero digits, where the rightmost 1 is on the maximal slope, 2 is on the sub-maximal, and the most significant 1 is on the "sub-sub-sub-maximal", thus there are three occupied slopes in total, all with just one nonzero digit present, and a(37) = 1.
For n=55 ("2101"), the least significant 1 is on the maximal slope, and the digits "21" at the beginning are together on the sub-sub-maximal slope (as they are both two less than the maximal digit values 4 and 3 allowed in those positions), thus here the sub-sub-maximal slope is the "maximally occupied slope" with its two occupiers, and a(55) = 2.
		

Crossrefs

Cf. A275804 (gives the indices of 0 and 1's), A275805 (gives the indices of terms > 1).

Programs

  • Python
    from sympy import prime, factorint
    from operator import mul
    from functools import reduce
    from sympy import factorial as f
    def a051903(n): return 0 if n==1 else max(factorint(n).values())
    def a007623(n, p=2): return n if n

    0 else '0' for i in x])[::-1] return 0 if n==1 else sum([int(y[i])*f(i + 1) for i in range(len(y))]) def a275734(n): return 1 if n==0 else a275732(n)*a275734(a257684(n)) def a(n): return 0 if n==0 else a051903(a275734(n)) print([a(n) for n in range(201)]) # Indranil Ghosh, Jun 20 2017

Formula

a(n) = A051903(A275734(n)).
a(n) = A264990(A225901(n)).

Extensions

Signs in comment corrected and clarification added by Antti Karttunen, Aug 16 2016

A276951 Index of column where n is located in array A276953 (equally: row in A276955).

Original entry on oeis.org

0, 1, 1, 2, 3, 4, 1, 5, 2, 6, 7, 8, 3, 9, 4, 10, 11, 12, 13, 14, 15, 16, 17, 18, 1, 19, 5, 20, 21, 22, 2, 23, 6, 24, 25, 26, 7, 27, 8, 28, 29, 30, 31, 32, 33, 34, 35, 36, 3, 37, 9, 38, 39, 40, 4, 41, 10, 42, 43, 44, 11, 45, 12, 46, 47, 48, 49, 50, 51, 52, 53, 54, 13, 55, 14, 56, 57, 58, 15, 59, 16, 60, 61, 62, 17, 63, 18, 64
Offset: 0

Author

Antti Karttunen, Sep 22 2016

Keywords

Comments

a(0) = 0 by convention, because 0 is not present in arrays A276953 and A276955.

Crossrefs

Cf. arrays A276953 & A276955. A276949 gives their other index.
Cf. also A257681, A275847.

Programs

Formula

a(0) = 0; for n >= 1, if A260736(n) > 0 [when A276950(n) is not zero, when n is in A273670], then a(n) = A276952(n) = 1 + A273663(n), otherwise a(n) = a(A266193(n)).
Other identities. For all n >= 0:
a(n) = A257681(A275847(n)).
Showing 1-10 of 12 results. Next