|
|
|
|
0, 1, 12, 13, 360, 361, 372, 373, 20160, 20161, 20172, 20173, 20520, 20521, 20532, 20533, 1814400, 1814401, 1814412, 1814413, 1814760, 1814761, 1814772, 1814773, 1834560, 1834561, 1834572, 1834573, 1834920, 1834921, 1834932, 1834933, 239500800, 239500801, 239500812, 239500813, 239501160, 239501161, 239501172, 239501173, 239520960, 239520961
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Fixed points of involution A225901.
This can be also viewed as a function that reinterprets base-2 representation of n in base-((2n)!/2) where the digits are multiplied with the successive terms of A002674, thus a(0) = 0.
|
|
LINKS
|
|
|
FORMULA
|
|
|
PROG
|
;; This implements the given recurrence:
(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 a255411(n):
x=(str(a007623(n)) + '0')
y="".join(str(int(i) + 1) if int(i)>0 else '0' for i in x)[::-1]
return 0 if n==0 else sum([int(y[i])*f(i + 1) for i in range(len(y))])
def a153880(n):
x=(str(a007623(n)) + '0')[::-1]
return 0 if n==0 else sum([int(x[i])*f(i + 1) for i in range(len(x))])
def a(n): return 0 if n==0 else a255411(a153880(a(n//2))) if n%2==0 else 1 + a255411(a153880(a((n - 1)//2)))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|