OFFSET
0,6
LINKS
EXAMPLE
The first terms, alongside the digits of n in primorial base, are:
n a(n) pr(n)
-- ---- -----
0 0 0
1 1 1
2 0 1_0
3 1 1_1
4 0 2_0
5 2 2_1
6 0 1_0_0
7 0 1_0_1
8 0 1_1_0
9 1 1_1_1
10 0 1_2_0
11 2 1_2_1
12 0 2_0_0
13 0 2_0_1
14 0 2_1_0
15 2 2_1_1
PROG
(PARI) a(n) = { my (p=1); forprime (r=2, oo, p*=n%r; n\=r; if (p==0 || n==0, return (p))) }
CROSSREFS
KEYWORD
AUTHOR
Rémy Sigrist, Jun 16 2022
STATUS
approved