login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A097961 Numbers n such that the sum of the first n odd primes is divisible by n. 1
1, 2, 3, 60, 73, 357, 690, 970, 1560, 1844, 2016, 2071, 3267, 7034, 22388, 37244, 137166, 808334, 1126996, 3420839, 4971830, 14647946, 15553569, 21957090, 31327140, 90514444, 98576118, 204198604, 210662116, 553825420 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..30.

FORMULA

When A071148(n) / n or (A007504(n+1)-2)/n is an integer.

EXAMPLE

a(1) = 1 since 3 is divisible by 1.

a(2) = 2 since 3 + 5 = 8 is divisible by 2.

a(3) = 3 since 3 + 5 + 7 = 15 is divisible by 3.

a(4) != 4 since 3 + 5 + 7 + 11 = 26 is not divisible by 4.

98576118 * 977748014 = 96382603602329652.

MATHEMATICA

NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; p = 2; s = 0; Do[p = NextPrim[p]; s = s + p; If[ Mod[s, n] == 0, Print[n]], {n, 151666666}] (* Robert G. Wilson v, Oct 23 2004 *)

PROG

(C++)

#include <fstream>

#include <iostream>

using namespace std;

int primes[999] = {/* first 999 odd primes here, omitted for space*/};

int total = 0;

int main() {

  for (int a = 1; a < 1000; a++)  {

    total = total + primes[a-1];

    if (total % a == 0) cout << a << ", ";

  }

  return 0;

} /* Anne Donovan, Oct 22 2004 */

CROSSREFS

Cf. A071148.

Sequence in context: A152657 A299172 A154253 * A145556 A124083 A112098

Adjacent sequences:  A097958 A097959 A097960 * A097962 A097963 A097964

KEYWORD

easy,nonn

AUTHOR

Anne M. Donovan (anned3005(AT)aol.com), Oct 22 2004

EXTENSIONS

More terms from Robert G. Wilson v, Oct 23 2004

a(28)-a(30) from Rémy Sigrist, Sep 25 2016

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 14 01:29 EDT 2021. Contains 345016 sequences. (Running on oeis4.)