OFFSET
1,1
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Scatterplot of A161671(n), n = 1..120, showing and labeling primes p in this sequence in red and blue. The red primes are duplicated and are listed in A220220. We plot in green duplicated composite terms.
MAPLE
isA214627 := proc(n)
if isprime(n) then
for j from 1 do
if A161671(j) = n then
return true;
elif j >7 and A161671(j) > n then
return false;
end if;
end do:
else
false;
end if;
end proc:
for n from 2 to 2000 do
if isA214627(n) then
printf("%d, ", n) ;
end if;
end do; # R. J. Mathar, Aug 09 2012
MATHEMATICA
f[n_] := FixedPoint[n + PrimePi@ # &, n + PrimePi@ n]; Union@ Reap[Do[If[PrimeQ[#], Sow[#]] &[Prime[i] - f[i - 1] ], {i, 350}] ][[-1, -1]] (* Michael De Vlieger, Mar 22 2022, after Robert G. Wilson v at A141468 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Aug 08 2012
STATUS
approved