|
|
A119664
|
|
Sign in term (2p +/- 1) for triangular numbers of the form p * (2p +/- 1), where the two factors are both primes.
|
|
1
|
|
|
-1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, -1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
a(1) = -1 since 6 = 2*3 and 3 = 2*2 - 1.
a(4) = +1 since 21 = 3*7 and 7 = 2*3 + 1.
|
|
PROG
|
(PARI) list(x)=my(v=List()); forprime(p=2, (sqrtint(x\1*8+1)+1)\4, if(isprime(2*p-1), listput(v, -1)); if(isprime(2*p+1), listput(v, 1))); Vec(v) \\ Charles R Greathouse IV, Jun 13 2013
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|