[seqfan] Q A139312 simple prime indicator function
Richard Mathar
mathar at strw.leidenuniv.nl
Wed Jun 15 23:41:36 CEST 2011
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:
More information about the SeqFan
mailing list