OFFSET
0,3
COMMENTS
Indexing starts from zero, because a(0) = 0 is a special case in this sequence.
Numbers with at most one nonzero digit on each digit slope of the factorial base representation of n (see A275811 and A060502 for the definition of slopes in this context). More exactly: numbers n in whose factorial base representation (A007623) there does not exist a pair of digit positions i_1 and i_2 with nonzero digits d_1 and d_2, such that (i_1 - d_1) = (i_2 - d_2).
LINKS
PROG
(Scheme, with Antti Karttunen's IntSeq-library, various implementations)
(Python)
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 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 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
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Aug 10 2016
STATUS
approved