OFFSET
0,6
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].
LINKS
EXAMPLE
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.
PROG
(Scheme, two versions)
(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<p else a007623(n//p, p+1)*10 + n%p
def a275732(n):
x=str(a007623(n))[::-1]
return 1 if n==0 or x.count("1")==0 else reduce(mul, [prime(i + 1) for i in range(len(x)) if x[i]=='1'])
def a257684(n):
x=str(a007623(n))[:-1]
y="".join([str(int(i) - 1) if int(i)>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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Aug 10 2016
EXTENSIONS
Signs in comment corrected and clarification added by Antti Karttunen, Aug 16 2016
STATUS
approved