OFFSET
0,3
COMMENTS
In primorial base (see A049345) we keep the least significant digit (0 or 1) intact, and replace each digit d(i) left of that (for i >= 2) with a new digit value computed as d(i)*(1+d(i-1)) mod prime(i). a(n) is then the newly constructed primorial expansion converted back to decimal.
Because for all primes p, Z_p is a field (not just a ring), this sequence is a permutation of nonnegative integers, and roughly speaking, offers a kind of analog of A003188 for primorial base system. Note however that it is the digit neighbor on the right (not left) hand side that affects here what will be the new digit at each position.
LINKS
EXAMPLE
In primorial base (A049345) 199 is written as "6301" because 6*A002110(3) + 3*A002110(2) + 0*A002110(1) + 1*A002110(0) = 6*30 + 3*6 + 0*2 + 1*1 = 199. Multiplying each digit left of the least significant by 1+{digit one step right}, and reducing modulo the corresponding prime yields 4*6 mod 7, 1*3 mod 5, 2*0 mod 3, (with the least significant 1 staying the same), so we get "3301", which is the primorial base expansion of 109, thus a(199) = 109.
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 23 2019
STATUS
approved