[seqfan] Re: Q A139312 simple prime indicator function
RGWv
rgwv at rgwv.com
Thu Jun 16 06:03:32 CEST 2011
Richard,
Both of the Mathematica formulas give the same results, but they, like
you, do not match the sequences cited.
Bob.
-----Original Message-----
From: Richard Mathar
Sent: Wednesday, June 15, 2011 5:41 PM
To: seqfan at seqfan.eu
Subject: [seqfan] Q A139312 simple prime indicator function
Can someone explain the terms in http://oeis.org/A139312 (uned) which
appears to be some variant of sign(A056221(n)) by definition, or intended
to be a characteristic function dividing A046869 by A068828 according
to prime(n)^1-prime(n-1)*prime(n+1). This, at least, is what the formula
says..
the references to A028388 and A130903 are misleading, I suspect.
My version, according to the formula, would start with offset 2, because the
2nd
prime is the first element in the sequence to consider:
0,1,0,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,1,0,1,0,0,1,1,0,1
And that does not match with the terms.
Maple (and it may help to run the Mma provided in the sequence):
for n from 2 to 100 do
p := ithprime(n) ;
q := nextprime(p) ;
r := prevprime(p) ;
p^2-q*r ; # A056221
if % >= 0 then # A068828
printf("%d,",1) ;
else
printf("%d,",0) ;
end if;
end do:
_______________________________________________
Seqfan Mailing list - http://list.seqfan.eu/
More information about the SeqFan
mailing list