login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A175306
Irregular array: row n contains A175307(n) terms. The first term of each row, a(n,1) = n. a(n,m) = the smallest integer > a(n,m-1) such that a(n,m), a(n,m)-1, and a(n,m)+1 are each coprime to all earlier terms in their row. The row terminates when a multiple of 2 or 3 is obtained.
2
1, 2, 2, 3, 4, 5, 7, 12, 6, 7, 9, 8, 9, 10, 11, 13, 15, 12, 13, 15, 14, 15, 16, 17, 19, 21, 18, 19, 21, 20, 21, 22, 23, 25, 27, 24, 25, 27, 26, 27, 28, 29, 31, 33, 30, 31, 33, 32, 33, 34, 35, 37, 47, 52, 36, 37, 39, 38, 39, 40, 41, 43, 45, 42, 43, 45, 44, 45, 46, 47, 49, 51, 48, 49, 51, 50, 51, 52, 53
OFFSET
1,2
LINKS
MAPLE
A175306:= proc(n)
local R, last, k, P;
R:= n;
last:= n;
P:= n;
while igcd(last, 6)=1 do
for k from last+1 do
if igcd(k-1, P) = 1 and igcd(k, P) = 1 and igcd(k+1, P) =1 then
R:= R, k; last:= k; P:= P*k; break
fi
od
od;
R
end proc:
map(A175306, [$1..100]); # Robert Israel, Feb 10 2017
MATHEMATICA
row[n_] := Module[{R = {n}, last = n, k, P = n}, While[GCD[last, 6] == 1, For[k = last + 1, True, k++, If[GCD[k - 1, P] == 1 && GCD[k, P] == 1 && GCD[k + 1, P] == 1, AppendTo[R, k]; last = k; P = P k; Break[]]]]; R];
Array[row, 100] // Flatten (* Jean-François Alcover, Jul 25 2020, after Robert Israel *)
CROSSREFS
Sequence in context: A034395 A032232 A378286 * A359348 A021993 A324743
KEYWORD
nonn,tabf
AUTHOR
Leroy Quet, Mar 26 2010
STATUS
approved