OFFSET
1,1
COMMENTS
After 0 it cycles again from 106 (a(105)=0 so there are 105 (A*B*C) terms).
This is another variation on A256496, where a(n) = B*C*(n mod A) + A*C*(n mod B) + A*B*(n mod C), modified to take the values A=3, B=5, C=7 and still maintain the equivalence a(n) mod ABC = n mod ABC.
Here modification is required (to maintain that equivalence) so that 'BC' + 'AC' + 'AB' = ABC + 1 where 'BC', 'AC' and 'AB' are the coefficients. Therefore, a(n)= 2B*C*(n mod A) + A*C*(n mod B) + A*B*(n mod C) so that 2*5*7 + 3*7 + 3*5 = 3*5*7 = 70 + 21 + 15 = 106.
This is an example with 1 modification.
a(n) = n for n: 15, 21, 30, 36, 42, 45, 51, 57, 60, ..., 314. - Robert G. Wilson v, Apr 07 2015
LINKS
Ray Chandler, Table of n, a(n) for n = 1..1000 (first 105 terms from Aaron Kastel)
Index entries for linear recurrences with constant coefficients, signature (-2, -3, -3, -3, -2, -1, 1, 2, 3, 3, 3, 2, 1).
FORMULA
G.f.: -x*(314*x^11 +836*x^10 +1460*x^9 +1976*x^8 +2384*x^7 +2475*x^6 +2355*x^5 +1921*x^4 +1384*x^3 +850*x^2 +424*x +106) / ((x -1)*(x^2 +x +1)*(x^4 +x^3 +x^2 +x +1)*(x^6 +x^5 +x^4 +x^3 +x^2 +x +1)). - Colin Barker, Apr 14 2015
MATHEMATICA
f[n_] := 70 Mod[n, 3] + 21 Mod[n, 5] + 15 Mod[n, 7]; Array[f, 105] (* Robert G. Wilson v, Apr 07 2015 *)
LinearRecurrence[{-2, -3, -3, -3, -2, -1, 1, 2, 3, 3, 3, 2, 1}, {106, 212, 108, 214, 215, 111, 112, 218, 114, 115, 221, 117, 223}, 60] (* Harvey P. Dale, Sep 21 2024 *)
PROG
(Magma) A:=3; B:=5; C:=7; [2*B*C*(n mod A)+A*C*(n mod B)+A*B*(n mod C): n in [1..60]]; // Bruno Berselli, Apr 14 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Aaron Kastel, Apr 07 2015
STATUS
approved