OFFSET
1,1
COMMENTS
a(n) <= prime(n)^2, because p^2 - lambda(p^2) = p prime.
Conjecture: a(n) = prime(n)^2 for infinitely many n.
For n > 1, a(n) is an odd composite. - Robert Israel, Oct 14 2016
LINKS
Robert Israel, Table of n, a(n) for n = 1..446
MAPLE
N:= 100: # to get a(1)..a(N)
A:= Vector(N):
A[1]:= 4:
count:= 1:
for k from 9 by 2 while count < N do
r:= k - numtheory:-lambda(k);
if isprime(r) then
n:= numtheory:-pi(r);
if n <= N and A[n] = 0 then
count:= count+1;
A[n]:= k;
fi
fi
od:
convert(A, list); # Robert Israel, Oct 14 2016
MATHEMATICA
Table[k = 1; While[k - CarmichaelLambda@ k != Prime@ n, k++]; k, {n, 50}] (* Michael De Vlieger, Oct 14 2016 *)
PROG
(PARI) a(n) = {my(k = 1); while (k - lcm(znstar(k)[2]) != prime(n), k++); k; } \\ Michel Marcus, Oct 09 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Thomas Ordowski, Oct 09 2016
EXTENSIONS
More terms from Altug Alkan, Oct 09 2016
STATUS
approved