OFFSET
0,13
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..10080
FORMULA
MATHEMATICA
Position[Select[Range[0, 120], ! MemberQ[IntegerDigits[#, MixedRadix[Reverse@ Range@ 12]], 1] &], #] - 1 & /@ Range[0, 120] /. {} -> 0 // Flatten (* Michael De Vlieger, May 30 2016, Version 10.2 *)
PROG
(Python)
from sympy import factorial as f
def a007623(n, p=2):
return n if n<p else a007623(n//p, p+1)*10 + n%p
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 a257680(n): return 1 if '1' in str(a007623(n)) else 0
def a(n): return (1 - a257680(n))*a257684(n)
print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 21 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 04 2015
STATUS
approved