A085038 Erroneous version of A063934.
3, 4, 5, 6, 7, 10, 13, 12, 11, 14, 17, 18, 19
Offset: 1
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
a(7) = (7 + 7)/2 = 7; a(8) = (7 + 11)/2 = 9.
Table[Mean[{NextPrime[n-1],NextPrime[n+1,-1]}],{n,2,80}] (* Harvey P. Dale, Nov 22 2011 *)
{ for (n=2, 1000, write("b063932.txt", n, " ", (precprime(n) + nextprime(n))/2) ) } \\ Harry J. Smith, Sep 02 2009
a(10) = 10 - (11 - 7)/2 = 1; a(11) = 11 - (11 + 11)/2 = 0.
{ for (n=2, 1000, write("b063933.txt", n, " ", n - (precprime(n) + nextprime(n))/2) ) } \\ Harry J. Smith, Sep 03 2009
Contribution from _Omar E. Pol_, Oct 06 2012 (Start): a(1) = 1, by definition. Also 1 is the first nonprime. a(2) = 2, the first prime. a(3) = 0, the sum of composite numbers between 2 and 3. a(4) = 3, the second prime. a(5) = 4, the sum of the composite numbers between 3 and 5. a(6) = 5, the third prime. a(7) = 6, the sum of the composite numbers between 5 and 7. a(8) = 7, the fourth prime. a(9) = 27, the sum of the composite numbers between 7 and 11, since 8+9+10 = 27. a(10) = 11, the fifth prime. (End)
Join[{1},With[{nn=40},Riffle[Prime[Range[nn]],Table[Total[Range[Prime[n]+1,Prime[n+1]-1]],{n,nn}]]]] (* Harvey P. Dale, Jul 16 2023 *)
4 = sumtwice(2); 5 = sum(2,3); 6 = 2, sumtwice(3), 5, 7; 8 = 2, sum(3,5), 7, 11;
clc clear all aP= [primes(1000)]; qN= numel(aP); kL=[]; %init empty result for nn= 1:qN %Loop to sum the central pairs auxT= ceil((nn+1)/2); auxL= ceil(nn/2); kL= [kL; aP(auxL)+aP(auxT)]; end kL %kL is the result
A144043 := proc(n) ithprime(ceil((n+1)/2))+ithprime(ceil(n/2)) ; end proc: # R. J. Mathar, Sep 11 2011
With[{p=Prime[Range[50]]},Riffle[2p,ListConvolve[{1,1},p]]] (* Paolo Xausa, Nov 02 2023 *)
Comments