login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A332903
a(1) = 1, then after the first differences of A333123.
4
1, 0, 0, 0, 0, 1, 0, -1, 1, 0, 0, 1, 0, 2, 0, -4, 0, 4, 0, -2, 7, -5, 0, -1, -1, 4, -2, 4, 0, 3, 0, -11, 16, -15, 19, -12, 0, 5, 2, -12, 0, 24, 0, -19, 12, -7, 0, -9, 23, -21, 0, 5, 0, 2, 2, -2, 14, -5, 0, -2, 0, 12, 9, -41, 32, 14, 0, -44, 58, -5, 0, -42, 0, 9, 5, 0, 75, -61, 0, -37, 9, -5, 0, 47, -48, 76, -5, -65, 0, 42, 42
OFFSET
1,14
FORMULA
a(1) = 1, and for n > 1, a(n) = A333123(n) - A333123(n-1).
a(p) = 0 for all primes p.
MATHEMATICA
Prepend[Differences[#], First[#]] &@ Nest[Append[#1, Sum[#1[[#2 - #2/p]], {p, FactorInteger[#2][[All, 1]]}]] & @@ {#, Length@ # + 1} &, {1}, 90] (* Michael De Vlieger, Apr 15 2020 *)
PROG
(PARI)
up_to = 105;
A333123list(up_to) = { my(v=vector(up_to)); v[1] = 1; for(n=2, up_to, v[n] = vecsum(apply(p -> v[n-n/p], factor(n)[, 1]~))); (v); };
v333123 = A333123list(up_to);
A333123(n) = v333123[n];
A332903(n) = if(1==n, n, (A333123(n)-A333123(n-1)));
CROSSREFS
Sequence in context: A366879 A109578 A302826 * A082519 A035688 A364105
KEYWORD
sign
AUTHOR
Antti Karttunen, Apr 04 2020
STATUS
approved