login
A256496
a(n) = 15(n mod 2) + 10(n mod 3) + 6(n mod 5).
4
31, 32, 33, 34, 35, 6, 37, 38, 39, 10, 41, 12, 43, 44, 15, 16, 47, 18, 49, 20, 21, 22, 53, 24, 25, 26, 27, 28, 59, 0, 31, 32, 33, 34, 35, 6, 37, 38, 39, 10, 41, 12, 43, 44, 15, 16, 47, 18, 49, 20, 21, 22, 53, 24, 25, 26, 27, 28, 59, 0, 31, 32, 33, 34, 35, 6
OFFSET
1,1
COMMENTS
After 0 it cycles again from 31.
This is the simplest example of a(n) = b*c*(n mod a) + a*c*(n mod b) + a*b*(n mod c) with a=2, b=3, c=5.
a(n) mod abc = n mod abc.
Other values for a,b,c require modification so that bc + ac + ab = abc + 1. For example, for a=3, b=5, c=7, 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 expression (with a=3, b=5, c=7) (A255818) is found in the Kol Bo (Hebrew: כלבו), a book of religious Jewish law from the 13th to 14th centuries. It is given there as a method for calculating a person's age without anyone saying it explicitly.
a(n) = n for n = 6, 10, 12, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 31, 32, 33, 34, 35, 37, 38, 39, 41, 43, 44, 47, 49, 53, 59.
LINKS
Aaron Hacohen from Lunil?, כלבו (in Hebrew).
Menachem Mendel Schneerson, אגרות קודש (in Hebrew).
Wikipedia, Kol Bo
FORMULA
a(n) = 15(n mod 2) + 10(n mod 3) + 6(n mod 5).
G.f.: -x*(59*x^6+146*x^5+201*x^4+195*x^3+159*x^2+94*x+31) / ((x-1)*(x+1)*(x^2+x+1)*(x^4+x^3+x^2+x+1)). - Colin Barker, Apr 07 2015
a(n) = -2*a(n-1) - 2*a(n-2) - a(n-3) + a(n-5) + 2*a(n-6) + 2*a(n-7) + a(n-8), for n>=9. - Vaclav Kotesovec, Apr 07 2015
MATHEMATICA
Table[15 Mod[n, 2] + 10 Mod[n, 3] + 6 Mod[n, 5], {n, 60}] (* Michael De Vlieger, Mar 31 2015 *)
LinearRecurrence[{-2, -2, -1, 0, 1, 2, 2, 1}, {31, 32, 33, 34, 35, 6, 37, 38}, 70] (* or *) PadRight[ {}, 70, {31, 32, 33, 34, 35, 6, 37, 38, 39, 10, 41, 12, 43, 44, 15, 16, 47, 18, 49, 20, 21, 22, 53, 24, 25, 26, 27, 28, 59, 0}] (* Harvey P. Dale, Oct 31 2016 *)
PROG
(PARI) vector(30, n, 15*(n%2) + 10*(n%3) + 6*(n%5)) \\ Michel Marcus, Mar 31 2015
CROSSREFS
Cf. A255818 for an example with 1 modification, A256643 for 2 modifications and A256668 for 3 modifications.
Sequence in context: A369409 A165852 A291523 * A133782 A022401 A042936
KEYWORD
nonn,easy
AUTHOR
Aaron Kastel, Mar 31 2015
STATUS
approved