OFFSET
1,2
COMMENTS
Therefore, this sequence also includes multiples of 21.
First differences: 3, 3, 1, 2, 3, 2, 1, 3, 3, 3, 3, 1, 2, 3, 2, 1, 3, 3, 3, 3, 1, 2, 3, 2, 1, 3, 3, 3, 3, 1, 2, 3, 2, 1, 3, 3, 3 have period {3, 3, 1, 2, 3, 2, 1, 3, 3}.
In general, sequences of numbers divisible by primes p and q will be of the form a(n+p+q-1) = a(n)+p*q. - Gary Detlefs, Oct 07 2013
LINKS
Daniel Starodubtsev, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,0,1,-1).
FORMULA
a(n+9) = a(n) + 21.
a(n) = 21*floor((n-1)/9) + 2*((n-1) mod 9) + s(((n-1) mod 9)-1) + 1 - floor(((n-2) mod 9)/8), where s(n) = floor(n*sqrt(2)) - 2*floor(n/sqrt(2)). - Gary Detlefs, Oct 07 2013
a(n) = 7n/3 + O(1). - Charles R Greathouse IV, Feb 13 2017
From Colin Barker, Mar 21 2020: (Start)
G.f.: x^2*(3 + 3*x + x^2 + 2*x^3 + 3*x^4 + 2*x^5 + x^6 + 3*x^7 + 3*x^8) / ((1 - x)^2*(1 + x + x^2)*(1 + x^3 + x^6)).
a(n) = a(n-1) + a(n-9) - a(n-10) for n>10.
(End)
MATHEMATICA
Union@Flatten@{Table[3n, {n, 70}], Table[7n, {n, 30}]}
Select[ Range@ 153, Mod[#, 3] == 0 || Mod[#, 7] == 0 &]
PROG
(PARI) concat(0, Vec(x^2*(3 + 3*x + x^2 + 2*x^3 + 3*x^4 + 2*x^5 + x^6 + 3*x^7 + 3*x^8) / ((1 - x)^2*(1 + x + x^2)*(1 + x^3 + x^6)) + O(x^70))) \\ Colin Barker, Mar 21 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, Dec 07 2010
EXTENSIONS
0 inserted by Daniel Starodubtsev, Mar 21 2020
STATUS
approved