OFFSET
1,1
COMMENTS
This is the prime partial sum just before the prime is added to achieve an integer mean as defined in A134125.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..32
EXAMPLE
PROG
(UBASIC) 10 'primes using counters 20 N=3:C=1:R=5:print 2; 3, 5 30 A=3:S=sqrt(N) 40 B=N\A 50 if B*A=N then N=N+2:goto 30 60 A=A+2:O=A 70 if A<=sqrt(N) then 40 80 C=C+1 90 R=R+N:T=R/C:U=R-N 100 if T=int(T) then print C; U; N; R; T:stop 110 N=N+2:goto 30
(PARI) lista(pmax) = {my(k = 0, s = 2); forprime(p = 3, pmax, k++; s += p; if(!(s % k), print1(s-p, ", "))); } \\ Amiram Eldar, Apr 30 2024
CROSSREFS
KEYWORD
less,nonn
AUTHOR
Enoch Haga, Oct 09 2007
EXTENSIONS
Edited by R. J. Mathar, Apr 17 2009
a(21)-a(24) from Amiram Eldar, Apr 30 2024
STATUS
approved