login
A078309
Numbers that are congruent to {1, 4, 7} mod 10.
2
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,2
COMMENTS
The formula 1 + 3*mod(n-1, 3) + floor(2/7 + (n-1)/n) * 10^floor((n-1)/3) produces a sequence with the same first 6 terms.
Numbers with last digit 1, 4, or 7. - Wesley Ivan Hurt, Jun 14 2016
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)
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 *)
PROG
(PARI) a(n)=1+n--%3*3+n\3*10 \\ Charles R Greathouse IV, Sep 25 2012
(Magma) [3*n + Floor((n-1)/3) - 2: n in [1..60]]; // Vincenzo Librandi, Apr 23 2014
CROSSREFS
The sequence begins with the same first 6 terms as the 'Straight' sequence (A028373).
Sequence in context: A172513 A327737 A081834 * A195171 A184623 A184581
KEYWORD
nonn,easy
AUTHOR
Jochen Ziegenbalg, Dec 23 2002
EXTENSIONS
Edited by Robert G. Wilson v, Dec 24 2002
STATUS
approved