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.

Previous Showing 21-22 of 22 results.

A162888 An alternating sum of the first n nonprimes.

Original entry on oeis.org

1, 3, 3, 4, 5, 15, 6, 7, 8, 24, 9, 10, 11, 33, 12, 13, 39, 14, 42, 15, 16, 17, 51, 18, 54, 19, 20, 60, 21, 22, 23, 69, 24, 25, 75, 26, 78, 27, 28, 84, 29, 87, 30, 31, 32, 96, 33, 99, 34, 35, 105, 36, 37, 38, 114, 39, 117, 40, 41, 123, 42, 43, 129, 44, 132, 45, 46, 138, 47, 141
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 16 2009

Keywords

Comments

Define an alternating 1-based sum S(n) = (1-0)+(1+1)+(1-2)+...(1-(-1)^n*n) = A064455(n+1).
The sequence evaluates this sum for an upper limit of the n-th nonprime A141468(n).

Examples

			a(1) = 1 = 1 - (-1)^0*0.
a(2) = 3 = 1 - (-1)^0*0 + 1 -(-1)^1*1.
a(3) = 3 = 1 - (-1)^0*0 + 1 -(-1)^1*1 + 1 - (-2)^2*2 + 1 - (-1)^3*3 + 1 - (-1)^4*4.
		

Crossrefs

Programs

  • Maple
    A141468 := proc(n) option remember; local a; if n = 1 then 0 ; else for a from procname(n-1)+1 do if not isprime(a) then RETURN(a) ; fi; od: fi; end:
    A064455 := proc(n) if type(n,'even') then 3*n/2; else (n+1)/2 ; fi; end:
    A162888 := proc(n) A064455(A141468(n)+1) ; end: seq(A162888(n),n=1..100) ; # R. J. Mathar, Jul 19 2009

Formula

a(n) = A064455(A141468(n)+1). - R. J. Mathar, Jul 19 2009

Extensions

Definition edited by R. J. Mathar, Jul 19 2009

A162887 Odd nonprimes in an alternating 1-based sum up to some odd nonprime.

Original entry on oeis.org

15, 33, 39, 51, 69, 75, 87, 105, 117, 123, 129, 141, 159, 177, 183, 189, 195, 201, 213, 219, 231, 243, 249, 255, 267, 279, 285, 303, 309, 315, 321, 327, 333, 339, 357, 369, 375, 381, 393, 399, 411, 429, 435, 447, 453, 459, 465, 483, 489, 495, 501, 513, 519
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 16 2009

Keywords

Comments

Define the alternating sum S(u) = sum_{k=0..u} (1-(-1)^k*k) = A064455(u+1) as in A162886.
Evaluate the sum with upper limits u= 1,9, 15, 21... from A014076, and add S(u) to this sequence here whenever it is itself a member of A014076.

Examples

			The sequence S(u) = 3, 15, 24, 33, 39, 42, 51, 54, 60, 69, ... is generated by u = 1, 9, 15, 21, ...
The first S-term, 3, is prime, and therefore not added to the sequence. The second S-term, 15, is an odd nonprime and added to the sequence. The third, 24, is even and not added to the sequence.
		

Crossrefs

Cf. A014076.

Extensions

3 removed by R. J. Mathar, Aug 27 2009
Previous Showing 21-22 of 22 results.