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.

A194960 a(n) = floor((n+2)/3) + ((n-1) mod 3).

This page as a plain text file.
%I A194960 #47 Oct 23 2022 23:11:25
%S A194960 1,2,3,2,3,4,3,4,5,4,5,6,5,6,7,6,7,8,7,8,9,8,9,10,9,10,11,10,11,12,11,
%T A194960 12,13,12,13,14,13,14,15,14,15,16,15,16,17,16,17,18,17,18,19,18,19,20,
%U A194960 19,20,21,20,21,22,21,22,23,22,23,24,23,24,25,24,25,26,25,26
%N A194960 a(n) = floor((n+2)/3) + ((n-1) mod 3).
%C A194960 The sequence is formed by concatenating triples of the form (n, n+1, n+2) for n>=1.  See A194961 and A194962 for the associated fractalization and interspersion. The sequence can be obtained from A008611 by deleting its first four terms.
%C A194960 The sequence contains every positive integer n exactly min(n,3) times. - _Wesley Ivan Hurt_, Dec 17 2013
%H A194960 Vincenzo Librandi, <a href="/A194960/b194960.txt">Table of n, a(n) for n = 1..1000</a>
%H A194960 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).
%F A194960 From _R. J. Mathar_, Sep 07 2011: (Start)
%F A194960 a(n) = ((-1)^n*A130772(n) + n + 4)/3.
%F A194960 G.f.: x*(1 + x + x^2 - 2*x^3)/((1+x+x^2)*(1-x)^2). (End)
%F A194960 a(n) = A006446(n)/floor(sqrt(A006446(n))). - _Benoit Cloitre_, Jan 15 2012
%F A194960 a(n) = a(n-1) + a(n-3) - a(n-4). - _Vincenzo Librandi_, Dec 17 2013
%F A194960 a(n) = a(n-3) + 1, n >= 1, with input a(-2) = 0, a(-1) = 1 and a(0) = 2. Proof trivial. a(n) = A008611(n+3), n >= -2. See the first comment above. - _Wolfdieter Lang_, May 06 2017
%F A194960 From _Guenther Schrack_, Nov 09 2020: (Start)
%F A194960 a(n) = n - 2*floor((n-1)/3).
%F A194960 a(n) = (n + 2 + 2*((n-1) mod 3))/3.
%F A194960 a(n) = (3*n + 12 + 2*(w^(2*n)*(1 - w) + w^n*(2 + w)))/9, where w = (-1 + sqrt(-3))/2.
%F A194960 a(n) = (n + 4 + 2*A049347(n))/3.
%F A194960 a(n) = (2*n + 3 - A330396(n-1))/3. (End)
%F A194960 a(n) = (n + 4 - 2*A010892(2*n+4))/3. - _G. C. Greubel_, Oct 23 2022
%p A194960 A194960:=n->floor((n+2)/3)+((n-1) mod 3); seq(A194960(n), n=1..100); # _Wesley Ivan Hurt_, Dec 17 2013
%t A194960 (* First program *)
%t A194960 p[n_]:= Floor[(n+2)/3] + Mod[n-1, 3]
%t A194960 Table[p[n], {n, 1, 90}]  (* A194960 *)
%t A194960 g[1] = {1}; g[n_]:= Insert[g[n-1], n, p[n]]
%t A194960 f[1] = g[1]; f[n_]:= Join[f[n-1], g[n]]
%t A194960 f[20]  (* A194961 *)
%t A194960 row[n_]:= Position[f[30], n];
%t A194960 u = TableForm[Table[row[n], {n, 1, 5}]]
%t A194960 v[n_, k_]:= Part[row[n], k];
%t A194960 w = Flatten[Table[v[k, n-k+1], {n, 1, 13}, {k, 1, n}]]  (* A194962 *)
%t A194960 q[n_]:= Position[w, n];
%t A194960 Flatten[Table[q[n], {n, 1, 80}]]  (* A194963 *)
%t A194960 (* Other programs *)
%t A194960 CoefficientList[Series[(1 +x +x^2 -2 x^3)/((1+x+x^2) (1-x)^2), {x, 0, 100}], x] (* _Vincenzo Librandi_, Dec 17 2013 *)
%t A194960 Table[(n+4 -2*ChebyshevU[2*n+4, 1/2])/3, {n,80}] (* _G. C. Greubel_, Oct 23 2022 *)
%o A194960 (Magma) I:=[1,2,3,2]; [n le 4 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..100]]; // _Vincenzo Librandi_, Dec 17 2013
%o A194960 (PARI) a(n)=(n+2)\3 + (n-1)%3 \\ _Charles R Greathouse IV_, Sep 02 2015
%o A194960 (SageMath) [(n+4 - 2*chebyshev_U(2*n+4, 1/2))/3 for n in (1..80)] # _G. C. Greubel_, Oct 23 2022
%Y A194960 Cf. A006446, A008611, A010892, A047878, A049347, A130772, A194961, A194962, A194963, A330396.
%K A194960 nonn,easy
%O A194960 1,2
%A A194960 _Clark Kimberling_, Sep 06 2011