OFFSET
0,2
COMMENTS
LINKS
FORMULA
MATHEMATICA
r = MixedRadix[Reverse@ Range[2, 12]]; Select[Range@ 105, Total@ Boole@ Map[SameQ @@ # &, Transpose@{#, Range@ Length@ #}] > 0 &@ Reverse@ IntegerDigits[#, r] &] (* Michael De Vlieger, Aug 14 2016, Version 10.2 *)
PROG
(Scheme, with Antti Karttunen's IntSeq-library)
;; Or as a naive recurrence with memoization-macro definec:
(definec (A273670 n) (if (zero? n) 1 (let ((prev (A273670 (- n 1)))) (cond ((even? prev) (+ 1 prev)) ((not (zero? (A260736 (+ 1 prev)))) (+ 1 prev)) (else (+ 2 prev))))))
(Python)
from sympy import factorial as f
def a007623(n, p=2): return n if n<p else a007623(int(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 a260736(n): return 0 if n==0 else n%2 + a260736(a257684(n))
print([n for n in range(106) if a260736(n)>0]) # Indranil Ghosh, Jun 20 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, May 29 2016
STATUS
approved