login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A276008 Substitute ones for all nonzero digits in factorial base representation of n: a(n) = A059590(A275727(n)). 3
0, 1, 2, 3, 2, 3, 6, 7, 8, 9, 8, 9, 6, 7, 8, 9, 8, 9, 6, 7, 8, 9, 8, 9, 24, 25, 26, 27, 26, 27, 30, 31, 32, 33, 32, 33, 30, 31, 32, 33, 32, 33, 30, 31, 32, 33, 32, 33, 24, 25, 26, 27, 26, 27, 30, 31, 32, 33, 32, 33, 30, 31, 32, 33, 32, 33, 30, 31, 32, 33, 32, 33, 24, 25, 26, 27, 26, 27, 30, 31, 32, 33, 32, 33, 30, 31, 32, 33, 32, 33, 30, 31, 32, 33, 32, 33, 24 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Antti Karttunen, Table of n, a(n) for n = 0..40319

Index entries for sequences related to factorial base representation

FORMULA

a(n) = A059590(A275727(n)).

EXAMPLE

For n=23 whose factorial base representation is "321", when we replace each nonzero digit with 1, we get "111", the factorial base representation of 9, thus a(23) = 9.

From n=37 ("1201") we get "1101", thus a(37) = 31 as A007623(31) = 1101.

PROG

(Scheme)

(define (A276008 n) (A059590 (A275727 n)))

;; Standalone program:

(define (A276008 n) (let loop ((n n) (s 0) (f 1) (i 2)) (if (zero? n) s (let ((d (modulo n i))) (if (zero? d) (loop (/ n i) s (* i f) (+ 1 i)) (loop (/ (- n d) i) (+ s f) (* i f) (+ 1 i)))))))

(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 a(n):

    x=str(a007623(n))

    y="".join(['1' if int(i)>0 else '0' for i in x])[::-1]

    return sum([int(y[i])*f(i + 1) for i in xrange(len(y))])

print [a(n) for n in xrange(201)] # Indranil Ghosh, Jun 21 2017

CROSSREFS

Cf. A059590, A275727.

Cf. also A276009.

Sequence in context: A064895 A120877 A174091 * A193917 A089135 A215412

Adjacent sequences:  A276005 A276006 A276007 * A276009 A276010 A276011

KEYWORD

nonn,base

AUTHOR

Antti Karttunen, Aug 18 2016

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified September 24 22:31 EDT 2017. Contains 292441 sequences.