OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
filter:= proc(n)
local t;
t:= n-prevprime(n+1);
if t <= 1 then return false fi;
t:= t-prevprime(t+1);
if t <= 1 then return false fi;
isprime(t) or isprime(t-1)
end proc:
select(filter, [$2..1000]); # Robert Israel, Jan 15 2019
MATHEMATICA
LrgstPrm[n_] := Block[{k = n}, While[ !PrimeQ@k, k-- ]; k]; f[n_] := Block[{c = 0, d = n}, While[d > 1, d = d - LrgstPrm@ d; c++ ]; c]; lst = {} Do[ If[f@n == 3, AppendTo[lst, n], {n, 10^4}]; lst
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Feb 27 2008
STATUS
approved