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!)
A137519 a(1)=1. a(2)=2. For n>=3, a(n) = the smallest integer > a(n-1) that is coprime to (a(n-1)+1)*(a(n-2)+1). 1

%I #11 Sep 22 2019 20:43:46

%S 1,2,5,7,11,13,17,19,23,29,31,37,39,41,43,47,49,53,59,61,67,69,71,73,

%T 77,79,83,89,97,101,103,107,109,113,119,121,127,129,131,133,137,139,

%U 143,149,151,157,159,161,163,167,169,173,179,181,187,191,193,197,199,203

%N a(1)=1. a(2)=2. For n>=3, a(n) = the smallest integer > a(n-1) that is coprime to (a(n-1)+1)*(a(n-2)+1).

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

%p N:= 100: # for a(1)..a(N)

%p A[1]:= 1: A[2]:= 2:

%p for n from 3 to N do

%p t:= (A[n-1]+1)*(A[n-2]+1);

%p for k from A[n-1]+1 do

%p if igcd(k,t)=1 then

%p A[n]:= k;

%p break

%p fi

%p od;

%p od:

%p [seq(A[i],i=1..N)]: # _Robert Israel_, Sep 22 2019

%t a = {1, 2}; For[n = 3, n < 80, n++, i = a[[ -1]] + 1; While[GCD[(a[[ -1]] + 1)*(a[[ -2]] + 1), i] > 1, i++ ]; AppendTo[a, i]]; a (* _Stefan Steinerberger_, Apr 26 2008 *)

%K nonn

%O 1,2

%A _Leroy Quet_, Apr 24 2008

%E More terms from _Stefan Steinerberger_, Apr 26 2008

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 April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)