login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A175307 a(n) = the number of terms in row n of A175306. 2

%I #15 Jul 25 2020 10:39:02

%S 2,1,1,1,3,1,2,1,1,1,3,1,2,1,1,1,3,1,2,1,1,1,3,1,2,1,1,1,3,1,2,1,1,1,

%T 4,1,2,1,1,1,3,1,2,1,1,1,3,1,2,1,1,1,3,1,2,1,1,1,3,1,2,1,1,1,3,1,2,1,

%U 1,1,3,1,2,1,1,1,3,1,2,1,1,1,3,1,2,1,1,1,3,1,2,1,1,1,3,1,2,1,1,1

%N a(n) = the number of terms in row n of A175306.

%C a(2n) = 1, and a(3n)=1, for all positive integers n.

%H Robert Israel, <a href="/A175307/b175307.txt">Table of n, a(n) for n = 1..10000</a>

%p A175307:=proc(n)

%p local R,last,k,P;

%p R:= n;

%p last:= n;

%p P:= n;

%p while igcd(last,6)=1 do

%p for k from last+1 do

%p if igcd(k-1,P) = 1 and igcd(k,P) = 1 and igcd(k+1,P) =1 then

%p R:= R, k; last:= k; P:= P*k; break

%p fi

%p od

%p od;

%p nops([R])

%p end proc:

%p map(A175307, [$1..100]); # _Robert Israel_, Feb 10 2017

%t 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];

%t a[n_] := Length[row[n]];

%t Array[a, 100] (* _Jean-François Alcover_, Jul 25 2020, after _Robert Israel_ *)

%Y Cf. A175306

%K nonn

%O 1,1

%A _Leroy Quet_, Mar 26 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 10 07:40 EDT 2024. Contains 372358 sequences. (Running on oeis4.)