login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A225875 We write the 1 + 4*k numbers once and twice the others. 0
1, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 7, 8, 8, 9, 10, 10, 11, 11, 12, 12, 13, 14, 14, 15, 15, 16, 16, 17, 18, 18, 19, 19, 20, 20, 21, 22, 22, 23, 23, 24, 24, 25, 26, 26, 27, 27, 28, 28, 29, 30, 30, 31, 31, 32, 32, 33, 34, 34, 35, 35, 36, 36, 37, 38, 38, 39, 39, 40, 40, 41, 42, 42, 43 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

First differences are periodic with period 7.

LINKS

Table of n, a(n) for n=1..74.

Index entries for linear recurrences with constant coefficients, signature (1, 0, 0, 0, 0, 0, 1, -1).

FORMULA

a(n+1) = 1 + 4*floor(n/7) + [0,1,1,2,2,3,3].

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

a(n) = n - floor(3*n/7). - Wesley Ivan Hurt, Sep 29 2017

MATHEMATICA

t = {}; Do[If[Mod[n, 4] == 1, AppendTo[t, n], AppendTo[t, {n, n}]], {n, 50}]; Flatten[t] (* T. D. Noe, May 23 2013 *)

LinearRecurrence[{1, 0, 0, 0, 0, 0, 1, -1}, {1, 2, 2, 3, 3, 4, 4, 5}, 74] (* Ray Chandler, Aug 26 2015 *)

Table[If[Mod[n, 4] == 1, n, {n, n}], {n, 50}] // Flatten (* or *) Drop[ Flatten[ Table[{n, n}, {n, 50}]], {1, -1, 8}] (* Harvey P. Dale, Feb 03 2019 *)

CROSSREFS

Cf. A132270.

Sequence in context: A100679 A226190 A195182 * A189688 A092982 A302930

Adjacent sequences:  A225872 A225873 A225874 * A225876 A225877 A225878

KEYWORD

nonn,easy

AUTHOR

José María Grau Ribas, May 19 2013

EXTENSIONS

Corrected, extended, and edited by Ralf Stephan, May 20 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 21 20:44 EDT 2019. Contains 328315 sequences. (Running on oeis4.)