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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A047336 Numbers that are congruent to {1, 6} mod 7. 23
1, 6, 8, 13, 15, 20, 22, 27, 29, 34, 36, 41, 43, 48, 50, 55, 57, 62, 64, 69, 71, 76, 78, 83, 85, 90, 92, 97, 99, 104, 106, 111, 113, 118, 120, 125, 127, 132, 134, 139, 141, 146, 148, 153, 155, 160, 162, 167, 169, 174, 176, 181, 183, 188, 190, 195, 197, 202, 204, 209 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Cf. property described by Gary Detlefs in A113801: more generally, these numbers are of the form (2*h*n+(h-4)*(-1)^n-h)/4 (h, n natural numbers), therefore ((2*h*n+(h-4)*(-1)^n-h)/4)^2-1 == 0 (mod h); in this case, a(n)^2-1 == 0 (mod 7). - Bruno Berselli, Nov 17 2010

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

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

FORMULA

a(1) = 1; a(n) = 7(n-1) - a(n-1). - Rolf Pleisch, Jan 31 2008 (corrected by Jon E. Schoenfield, Dec 22 2008)

a(n) = (7/2)*(n-(1-(-1)^n)/2) - (-1)^n. - Rolf Pleisch, Nov 02 2010

From Bruno Berselli, Nov 17 2010: (Start)

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

a(n) = -a(-n+1) = a(n-1) + a(n-2) - a(n-3).

a(n) = a(n-2)+7.

a(n) = 7*A000217(n-1)+1 - 2*Sum_{i=1..n-1} a(i) for n > 1. (End)

a(n) = 7*floor(n/2)+(-1)^(n+1). - Gary Detlefs, Dec 29 2011

MATHEMATICA

Rest[Flatten[Table[{7i-1, 7i+1}, {i, 0, 40}]]] (* Harvey P. Dale, Nov 20 2010 *)

PROG

(MAGMA) [n: n in [1..210]| n mod 7 in {1, 6}]; // Bruno Berselli, Feb 22 2011

(Haskell)

a047336 n = a047336_list !! (n-1)

a047336_list = 1 : 6 : map (+ 7) a047336_list

-- Reinhard Zumkeller, Jan 07 2012

(PARI) a(n)=n\2*7-(-1)^n \\ Charles R Greathouse IV, May 02 2016

CROSSREFS

Cf. A007310, A047522, A045472 (primes), A195041 (partial sums), A005408, A047209, A056020, A090771, A175885, A091998, A175886, A175887.

Sequence in context: A057710 A285678 A027706 * A181449 A315874 A315875

Adjacent sequences:  A047333 A047334 A047335 * A047337 A047338 A047339

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane

EXTENSIONS

More terms from Jon E. Schoenfield, Jan 18 2009

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 August 23 14:40 EDT 2019. Contains 326249 sequences. (Running on oeis4.)