|
|
A133954
|
|
Difference between the numbers of nonnegative evil and odious multiples of p_n less than 2^p_n, where p_n = n-th prime.
|
|
3
|
|
|
0, 3, 5, -7, 11, 13, 697, 19, -23, 29, -237367, 37, 97129, 44250483, -47, 53, 59, 61, 67, -71, 1325443061345, -79, 83, 6096136101052865, 6711137545, 101, -103, 107, 197096207419453, 1733616652657, -16388345406766785202757351, 131, 904581545
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
The following statements are true: 1) If prime p_n has a primitive root 2, then a(n)=p_n; 2) If prime p_n has a semiprimitive root 2, then a(n)=-p_n (for definition of semiprimitive root 2 of a prime, see the 2nd link, p. 1).
A comparison of Gerbicz's calculations up to a(46) with A001122 and A139035 shows that one can conjecture that the converse statements are true as well.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = p_n if 2 is a primitive root of p_n (A001122); a(n) = -p_n if p_n is in A139035, i.e., -2 is a primitive root of p_n [Shevelev, 2007]. No other exact regularity of the sequence is known until now. - Vladimir Shevelev, Oct 26 2014
|
|
EXAMPLE
|
Consider p_2=3; since 0,3,6 are evil, then a(2) = 3 - 0 = 3.
|
|
PROG
|
(PARI) a(p)=o=e=vector(p, i, 0); e[p]=1; r=1; for(i=1, p, o2=e2=vector(p); for(j=1, p, w=(j-r)%p; if(w==0, w=p); o2[j]=o[j]+e[w]; e2[j]=e[j]+o[w]); o=o2; e=e2; r=(2*r)%p); return(e[p]-o[p]) \\ Robert Gerbicz, Jan 03 2011
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|