login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A324384
a(n) = gcd(n, A276154(n)), where A276154 is the primorial base left shift.
3
0, 1, 2, 1, 4, 1, 6, 1, 4, 1, 2, 11, 12, 1, 2, 1, 8, 1, 18, 1, 4, 7, 2, 1, 24, 1, 2, 1, 4, 1, 30, 1, 8, 1, 2, 7, 12, 1, 2, 1, 4, 1, 6, 1, 4, 1, 2, 1, 12, 1, 2, 1, 52, 1, 6, 1, 56, 1, 2, 1, 60, 1, 2, 1, 16, 1, 6, 1, 4, 1, 14, 1, 24, 1, 2, 1, 4, 1, 6, 1, 4, 1, 2, 1, 12, 1, 2, 1, 8, 1, 90, 1, 4, 1, 2, 1, 12, 1, 2, 1, 4, 1, 6, 1, 8, 1
OFFSET
0,3
COMMENTS
For a very few primes, a(p) > 1 (then by necessity a(p) = p). In range 2 .. 2^25 there are three: 2, 11, 119039.
FORMULA
a(n) = gcd(n, A276154(n)).
PROG
(PARI)
A276151(n) = { my(s=1); forprime(p=2, , if(n%p, return(n-s), s *= p)); };
A276152(n) = { my(s=1); forprime(p=2, , if(n%p, return(s*p), s *= p)); };
A276154(n) = if(!n, n, (A276152(n) + A276154(A276151(n))));
\\ Alternatively, A276154 can be defined with A276085, A276086 and A003961:
A002110(n) = prod(i=1, n, prime(i));
A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
A276085(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*A002110(primepi(f[k, 1])-1)); };
A276086(n) = { my(i=0, m=1, pr=1, nextpr); while((n>0), i=i+1; nextpr = prime(i)*pr; if((n%nextpr), m*=(prime(i)^((n%nextpr)/pr)); n-=(n%nextpr)); pr=nextpr); m; };
A324384(n) = gcd(n, A276154(n));
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 26 2019
STATUS
approved