The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A328622 In primorial base representation of n, multiply by 2 all other digits except the least significant, and reduce each such product modulo prime(k) (to get the new digit), where k > 1 is the position of the digit, then convert back to decimal. 9
0, 1, 4, 5, 2, 3, 12, 13, 16, 17, 14, 15, 24, 25, 28, 29, 26, 27, 6, 7, 10, 11, 8, 9, 18, 19, 22, 23, 20, 21, 60, 61, 64, 65, 62, 63, 72, 73, 76, 77, 74, 75, 84, 85, 88, 89, 86, 87, 66, 67, 70, 71, 68, 69, 78, 79, 82, 83, 80, 81, 120, 121, 124, 125, 122, 123, 132, 133, 136, 137, 134, 135, 144, 145, 148, 149, 146, 147, 126, 127, 130, 131 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n) = A276085(A328618(A276086(n))).
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 except the least significant by 2, and then reducing them modulo the corresponding prime leaves us with 2*6 mod 7, 2*3 mod 5, 2*0 mod 3, (with the least significant 1 staying the same), so we get "5101", which is the primorial base expansion of 157, thus a(199) = 157.
For 157, the new "doubled and reduced" expansion is 2*5 mod 7, 2*1 mod 5, 2*0 mod 3 and the trailing 1 stays intact, so we get "3201", which is the primorial base expansion of 103, thus a(157) = 103.
PROG
(PARI)
A002110(n) = prod(i=1, n, prime(i));
A276085(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*A002110(primepi(f[k, 1])-1)); };
A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
A328618(n) = { my(f = factor(n), m, q); for(k=1, #f~, q = (f[k, 2]\f[k, 1]); m = (f[k, 2]%f[k, 1]); if(m&&(f[k, 1]!=2), f[k, 2] = q*f[k, 1] + ((2*f[k, 2])%f[k, 1]))); factorback(f); };
CROSSREFS
Cf. A328623 (inverse), and also A289234.
Sequence in context: A261098 A216252 A335615 * A338248 A328623 A225901
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Oct 23 2019
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 13 19:55 EDT 2024. Contains 372522 sequences. (Running on oeis4.)