cp's OEIS Frontend

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.

A109921 a(2n) = prime(n). a(2n+1) = sum of composite numbers between prime(n) and prime(n+1). We define a(1) = 1.

This page as a plain text file.
%I A109921 #21 Jul 16 2023 09:55:35
%S A109921 1,2,0,3,4,5,6,7,27,11,12,13,45,17,18,19,63,23,130,29,30,31,170,37,
%T A109921 117,41,42,43,135,47,250,53,280,59,60,61,320,67,207,71,72,73,380,79,
%U A109921 243,83,430,89,651,97,297,101,102,103,315,107,108,109,333,113,1560,127,387,131
%N A109921 a(2n) = prime(n). a(2n+1) = sum of composite numbers between prime(n) and prime(n+1). We define a(1) = 1.
%C A109921 1 together with the sum of consecutive composites between primes interleaved with the primes. - _Omar E. Pol_, Oct 01 2012
%H A109921 Harvey P. Dale, <a href="/A109921/b109921.txt">Table of n, a(n) for n = 1..1000</a>
%e A109921 Contribution from _Omar E. Pol_, Oct 06 2012 (Start):
%e A109921 a(1) = 1, by definition. Also 1 is the first nonprime.
%e A109921 a(2) = 2, the first prime.
%e A109921 a(3) = 0, the sum of composite numbers between 2 and 3.
%e A109921 a(4) = 3, the second prime.
%e A109921 a(5) = 4, the sum of the composite numbers between 3 and 5.
%e A109921 a(6) = 5, the third prime.
%e A109921 a(7) = 6, the sum of the composite numbers between 5 and 7.
%e A109921 a(8) = 7, the fourth prime.
%e A109921 a(9) = 27, the sum of the composite numbers between 7 and 11, since 8+9+10 = 27.
%e A109921 a(10) = 11, the fifth prime.
%e A109921 (End)
%t A109921 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 *)
%Y A109921 Cf. A109919, A109920, A063934, A060863.
%Y A109921 Cf. A054265.
%K A109921 easy,nonn
%O A109921 1,2
%A A109921 _Amarnath Murthy_, Jul 16 2005
%E A109921 More terms from _David Wasserman_, Aug 15 2005