OFFSET
1,1
COMMENTS
LINKS
EXAMPLE
For n=5, "21" in factorial base (A007623), the pair 2 (in position 2) and 1 (in position 1) satisfies the condition, as (2-2) = (1-1), thus 5 is included.
For n=55, "2101" in factorial base, the pair 2 (in position 4) and 1 (in position 3) satisfies the condition, as (4-2) = (3-1), thus 55 is included.
For n=67, "2301" in factorial base, the pair 3 (in position 3) and 1 (in position 1) satisfies the condition, as (3-3) = (1-1), thus 67 is included in the sequence.
PROG
(Scheme, with Antti Karttunen's IntSeq-library, two alternatives)
(Python)
from operator import mul
from sympy import prime, factorial as f, mobius
from functools import reduce
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 "1" not in x 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))
print([n for n in range(201) if mobius(a(n))==0]) # Indranil Ghosh, Jun 19 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Aug 10 2016
STATUS
approved