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
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.
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
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.
Cf.
A001221,
A001222,
A002110,
A007489,
A007814,
A048675,
A051903,
A056169,
A056170,
A060130,
A060502,
A225901.
Cf.
A275804 (indices of squarefree terms),
A275805 (of terms not squarefree).
-
from operator import mul
from sympy import prime, factorial as f
def a007623(n, p=2): return n if n0 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
A275804
Numbers with at most one nonzero digit on each digit slope of the factorial base representation of n.
Original entry on oeis.org
0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 16, 18, 20, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 36, 37, 40, 42, 44, 48, 49, 50, 51, 52, 60, 61, 64, 66, 68, 72, 73, 76, 78, 79, 82, 90, 96, 98, 102, 104, 108, 120, 121, 122, 123, 124, 126, 127, 128, 129, 130, 132, 133, 136, 138, 140, 144, 145, 146, 147, 148, 150, 151, 152, 153, 154, 156, 157, 160
Offset: 0
-
from operator import mul
from sympy import prime, factorial as f
from sympy.ntheory.factor_ import core
def a007623(n, p=2): return n if n0 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))
def ok(n): return 1 if n==0 else core(a(n))==a(n)
print([n for n in range(201) if ok(n)]) # Indranil Ghosh, Jun 19 2017
A261220
Ranks of involutions in permutation orderings A060117 and A060118.
Original entry on oeis.org
0, 1, 2, 4, 6, 7, 12, 16, 18, 20, 24, 25, 26, 28, 48, 49, 60, 66, 72, 76, 78, 90, 96, 98, 102, 108, 120, 121, 122, 124, 126, 127, 132, 136, 138, 140, 240, 241, 242, 244, 288, 289, 312, 316, 336, 338, 360, 361, 372, 378, 384, 385, 432, 450, 456, 468, 480, 484, 486, 498, 504, 508, 528, 546, 576, 582, 600, 602, 606, 612, 624, 626, 648, 660, 672, 678, 720, 721
Offset: 0
Same sequence shown in factorial base:
A260743.
A275946
Number of nonzero digits that are the sole occupants of their slope in factorial base representation: a(n) = A056169(A275734(n)). (See comments for more exact definition.)
Original entry on oeis.org
0, 1, 1, 2, 1, 0, 1, 2, 2, 3, 2, 1, 1, 2, 0, 1, 2, 1, 1, 0, 2, 1, 0, 0, 1, 2, 2, 3, 2, 1, 2, 3, 3, 4, 3, 2, 2, 3, 1, 2, 3, 2, 2, 1, 3, 2, 1, 1, 1, 2, 2, 3, 2, 1, 0, 1, 1, 2, 1, 0, 2, 3, 1, 2, 3, 2, 2, 1, 3, 2, 1, 1, 1, 2, 0, 1, 2, 1, 2, 3, 1, 2, 3, 2, 0, 1, 0, 1, 1, 0, 2, 1, 1, 0, 1, 1, 1, 0, 2, 1, 0, 0, 2, 1, 3, 2, 1, 1, 2, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1
Offset: 0
For n=2, in factorial base "10", there is only one slope occupied by a single nonzero digit (1 is on the sub-maximal slope as 2-1 = 1), thus a(2) = 1.
For n=3, in factorial base "11", there are two occupied slopes, each having just one digit present, thus a(3) = 2.
For n=5, in factorial base "21", there is just one distinct occupied slope, but it contains two nonzero digits (2 and 1 both occupy the maximal slope as 2-2 = 1-1 = 0), thus there are no slopes with just one nonzero digit and a(5) = 0.
For n=525, in factorial base "41311", there are three occupied slopes. The maximal slope contains the nonzero digits "3.1", the sub-maximal digits "4..1.", and the sub-sub-sub-maximal just "1..." (the 1 in the position 4 from right is the sole occupier of its own slope). Thus only one of the slopes is occupied by a lonely occupant and a(525) = 1.
A275962
Total number of nonzero digits that occur on the multiply occupied slopes of the factorial base representation of n: a(n) = A275812(A275734(n)). (See comments for more exact definition).
Original entry on oeis.org
0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 2, 0, 2, 0, 2, 2, 3, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 2, 0, 2, 0, 2, 2, 3, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 4, 0, 0, 2, 2, 0, 2, 0, 2, 0, 2, 2, 3, 0, 0, 2, 2, 0, 2, 0, 0, 2, 2, 0, 2, 2, 2, 3, 3, 2, 4, 0, 2, 2, 4, 2, 3, 0, 2, 0, 2, 2, 3, 0, 2, 0, 2, 2, 3, 0, 2, 2, 4, 2, 3, 2, 3, 2, 3, 3, 4, 0
Offset: 0
For n=525, in factorial base "41311", there are three occupied slopes. The maximal slope contains the nonzero digits "3.1", the sub-maximal the digits "4..1.", and the sub-sub-sub-maximal just "1..." (the 1 in the position 4 from right is the sole occupier of its own slope). There are two slopes with more than one nonzero digit, each having two such digits, and thus a(525) = 2+2 = 4.
Equally, when we form a multiset of (digit-position - digit-value) differences for all nonzero digits present in "41311", we obtain a multiset [0, 0, 1, 1, 3], in which the elements that occur multiple times are [0, 0, 1, 1], thus a(525) = 4.
A275949
Number of distinct nonzero digits that occur multiple times in factorial base representation of n: a(n) = A056170(A275735(n)).
Original entry on oeis.org
0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 2, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0
Offset: 0
For n=0, with factorial base representation (A007623) also 0, there are no nonzero digits, thus a(0) = 0.
For n=2, with factorial base representation "10", there are no nonzero digits that are present multiple times, thus a(2) = 0.
For n=3 ("11") there is one distinct nonzero digit which occurs more than once, thus a(3) = 1.
For n=41 ("1221") there are two distinct nonzero digits ("1" and "2"), and both occur more than once, thus a(41) = 2.
For n=44 ( "1310") there are two distinct nonzero digits ("1" and "3"), but only the other (1) occurs more than once, thus a(44) = 1.
-
a[n_] := Module[{k = n, m = 2, r, s = {}}, While[{k, r} = QuotientRemainder[k, m]; k != 0|| r != 0, AppendTo[s, r]; m++]; Count[Tally[Select[s, # > 0 &]][[;;, 2]], ?(# > 1 &)]]; Array[a, 100, 0] (* _Amiram Eldar, Feb 14 2024 *)
-
from sympy import prime, factorint
from operator import mul
from functools import reduce
import collections
def a056170(n):
f = factorint(n)
return sum([1 for i in f if f[i]!=1])
def a007623(n, p=2): return n if nIndranil Ghosh, Jun 20 2017
-
(define (A275949 n) (A056170 (A275735 n)))
Comments