cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A255818 a(n) = 2*B*C*(n mod A) + A*C*(n mod B) + A*B*(n mod C) with A=3, B=5, C=7.

Original entry on oeis.org

106, 212, 108, 214, 215, 111, 112, 218, 114, 115, 221, 117, 223, 224, 15, 121, 227, 123, 229, 230, 21, 127, 233, 129, 130, 236, 132, 133, 239, 30, 136, 242, 138, 244, 140, 36, 142, 248, 144, 145, 251, 42, 148, 254, 45, 151, 257, 153, 154, 155, 51, 157, 263, 159
Offset: 1

Views

Author

Aaron Kastel, Apr 07 2015

Keywords

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

Crossrefs

Cf. A256643 for an example with 2 modifications and A256668 for 3 modifications.

Programs

  • 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
  • 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 *)

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