login
The OEIS is supported by the many generous donors 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

%I #63 Sep 02 2022 01:55:14

%S 1,6,8,13,15,20,22,27,29,34,36,41,43,48,50,55,57,62,64,69,71,76,78,83,

%T 85,90,92,97,99,104,106,111,113,118,120,125,127,132,134,139,141,146,

%U 148,153,155,160,162,167,169,174,176,181,183,188,190,195,197,202,204,209

%N Numbers that are congruent to {1, 6} mod 7.

%C 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

%H Reinhard Zumkeller, <a href="/A047336/b047336.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).

%F a(1) = 1; a(n) = 7(n-1) - a(n-1). - _Rolf Pleisch_, Jan 31 2008 (corrected by _Jon E. Schoenfield_, Dec 22 2008)

%F a(n) = (7/2)*(n-(1-(-1)^n)/2) - (-1)^n. - _Rolf Pleisch_, Nov 02 2010

%F From _Bruno Berselli_, Nov 17 2010: (Start)

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

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

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

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

%F a(n) = 7*floor(n/2)+(-1)^(n+1). - _Gary Detlefs_, Dec 29 2011

%F Sum_{n>=1} (-1)^(n+1)/a(n) = (Pi/7)*cot(Pi/7) = A019674 * A178818. - _Amiram Eldar_, Dec 04 2021

%F E.g.f.: 1 + ((14*x - 7)*exp(x) + 3*exp(-x))/4. - _David Lovler_, Sep 01 2022

%t Rest[Flatten[Table[{7i-1,7i+1},{i,0,40}]]] (* _Harvey P. Dale_, Nov 20 2010 *)

%o (Magma) [n: n in [1..210]| n mod 7 in {1,6}]; // _Bruno Berselli_, Feb 22 2011

%o (Haskell)

%o a047336 n = a047336_list !! (n-1)

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

%o -- _Reinhard Zumkeller_, Jan 07 2012

%o (PARI) a(n)=n\2*7-(-1)^n \\ _Charles R Greathouse IV_, May 02 2016

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

%K nonn,easy

%O 1,2

%A _N. J. A. Sloane_

%E More terms from _Jon E. Schoenfield_, Jan 18 2009

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 05:49 EDT 2024. Contains 371964 sequences. (Running on oeis4.)