|
|
|
|
0, 0, 1, 0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 3, 2, 1, 2, 1, 0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 3, 2, 1, 0, 1, 2, 3, 2, 3, 2, 3, 2, 1, 0, 1, 0, 1, 2, 1, 2, 3, 4, 5, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 2, 3, 2, 3, 4, 3, 2, 1, 2, 3, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,10
|
|
COMMENTS
|
Since this sequence equals A112632(n)-1, and A007352 gives the primes at which the sign of A112632 changes, we have a change of sign in the present sequence not exactly at the primes listed in A007352, but earlier for changes to negative sign, and later for the opposite changes. Moreover, a change of sign in either of the sequences corresponds not necessarily to a change of sign (in the strict sense, i.e., regarding 0 as a number with the same sign as the preceding term) in the other one. - M. F. Hasler, Oct 09 2011
|
|
LINKS
|
|
|
FORMULA
|
|
|
MAPLE
|
A173950 := proc(n) if (ithprime(n)+1) mod 6 = 0 then 1; elif (ithprime(n)-1) mod 6 = 0 then -1; else 0 ; end if; end proc:
|
|
MATHEMATICA
|
Accumulate[Table[Which[Divisible[Prime[n]+1, 6], 1, Divisible[Prime[n]-1, 6], -1, True, 0], {n, 150}]] (* Harvey P. Dale, Apr 24 2019 *)
|
|
PROG
|
(PARI) s=0; forprime(p=1, 999, print1(s+=if(p%3-1, p>3, -1)", ")) \\ M. F. Hasler, Oct 09 2011
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|