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!)
A174214 a(n) = a(n-1)+1, if the previous term a(n-1) and n-1-(-1)^n are coprime, else a(n)=2*n-4. 5

%I #10 Feb 02 2016 03:35:21

%S 14,16,17,18,19,20,26,28,29,30,31,32,33,34,35,36,37,38,39,52,53,54,55,

%T 60,62,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,

%U 85,86,87,88,89,90,91,92,93,124,125,126,127,128,129,130,131,132,133,134

%N a(n) = a(n-1)+1, if the previous term a(n-1) and n-1-(-1)^n are coprime, else a(n)=2*n-4.

%H V. Shevelev, <a href="http://arXiv.org/abs/0912.4006">Theorems on twin primes-dual case</a>, arXiv:0912.4006 [math.GM], 2009-2014.

%p A174214 := proc(n) option remember ; if n = 9 then 14 ; elif gcd(procname(n-1),n-1-(-1)^n) = 1 then procname(n-1)+1 ; else 2*n-4 ; end if; end proc:

%p seq(A174214(n),n=9..100) ; # _R. J. Mathar_, Mar 16 2010

%t a[n_] := a[n] = Which[n==9, 14, CoprimeQ[a[n-1], n-1-(-1)^n], a[n-1]+1, True, 2n-4]; Table[a[n], {n, 9, 100}] (* _Jean-François Alcover_, Feb 02 2016 *)

%Y Cf. A166945, A167495.

%K nonn,easy

%O 9,1

%A _Vladimir Shevelev_, Mar 12 2010

%E a(15) corrected and sequence extended by _R. J. Mathar_, Mar 16 2010

%E a(15) corrected and a(35)-a(74) added by _John W. Layman_, Mar 16 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 April 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)