login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A265228 Interleave the even numbers with the numbers that are congruent to {1, 3, 7} mod 8. 2
0, 1, 2, 3, 4, 7, 6, 9, 8, 11, 10, 15, 12, 17, 14, 19, 16, 23, 18, 25, 20, 27, 22, 31, 24, 33, 26, 35, 28, 39, 30, 41, 32, 43, 34, 47, 36, 49, 38, 51, 40, 55, 42, 57, 44, 59, 46, 63, 48, 65, 50, 67, 52, 71, 54, 73, 56, 75, 58, 79, 60, 81, 62, 83, 64, 87, 66 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

b(n) denotes the sequence:

0, 0, 0, 0, 0, 0, 1, -1, 1, -1, 1, -1, 1, 2, -2, 2, -2, 2, -2, 2, 3, -3, 3, -3, 3, -3, 3, 4, -4, ..., and

c(n) = n + b(n) = n + floor((n+1)/7)*(-1)^((n+1) mod 7) provides:

0, 1, 2, 3, 4, 5, 7, 6, 9, 8, 11, 10, 13, 15, 12, 17, 14, 19, 16, 21, 23, 18, 25, 20, 27, 22, 29, ..., which is a permutation of A001477.

a(n) differs from c(n) because c(n) contains the terms of the form 8*k+5.

LINKS

Colin Barker, Table of n, a(n) for n = 0..1000

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

FORMULA

a(n) = n + 2*A260160(n) = n + (1-(-1)^n)*floor(n/6+1/3). Therefore, for odd n, a(n) = A047529((n+1)/2); otherwise, a(n) = n.

a(n) = a(n-6) - (-1)^n + 7.

a(n) = A260708(n) - A260699(n-1) - A079979(n+3), with A260699(-1) = 0.

From Colin Barker, Dec 06 2015: (Start)

a(n) = a(n-2) + a(n-6) - a(n-8) for n > 7.

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

MATHEMATICA

lim = 11; Riffle[Range[0, 6 lim, 2], Select[Range[8 lim], MemberQ[{1, 3, 7}, Mod[#, 8]] &]] (* Michael De Vlieger, Dec 06 2015 *)

PROG

(PARI) concat(0, Vec(x*(1+2*x+2*x^2+2*x^3+4*x^4+2*x^5+x^6)/((1-x)^2 *(1+x)^2*(1-x+x^2)*(1+x+x^2)) + O(x^100))) \\ Colin Barker, Dec 06 2015

(PARI) vector(100, n, n--; n+(1-(-1)^n)*floor(n/6+1/3)) \\ Altug Alkan, Dec 09 2015

CROSSREFS

Cf. A001477, A004770, A005843, A047529, A079979, A260160, A260699, A260708.

Sequence in context: A260436 A255553 A260742 * A328877 A125595 A091202

Adjacent sequences:  A265225 A265226 A265227 * A265229 A265230 A265231

KEYWORD

nonn,easy

AUTHOR

Paul Curtz, Dec 06 2015

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 April 11 08:10 EDT 2021. Contains 342886 sequences. (Running on oeis4.)