OFFSET
1,1
COMMENTS
The first term > 5 is a(462028) = 8. Is the sequence bounded?
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 5 because prime(3) = 5 and the component of the graph containing (1,6) consists of the 5 vertices (1,6), (2,6), (3,5), (3,6) and (4,6).
MAPLE
f:= proc(n) local Agenda, S, count, t, dA;
Agenda:= {[1, ithprime(n)+1]}; count:= 0; S:= {};
while Agenda <> {} do
t:= Agenda[1];
Agenda:= subsop(1=NULL, Agenda);
if isprime(numtheory:-cyclotomic(t[1], t[2])) and not member(t, S) then
S:= S union {t}; count:= count+1;
dA:= {[t[1]+1, t[2]], [t[1], t[2]+1]};
if t[1] >= 1 then dA:= dA union {[t[1]-1, t[2]]} fi;
if t[2] >= 1 then dA:= dA union {[t[1], t[2]-1]} fi;
Agenda:= Agenda union (dA minus S);
fi;
od;
count
end proc;
map(f, [$1..100]);
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Dec 21 2024
STATUS
approved