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!)
A133256 a(4*n+1) = 4*n+1, a(4*n+2) = 4*n+2, a(4*n+3) = 4*n+4, a(4*n+4) = 4*n+3. 3

%I #23 Jan 31 2023 08:30:05

%S 1,2,4,3,5,6,8,7,9,10,12,11,13,14,16,15,17,18,20,19,21,22,24,23,25,26,

%T 28,27,29,30,32,31,33,34,36,35,37,38,40,39,41,42,44,43,45,46,48,47,49,

%U 50,52,51,53,54,56,55,57,58,60,59,61,62,64,63,65,66,68,67,69,70,72,71

%N a(4*n+1) = 4*n+1, a(4*n+2) = 4*n+2, a(4*n+3) = 4*n+4, a(4*n+4) = 4*n+3.

%C A permutation of the positive integers, swapping consecutive values congruent to 3 and 4 (mod 4). - _Franklin T. Adams-Watters_, Jan 22 2012.

%C This is the lexicographically earliest sequence of distinct positive integers such that no polynomial of degree d can be fitted to d+2 consecutive terms (equivalently, such that no iterated difference is zero). - _Pontus von Brömssen_, Dec 26 2021

%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1).

%F From _Chai Wah Wu_, Sep 10 2020: (Start)

%F a(n) = a(n-1) + a(n-4) - a(n-5) for n > 5.

%F G.f.: x*(x^4 - x^3 + 2*x^2 + x + 1)/(x^5 - x^4 - x + 1). (End)

%F Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/4 - log(2)/2. - _Amiram Eldar_, Jan 31 2023

%t Table[Which[Mod[n,4]==3,n+1,Divisible[n,4],n-1,True,n],{n,40}] (* or *) Partition[Range[40],4]/.{a_,b_,c_,d_}->{a,b,d,c}//Flatten (* _Harvey P. Dale_, Aug 29 2016 *)

%Y Cf. A103889.

%K nonn

%O 1,2

%A _Paul Curtz_, Oct 15 2007

%E Definition fixed and offset changed by _Franklin T. Adams-Watters_, Jan 22 2012

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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)