A078309 Numbers that are congruent to {1, 4, 7} mod 10.
1, 4, 7, 11, 14, 17, 21, 24, 27, 31, 34, 37, 41, 44, 47, 51, 54, 57, 61, 64, 67, 71, 74, 77, 81, 84, 87, 91, 94, 97, 101, 104, 107, 111, 114, 117, 121, 124, 127, 131, 134, 137, 141, 144, 147, 151, 154, 157, 161, 164, 167, 171, 174, 177, 181, 184, 187, 191, 194, 197
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
Crossrefs
The sequence begins with the same first 6 terms as the 'Straight' sequence (A028373).
Programs
-
Magma
[3*n + Floor((n-1)/3) - 2: n in [1..60]]; // Vincenzo Librandi, Apr 23 2014
-
Maple
A078309:=n->(30*n-24-3*cos(2*n*Pi/3)+sqrt(3)*sin(2*n*Pi/3))/9: seq(A078309(n), n=1..100); # Wesley Ivan Hurt, Jun 14 2016
-
Mathematica
Table[1 + 3*Mod[n - 1, 3] + 10*Floor[(n - 1)/3], {n, 55}] Select[Range[200], MemberQ[{1,4,7}, Mod[#,10]]&] (* or *) LinearRecurrence[ {1,0,1,-1}, {1,4,7,11}, 60] (* Harvey P. Dale, Apr 21 2014 *) CoefficientList[Series[(-1 - 3 x (1 + x + x^2))/(-1 + x + x^3 - x^4), {x, 0, 100}], x] (* Vincenzo Librandi, Apr 23 2014 *)
-
PARI
a(n)=1+n--%3*3+n\3*10 \\ Charles R Greathouse IV, Sep 25 2012
Formula
a(n) = 1 + 3*mod(n-1, 3) + 10*floor((n-1)/3).
From Arkadiusz Wesolowski, Sep 21 2012: (Start)
a(n) = a(n-3) + 10 for n>4.
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(n) = 3*n + floor((n-1)/3) - 2.
G.f.: (-x - 3*(x^2 + x^3 + x^4))/(-1 + x + x^3 - x^4). (End)
From Wesley Ivan Hurt, Jun 14 2016: (Start)
a(n) = (30*n-24-3*cos(2*n*Pi/3)+sqrt(3)*sin(2*n*Pi/3))/9.
a(3k) = 10k-3, a(3k-1) = 10k-6, a(3k-2) = 10k-9. (End)
Extensions
Edited by Robert G. Wilson v, Dec 24 2002
Comments