OFFSET
0,2
LINKS
FORMULA
For all n >= 1, a((2^n)-1) = 2.
PROG
(PARI)
up_to = 65537;
rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om, invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om, invec[i], i); outvec[i] = u; u++ )); outvec; };
A324055(n) = { my(m1=2, m2=1, p=2, mp=p*p); while(n, if(!(n%2), p=nextprime(1+p); mp = p*p, m1 *= p; if(3==(n%4), mp *= p, m2 *= (mp-1)/(p-1))); n>>=1); (m1-m2); };
v324346 = rgs_transform(vector(1+up_to, n, Aux324346(n-1)));
A324346(n) = v324346[1+n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 24 2019
STATUS
approved