OFFSET
0,4
COMMENTS
Only power of 2 and zeros. If p is prime than a(p+1)=2.
If n'>n+1 then a(n+1) is not immediately available. It is necessary to find a(n')=2*a((n'-1)') and, if necessary, to repeat the process until a term can be calculate. For instance:
a(9)=2*a(12) -> a(12)=2 and therefore a(9)=4.
Again: a(55)=2*a(81) -> a(81)=2*a(176) -> a(176)=8*a(112) -> a(112)=16 and therefore a(176)=128 -> a(81)=256 -> a(55)=512.
First zero at a(31)=2*a(31) and for all Giuga numbers plus one (31, 859, 1723, 66199, etc.). This because the so far known Giuga numbers satisfy the equation n'=n+1. Other zeros for a(59)=8*a(31), a(71)=16*a(31), a(79)=32*a(31), a(106)=32*a(31), etc.
The general equation a(n+1)=k*a(n'), with k integer and |k|>1, a(0)=0, a(1)=1, leads to the following sequence: 0, 1, 0, k, k, k^2, k, k^3, k, k^2, k^2, k^4, k, k^3, k, k^3, k^2, k^2, k, k^3, etc.
For k=1 or k=-1 we get and incongruence because of a(31)=a(31).
LINKS
Paolo P. Lava, Table of n, a(n) for n = 0..5000
Paolo P. Lava, Plot of the first 5000 terms of the sequence
EXAMPLE
a(0) = 0
a(1) = 1
a(2) = a(1+1) = 2*a(1') = 2*a(0) = 0
a(3) = a(2+1) = 2*a(2') = 2*a(1) = 2
a(4) = a(3+1) = 2*a(3') = 2*a(1) = 2
a(5) = a(4+1) = 2*a(4') = 2*a(4) = 4
a(6) = a(5+1) = 2*a(5') = 2*a(1) = 2
a(7) = a(6+1) = 2*a(6') = 2*a(5) = 8 etc.
MAPLE
with(numtheory);
P:=proc(i)
local a, f, n, p, pfs, t;
a:=array(0..100000); a[0]:=0; a[1]:=1; t:=2; lprint(0, a[0]); lprint(1, a[1]);
for n from 1 by 1 to i do
pfs:=ifactors(n)[2]; f:=n*add(op(2, p)/op(1, p), p=pfs);
a[n+1]:=t*a[f]; lprint(n+1, a[n+1]);
od;
end:
MATHEMATICA
dn[0] = 0; dn[1] = 0; dn[n_] := Module[{f = Transpose[FactorInteger[n]]}, If[PrimeQ[n], 1, Plus @@ (n*f[[2]]/f[[1]])]]; a[0] = 0; a[1] = 1; a[n_] := a[n] = Module[{d = dn[n - 1]}, If[d == n, 0, 2 a[d]]]; Array[a, 100, 0] (* T. D. Noe, May 05 2011 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo P. Lava, May 04 2011
STATUS
approved
