This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A231715 #18 Jan 20 2020 21:42:29 %S A231715 1,0,1,0,1,0,0,0,1,0,1,0,0,0,2,0,2,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0, %T A231715 1,0,0,0,2,0,2,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,2,0,2,0,0,0, %U A231715 1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,2 %N A231715 For n with a unique factorial base representation n = du*u! + ... + d2*2! + d1*1! (each di in range 0..i, cf. A007623), a(n) = Product_{i=1..u} (gcd(d_i,i+1) mod i+1), where u is given by A084558(n). %H A231715 Antti Karttunen, <a href="/A231715/b231715.txt">Table of n, a(n) for n = 1..10080</a> %e A231715 For n=13, with factorial base representation '201' (= A007623(13), 2*3! + 0*2! + 1*1! = 13) we have, starting from the least significant digit, (gcd(1,2) mod 2)*(gcd(0,3) mod 3)*(gcd(2,4) mod 4) = (1 mod 2)*(3 mod 3)*(2 mod 4) = 1*0*2 = 0, thus a(13)=0. %e A231715 For n=17, with factorial base representation '221' (= A007623(17), 2*3! + 2*2! + 1*1! = 17) we have, starting from the least significant digit, (gcd(1,2) mod 2)*(gcd(2,3) mod 3)*(gcd(2,4) mod 4) = (1 mod 2)*(1 mod 3)*(2 mod 4) = 1*1*2 = 2, thus a(17)=2. %o A231715 (Scheme) %o A231715 (define (A231715 n) (let loop ((n n) (i 2) (p 1)) (cond ((zero? n) p) (else (loop (floor->exact (/ n i)) (+ i 1) (* p (modulo (gcd (modulo n i) i) i))))))) %Y A231715 Cf. A231716 (positions of ones), A227157 (the positions of nonzero terms), A007623. %Y A231715 Each a(n) <= A208575(n). %K A231715 nonn %O A231715 1,15 %A A231715 _Antti Karttunen_, Nov 12 2013