cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A143097 3*k - 2 interleaved with 3*k - 1 and 3*k.

This page as a plain text file.
%I A143097 #31 Oct 01 2024 21:11:34
%S A143097 1,2,4,3,5,7,6,8,10,9,11,13,12,14,16,15,17,19,18,20,22,21,23,25,24,26,
%T A143097 28,27,29,31,30,32,34,33,35,37,36,38,40,39,41,43,42,44,46,45,47,49,48,
%U A143097 50,52,51,53,55,54,56,58,57,59,61,60,62,64,63,65,67,66
%N A143097 3*k - 2 interleaved with 3*k - 1 and 3*k.
%C A143097 First differences give A143098.
%C A143097 Binomial transform = A143099: (1, 3, 9, 22, 50, 113, 256, ...).
%H A143097 Nathaniel Johnston, <a href="/A143097/b143097.txt">Table of n, a(n) for n = 1..10000</a>
%F A143097 A permutation of the natural numbers: 3*k - 2 interleaved with 3*k - 1 and 3*k; k=1,2,3,...; given a(1) = 1. a(n) = n if the subset = 3*k - 1: (2, 5, 8, ...); a(n) = n+1 in 3*k - 2, k>1: (4, 7, 10, ...); and a(n) = (n-1) in 3*k: (3, 6, 9, ...).
%F A143097 G.f.: x(1+x+2x^2-2x^3+x^4)/((1-x)^2(1+x+x^2)). - _R. J. Mathar_, Sep 06 2008
%F A143097 a(n) = if(n==1, 1, (n-1) + (n-1) mod 3). - _Zak Seidov_, Feb 23 2017
%F A143097 For n>1, a(n) = n+2*sin(2*(n+1)*Pi/3)/sqrt(3). - _Wesley Ivan Hurt_, Sep 27 2017
%F A143097 Sum_{n>=1} (-1)^(n+1)/a(n) = 2 - 2*Pi/(3*sqrt(3)) - log(2)/3. - _Amiram Eldar_, Aug 21 2023
%e A143097 Interleave 3 subsets:
%e A143097   1,....4,.......7,......10,......13,......16,...
%e A143097   ...2,.......5,.......8,......11,......14,...
%e A143097   .........3,.......6,.......9,......12,...
%e A143097   ...
%p A143097 A143097 := proc(n) if(n<=1)then return n: elif(n mod 3 <= 1)then return n+1-2*(n mod 3): else return n: fi: end: seq(A143097(n), n=1..70); # _Nathaniel Johnston_, Apr 30 2011
%t A143097 With[{nn=70},Join[{1},Riffle[Rest[Select[Range[nn],!Divisible[#,3]&]], Range[ 3,nn,3],3]]] (* _Harvey P. Dale_, May 06 2012 *)
%t A143097 Table[If[k == 1, 1, k - 1 + Mod[k - 1, 3]], {k, 100}] (* _Zak Seidov_, Feb 23 2017 *)
%Y A143097 Cf. A115302, A143098, A143099.
%Y A143097 Cf. A083220 (n + (n mod 4)). - _Zak Seidov_, Feb 23 2017
%K A143097 easy,nonn
%O A143097 1,2
%A A143097 _Gary W. Adamson_, Jul 24 2008