A047383 Numbers that are congruent to {1, 5} mod 7.
1, 5, 8, 12, 15, 19, 22, 26, 29, 33, 36, 40, 43, 47, 50, 54, 57, 61, 64, 68, 71, 75, 78, 82, 85, 89, 92, 96, 99, 103, 106, 110, 113, 117, 120, 124, 127, 131, 134, 138, 141, 145, 148, 152, 155, 159, 162, 166, 169
Offset: 1
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
Crossrefs
Cf. A001106.
Programs
-
Maple
A047383:=n->((-1)^n+14*n-9)/4; seq(A047383(n), n=1..100); # Wesley Ivan Hurt, Nov 10 2013
-
Mathematica
Flatten[(#+{1,5})&/@(7Range[0,25])] (* or *) LinearRecurrence[ {1,1,-1},{1,5,8},80] (* Harvey P. Dale, Dec 24 2012 *)
-
PARI
a(n)=7*n\2-2 \\ Charles R Greathouse IV, Jun 11 2015
Formula
a(n) = ceiling((7*n+2)/2).
a(n) = 7*n - a(n-1) - 8 (with a(1)=1). - Vincenzo Librandi, Aug 05 2010
G.f.: x*(1+4*x+2*x^2) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
a(1)=1, a(2)=5, a(3)=8; for n>3, a(n) = a(n-1) + a(n-2) - a(n-3). - Harvey P. Dale, Dec 24 2012
From Wesley Ivan Hurt, Nov 10 2013: (Start)
a(n) = 4*n - floor((n-1)/2) - 3.
a(2*k-1) = 7*k-6, a(2*k) = 7*k-2. (End)
E.g.f.: 2 + ((14*x - 9)*exp(x) + exp(-x))/4. - David Lovler, Sep 01 2022