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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A074068 Zigzag modulo 7. 3
1, 2, 3, 10, 9, 8, 7, 6, 5, 4, 17, 16, 15, 14, 13, 12, 11, 24, 23, 22, 21, 20, 19, 18, 31, 30, 29, 28, 27, 26, 25, 38, 37, 36, 35, 34, 33, 32, 45, 44, 43, 42, 41, 40, 39, 52, 51, 50, 49, 48, 47, 46, 59, 58, 57, 56, 55, 54, 53, 66, 65, 64, 63, 62, 61, 60, 73, 72, 71 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

a(a(n))=n (a self-inverse permutation);

for n>1: a(n) = n iff n == 0 modulo 7.

LINKS

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

Eric Weisstein's World of Mathematics, Alternating Permutations

Reinhard Zumkeller, Illustration for A074066-A074068

Index entries for sequences that are permutations of the natural numbers

FORMULA

a(n) = 7*floor(n/7) + 14*floor((n mod 7)/4) - (n mod 7) for n>3; a(n)=n for n<=3.

a(n) = a(n-1) + a(n-7) - a(n-8) for n > 11. - Chai Wah Wu, May 25 2016

MATHEMATICA

Range[3]~Join~Flatten[Reverse /@ Partition[Range[4, 73], 7]] (* after Harvey P. Dale at A074066, or *)

Range[3]~Join~Table[7 Floor[n/7] + 14 Floor[#/4] - # &@ Mod[n, 7], {n, 4, 69}] (* Michael De Vlieger, May 25 2016 *)

PROG

(Haskell)

a074068 n = a074068_list !! (n-1)

a074068_list = 1 : 2 : 3 : xs where

   xs = 10 : 9 : 8 : 7 : 6 : 5 : 4 : map (+ 7) xs

-- Reinhard Zumkeller, Feb 21 2011

CROSSREFS

Cf. A074066, A074067.

Sequence in context: A278561 A193729 A303115 * A283436 A225558 A301382

Adjacent sequences:  A074065 A074066 A074067 * A074069 A074070 A074071

KEYWORD

nonn,look

AUTHOR

Reinhard Zumkeller, Aug 17 2002

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 January 23 00:56 EST 2019. Contains 319365 sequences. (Running on oeis4.)