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.

Showing 1-2 of 2 results.

A058848 Numbers k such that the sum of the first k odd composites is palindromic.

Original entry on oeis.org

1, 12, 25, 61, 108, 211, 1344, 2339, 10539, 78409, 283181, 1748747, 1795423, 2386702, 2819089, 179101605, 1923088106, 2822581688, 7794689270, 17381011919, 25635268093, 28780043265, 97973526253
Offset: 1

Views

Author

Patrick De Geest, Dec 15 2000

Keywords

Comments

Sequence of odd composite numbers is 9 + 15 + 21 + 25 + 27 + 33 + ... + z. For values of z see A058849.

Crossrefs

Programs

Extensions

a(20) from Donovan Johnson, Sep 01 2012
a(21)-a(23) from Chai Wah Wu, Dec 06 2019
Comment clarified by Harvey P. Dale, Aug 05 2025

A383641 a(n) is the difference between the sum of even composites and the sum of the odd composites in the first n positive integers.

Original entry on oeis.org

0, 0, 0, 4, 4, 10, 10, 18, 9, 19, 19, 31, 31, 45, 30, 46, 46, 64, 64, 84, 63, 85, 85, 109, 84, 110, 83, 111, 111, 141, 141, 173, 140, 174, 139, 175, 175, 213, 174, 214, 214, 256, 256, 300, 255, 301, 301, 349, 300, 350, 299, 351, 351, 405, 350, 406, 349, 407, 407
Offset: 1

Views

Author

Felix Huber, May 08 2025

Keywords

Examples

			Of the first 9 positive integers, 4, 6, and 8 are even composites and 9 is an odd composite, so a(9) = 4 + 6 + 8 - 9 = 9.
		

Crossrefs

Programs

  • Maple
    A383641:=n->`if`(n=1,0,floor((n-2)/2)-n*(n mod 2)+add(ithprime(i),i=2..NumberTheory:-pi(n)));seq(A383641(n),n=1..59);
  • Mathematica
    lim=59;cn=Select[Range[lim],CompositeQ];a[n_]:=Total[Select[cn,EvenQ[#]&&#<=n&]]-Total[Select[cn,OddQ[#]&&#<=n&]];Array[a,lim] (* James C. McMahon, May 14 2025 *)

Formula

a(n) = floor((n-2)/2) - n*(n mod 2) + Sum_{i=2..pi(n)} prime(i) for n > 1.
a(n) = A004526(n) - A193356(n) - A010701(n) + A034387(A000720(n)) for n > 1.
a(n) = Sum_{i=1..n} ((-1)^i*i*A066247(i)).
Showing 1-2 of 2 results.