OFFSET
1,3
COMMENTS
All calculations are done mod 4.
LINKS
Dimitri Hendriks, Frits G. W. Dannenberg, Jorg Endrullis, Mark Dow and Jan Willem Klop, Arithmetic Self-Similarity of Infinite Sequences, arXiv preprint 1201.3786 [math.CO], 2012.
EXAMPLE
n=4: v_2(4)=2, v_p(4)=0 for p>2, so a(4)=2*f(2)=2*1=2.
MAPLE
with(padic) ;
A200726f := proc(p)
op(1+(p mod 5), [1, 0, 1, 3, 2]) ;
end proc:
A200726 := proc(n)
local a, e;
a := 0 ;
for e in ifactors(n)[2] do
p := op(1, e) ;
a := a+ ordp(n, p)*A200726f(p) ;
end do:
return (a mod 4 );
end proc:
seq(A200726(n), n=1..90) ; # R. J. Mathar, Jun 28 2012
MATHEMATICA
f[p_] := {1, 0, 1, 3, 2}[[Mod[p, 5] + 1]];
a[1] = 0; a[n_] := Sum[IntegerExponent[n, p]*f[p], {p, FactorInteger[n][[ All, 1]]}] // Mod[#, 4]&;
Array[a, 90] (* Jean-François Alcover, Nov 29 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, May 06 2012
STATUS
approved