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-24 of 24 results.

A351855 Partial sums of nonsquares that are partial sums of nonprimes.

Original entry on oeis.org

5, 64, 506, 64325, 268723, 480129, 6282620, 64548862, 9657523883, 13480852825, 29766135708, 105223301080, 519861666225, 851245744041, 1378216791896, 581522966976875, 583298551668358, 885441628670251, 1651966084813205, 16868988672306046, 17170433482837259
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Mar 31 2022

Keywords

Examples

			a(2) = 64 is a term because 64 = 1+4+6+8+9+10+12+14 = 2+3+5+6+7+8+10+11+12 is the sum of the first 8 nonprimes and the sum of the first 9 nonsquares.
		

Crossrefs

Intersection of A051349 and A086849.

Programs

  • Maple
    i:= 0: j:= 0: s:= 0: t:= 0:
    R:= NULL: count:= 0:
    while count < 13 do
      if s <= t then
         i:= i+1;
         if not issqr(i) then
           s:= s+i;
           if s=t then R:= R,s; count:= count+1 fi;
         fi
      else
         j:= j+1;
         if not isprime(j) then
           t:= t+j;
           if s=t then R:= R,t; count:= count+1 fi;
         fi
      fi
    od:
    R;
  • Python
    from itertools import islice
    from sympy import nextprime
    def A351855_gen(): # generator of terms
        c, k, ks, m, p, q = 0, 1, 2, 1, 4, 5
        while True:
            for n in range(ks,ks+2*k):
                c += n
                if c == m:
                    yield c
                else:
                    while c > m:
                        m += p
                        p += 1
                        if p == q:
                            q = nextprime(q)
                            p += 1
            ks += 2*k+1
            k += 1
    A351855_list = list(islice(A351855_gen(),20)) # Chai Wah Wu, Apr 04 2022

Extensions

a(20)-a(21) from Jon E. Schoenfield, Mar 31 2022

A366976 Numbers that cannot be written as sum of two or more consecutive nonprimes.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 9, 12, 13, 15, 16, 20, 21, 24, 25, 30, 32, 35, 40, 42, 44, 47, 48, 52, 56, 61, 66, 70, 72, 73, 80, 88, 93, 96, 98, 100, 107, 110, 119, 120, 140, 141, 144, 167, 174, 179, 186, 190, 196, 204, 205, 234, 236, 252, 253, 260, 275, 290, 292, 299, 303, 310, 312, 313
Offset: 1

Views

Author

Tamas Sandor Nagy, Dec 16 2023

Keywords

Comments

The complement sequence of sums of two or more consecutive nonprime numbers.

Examples

			9 is a term because trying the sums of candidate consecutive nonprimes 1 + 4 = 5 != 9, 1 + 4 + 6 = 11 != 9, 4 + 6 = 10 != 9. All these sums miss the integer 9.
On the other hand, 23 is not a term because 23 = 6 + 8 + 9, which is the sum of three consecutive nonprime numbers.
		

Crossrefs

Primes in the sequence: A257393.

A154588 Numbers that can be expressed as the sum of the first j integer numbers or the first k nonprime numbers, with j and k >=1.

Original entry on oeis.org

1, 28, 435, 10296, 415416, 1062153, 3703281, 426626655, 782002378, 102886232631, 1636197988776, 2749764593278, 61972139524851, 813577626225078, 1604393353172781, 3603538956517305, 44000970048906445, 83556903098276790, 208955344344897381
Offset: 1

Views

Author

Paolo P. Lava & Giorgio Balzarotti, Jan 16 2009, Jan 19 2009

Keywords

Comments

The indices (j,k) where A000217(j) = A051349(k) are (1,1), (7,5), (29,23), (143,123), (911,823), (1457,1327), (2721,2501), (29210,27488), (39547,37295) , (453621,433381) , (1808976,1737137) , (2345107,2253859) , (11133026,10746793), (40338012,39053670), (56646153,54880858) , (84894510,82314170) , (296651209,288273745), (408795555,397457085), (646460121,628975505). - Donovan Johnson, Sep 11 2009

Examples

			28 = A000217(7) = A051349(5).
435 = A000217(19) = A051349(23).
10296 = A000217(143) = A051349(123).
		

Crossrefs

Programs

  • Mathematica
    Module[{nn=10^7,np},np=Select[Range[nn],!PrimeQ[#]&];Intersection[Accumulate[Range[ nn]],Accumulate[ np]]] (* The program generates the first 12 terms of the sequence. *) (* Harvey P. Dale, Feb 08 2024 *)

Formula

(A000217 INTERSECT A051349) MINUS {0}. - R. J. Mathar, Jan 21 2009

Extensions

10256 replaced with 10296 and two more terms added by R. J. Mathar, Jan 21 2009
Extended beyond a(9) by Donovan Johnson, Sep 11 2009

A161569 Sum of first n nonprimes minus their indices.

Original entry on oeis.org

0, 2, 5, 9, 13, 17, 22, 28, 34, 40, 47, 55, 63, 71, 80, 89, 98, 107, 116, 126, 137, 148, 159, 170, 181, 193, 205, 217, 230, 244, 258, 272, 287, 302, 317, 332, 347, 363, 379, 395, 411, 427, 444, 462, 480, 498, 516, 534, 553, 572, 591, 611, 632, 653, 674, 695, 716
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 14 2009

Keywords

Comments

The sum of first n nonprimes is in A051349.
Partial sums of A073425. - Jaroslav Krizek, Jun 27 2009

Examples

			a(1) = 1-1 = 0; a(2) = 0+4-2 = 2, a(3) = 2+6-3 = 5; a(4) = 5+8-4 = 9.
		

Crossrefs

Formula

a(n) = A051349(n)-n*(n+1)/2.
a(n) = a(n-1)+A018252(n)-n, a(1) = 0. - Klaus Brockhaus, Dec 16 2010

Extensions

a(54)-a(57) from Stefano Spezia, May 26 2025
Previous Showing 21-24 of 24 results.