[go: up one dir, main page]

login
A275804
Numbers with at most one nonzero digit on each digit slope of the factorial base representation of n.
11
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,3
COMMENTS
Indexing starts from zero, because a(0) = 0 is a special case in this sequence.
Numbers n for which A275947(n) = 0 or equally, for which A275811(n) <= 1.
Numbers n for which A008683(A275734(n)) <> 0, that is, indices of squarefree terms in A275734.
Numbers n for which A060130(n) = A060502(n).
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).
PROG
(Scheme, with Antti Karttunen's IntSeq-library, various implementations)
(define A275804 (ZERO-POS 0 0 A275947))
(define A275804 (MATCHING-POS 0 0 (lambda (n) (>= 1 (A275811 n)))))
(define A275804 (NONZERO-POS 0 0 (COMPOSE A008683 A275734)))
(define A275804 (MATCHING-POS 0 0 (lambda (n) (= (A060130 n) (A060502 n)))))
(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
CROSSREFS
Complement: A275805.
Indices of zeros in A275947 and A275962.
Intersection with A276005 gives A261220.
Cf. A059590 (a subsequence).
Sequence in context: A048264 A260816 A285598 * A141825 A238369 A296858
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Aug 10 2016
STATUS
approved