login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A194960
a(n) = floor((n+2)/3) + ((n-1) mod 3).
8
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, 12, 13, 12, 13, 14, 13, 14, 15, 14, 15, 16, 15, 16, 17, 16, 17, 18, 17, 18, 19, 18, 19, 20, 19, 20, 21, 20, 21, 22, 21, 22, 23, 22, 23, 24, 23, 24, 25, 24, 25, 26, 25, 26
OFFSET
1,2
COMMENTS
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.
The sequence contains every positive integer n exactly min(n,3) times. - Wesley Ivan Hurt, Dec 17 2013
FORMULA
From R. J. Mathar, Sep 07 2011: (Start)
a(n) = ((-1)^n*A130772(n) + n + 4)/3.
G.f.: x*(1 + x + x^2 - 2*x^3)/((1+x+x^2)*(1-x)^2). (End)
a(n) = A006446(n)/floor(sqrt(A006446(n))). - Benoit Cloitre, Jan 15 2012
a(n) = a(n-1) + a(n-3) - a(n-4). - Vincenzo Librandi, Dec 17 2013
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
From Guenther Schrack, Nov 09 2020: (Start)
a(n) = n - 2*floor((n-1)/3).
a(n) = (n + 2 + 2*((n-1) mod 3))/3.
a(n) = (3*n + 12 + 2*(w^(2*n)*(1 - w) + w^n*(2 + w)))/9, where w = (-1 + sqrt(-3))/2.
a(n) = (n + 4 + 2*A049347(n))/3.
a(n) = (2*n + 3 - A330396(n-1))/3. (End)
a(n) = (n + 4 - 2*A010892(2*n+4))/3. - G. C. Greubel, Oct 23 2022
MAPLE
A194960:=n->floor((n+2)/3)+((n-1) mod 3); seq(A194960(n), n=1..100); # Wesley Ivan Hurt, Dec 17 2013
MATHEMATICA
(* First program *)
p[n_]:= Floor[(n+2)/3] + Mod[n-1, 3]
Table[p[n], {n, 1, 90}] (* A194960 *)
g[1] = {1}; g[n_]:= Insert[g[n-1], n, p[n]]
f[1] = g[1]; f[n_]:= Join[f[n-1], g[n]]
f[20] (* A194961 *)
row[n_]:= Position[f[30], n];
u = TableForm[Table[row[n], {n, 1, 5}]]
v[n_, k_]:= Part[row[n], k];
w = Flatten[Table[v[k, n-k+1], {n, 1, 13}, {k, 1, n}]] (* A194962 *)
q[n_]:= Position[w, n];
Flatten[Table[q[n], {n, 1, 80}]] (* A194963 *)
(* Other programs *)
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 *)
Table[(n+4 -2*ChebyshevU[2*n+4, 1/2])/3, {n, 80}] (* G. C. Greubel, Oct 23 2022 *)
PROG
(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
(PARI) a(n)=(n+2)\3 + (n-1)%3 \\ Charles R Greathouse IV, Sep 02 2015
(SageMath) [(n+4 - 2*chebyshev_U(2*n+4, 1/2))/3 for n in (1..80)] # G. C. Greubel, Oct 23 2022
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Sep 06 2011
STATUS
approved