OFFSET
1,2
COMMENTS
From Richard N. Smith, Jul 15 2019: (Start)
The comment in the "Mathematica" section is not true: A063994(65513) = 76 (thus a(76) = 65513 instead of 0), but 76 is an even nontotient (in the sequence A005277).
The first counterexample of the comment is A063994(1541) = 484, which is an even nontotient, for the counterexamples <= 2^20, see the link.
Also A063994(1072871) = 68. (thus a(68) = 1072871).
Conjecture: a(n) = 0 iff n == 2 mod 4 and n+1 is composite, if this conjecture is true, then a(54), a(110), a(294), etc. would be 0.
Another conjecture: If A063994(k) = n and n == 2 mod 4, then n+1 is prime and k is a power of n+1. (End)
LINKS
Richard N. Smith, Table of n, a(n) for n = 1..187
MATHEMATICA
f[ n_ ] := If[ n == 1, 1, Apply[ Times, GCD[ n - 1, Transpose[ FactorInteger[ n ] ] [ [ 1 ] ] - 1 ] ] ]; a = Table[ 0, {100} ]; Do[ m = f[ n ]; If[ m < 101 && a[ [ m ] ] == 0, a[ [ m ] ] = n ], {n, 1, 10^7} ]; a a(54) > 2*10^7. The zeros appear at positions that are the values in the sequence A005277, the nontotients: even n such that phi(m) = n has no solution. [Warning: This is wrong, see the "comment" section]
PROG
(PARI) a063994(n)=my(f=factor(n)[, 1]); prod(i=1, #f, gcd(f[i]-1, n-1))
a(n)=if(n%4==2 && !isprime(n+1), 0, for(k=1, 2^30, if(a063994(k)==n, return(k)))) \\ Richard N. Smith, Jul 15 2019, after Charles R Greathouse IV in A063994
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Sep 22 2001
EXTENSIONS
a(54) - a(60) from Richard N. Smith, Jul 15 2019
STATUS
approved