login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A077324
Sum of terms of n-th row of A077321.
5
2, 8, 39, 124, 275, 462, 1505, 1816, 2439, 3080, 7271, 5256, 10725, 11284, 18435, 20336, 33031, 24984, 45201, 42120, 62937, 52646, 77671, 68544, 110925, 105326, 163161, 120372, 204189, 124710, 260183, 212096, 264165, 251906, 343735, 276624
OFFSET
1,1
COMMENTS
By definition a(n) == 0 (mod n).
MAPLE
A077324 := proc(nmax) local n, a, T, i, p, s ; T := [] ; a := [] ; n :=1 ; while nops(a) < nmax do s := 0 ; for i from 1 to n do p := 2 ; while ( p in T ) or (p-1) mod n <> 0 do p := nextprime(p) ; od ; T := [op(T), p] ; s := s+p ; od ; a := [op(a), s] ; n := n+1 ; od ; RETURN(a) ; end: A077324(50) ; # R. J. Mathar, Feb 03 2007
MATHEMATICA
A077324[nmax_] := Module[{n = 1, a = {}, T = {}, i, p, s}, While[Length[a] < nmax, s = 0; For[i = 1, i <= n, i++, p = 2; While[MemberQ[T, p] || Mod[p - 1, n] != 0, p = NextPrime[p]]; T = Append[T, p]; s = s + p]; a = Append[a, s]; n = n + 1]; Return[a]];
A077324[36] (* Jean-François Alcover, Oct 17 2024, after R. J. Mathar *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Nov 04 2002
EXTENSIONS
Corrected and extended by R. J. Mathar, Feb 03 2007
STATUS
approved