A267747 Numbers k such that k mod 2 = k mod 3 = k mod 5.
0, 1, 30, 31, 60, 61, 90, 91, 120, 121, 150, 151, 180, 181, 210, 211, 240, 241, 270, 271, 300, 301, 330, 331, 360, 361, 390, 391, 420, 421, 450, 451, 480, 481, 510, 511, 540, 541, 570, 571, 600, 601, 630, 631, 660, 661, 690, 691, 720, 721, 750, 751, 780, 781, 810, 811, 840
Offset: 1
Links
- Colin Barker, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
Crossrefs
Cf. A267711.
Programs
-
Magma
[15*n-7*(-1)^n-22: n in [1..60]]; // Vincenzo Librandi, Jan 21 2016
-
Mathematica
Table[15*n - 7*(-1)^n - 22, {n, 1000}] (* Or *) Select[ Range[0, 20000], (Mod[#, 2]==Mod[#, 3]==Mod[#, 5]) &] LinearRecurrence[{1,1,-1},{0,1,30},60] (* Harvey P. Dale, Nov 15 2021 *)
-
PARI
concat(0, Vec(x^2*(29*x+1)/((x-1)^2*(x+1)) + O(x^60))) \\ Colin Barker, Jan 21 2016
Formula
a(n) = 15*n - 7*(-1)^n - 22.
G.f.: x^2*(29*x+1)/((x-1)^2*(x+1)).
Comments