OFFSET
1,5
COMMENTS
"Jubilees". Motivation: 7 years are counted 7 times and capped off with a 50th year, the Jubilee (Leviticus 25:8); similarly, 7 days are counted 7 times and capped off with "Chag ha-Atzeret" (The Festival of Stopping) in the Omer-counting cycle (ibid 23:15); and these iterative cycles overlay other iterative cycles, like the lunar cycle nested not-quite-evenly within the solar year. This sequence idealizes the overlaying of multiple cycles. Each prime p generates a "swell" of p waves each with max amplitude = p-1, a kind of wavelet that is added into the total signal that is the sequence (e.g., the swell generated by 3 is (3^2)+1 terms in length, running for n=3,...,12 and has values n mod 3 = 0,1,2,0,1,2,0,1,2,0).
FORMULA
a(n) = Sum_{primes p, sqrt(n) - 1/2 < p <= n} (n mod p).
EXAMPLE
For n = 12, we sum over primes 3, 5, 7, 11: a(12) = 12 mod 3 + 12 mod 5 + 12 mod 7 + 12 mod 11 = 0 + 2 + 5 + 1 = 8. In contrast with A024934, the sum does not include 12 mod 2 since 12 > 2+2^2.
PROG
(PARI) a(n) = sum(k=1, n, (n % k)*isprime(k)*(n <= (k^2+k))); \\ Michel Marcus, May 14 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Meir-Simchah Panzer, May 06 2018
STATUS
approved