login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A181053 Numbers n such that Sum_{k=1..n} (-1)^(n-k) *tau(k) is prime. 1
4, 10, 12, 14, 26, 28, 30, 32, 34, 50, 52, 54, 56, 58, 82, 92, 94, 124, 130, 132, 134, 136, 138, 176, 178, 186, 234, 240, 292, 300, 302, 304, 306, 308, 312, 366, 372, 374, 376, 384, 390, 392, 394, 398, 458, 540, 548, 564, 566, 570, 632, 634, 638, 644, 646, 654 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The partial alternating sums of the number of divisors tau(.)=A000005(.) are 1, 1, 1, 2, 0, 4, -2, 6, -3, 7, -5, 11, -9, 13,.. for n>=0.
The first primes generated are 2, 7, 11, 13, 29, 31, 37, 41, 41, 71, 73, 79, 83, 83, 131, 157, 157, 223,... for upper limits of the sum as recorded by the sequence.
LINKS
EXAMPLE
n=4 is in the sequence because sum_{k=1..4} (-1)^(4-k)*tau(k) = (-1)^3*1 + (-1)^2*2 + (-1)^1*2 + (-1)^0*3 = -1 +2 -2 + 3 = 2 is prime.
MAPLE
with(numtheory): for n from 1 to 1000 do: x:=sum((((-1)^(n-k))*tau(k), k=1..n)): if type(x, prime)=true then printf(`%d, `, n): fi: od:
MATHEMATICA
s={}; sum=0; Do[sum = DivisorSigma[0, n] - sum; If[sum > 0 && PrimeQ[sum], AppendTo[s, n]], {n, 1, 654}]; s (* Amiram Eldar, Sep 10 2019 *)
CROSSREFS
Cf. A000005.
Sequence in context: A155475 A023693 A299634 * A239055 A295129 A287338
KEYWORD
nonn
AUTHOR
Michel Lagneau, Oct 01 2010
EXTENSIONS
Comment slightly extended by R. J. Mathar, Oct 24 2010
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 09:35 EDT 2024. Contains 371967 sequences. (Running on oeis4.)