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

A099861 a(n) = (2*n-1)-st composite number: a bisection of A002808.

Original entry on oeis.org

4, 8, 10, 14, 16, 20, 22, 25, 27, 30, 33, 35, 38, 40, 44, 46, 49, 51, 54, 56, 58, 62, 64, 66, 69, 72, 75, 77, 80, 82, 85, 87, 90, 92, 94, 96, 99, 102, 105, 108, 111, 114, 116, 118, 120, 122, 124, 126, 129, 132, 134, 136, 140, 142, 144, 146, 148, 152, 154, 156, 159, 161
Offset: 1

Views

Author

N. J. A. Sloane, Nov 19 2004

Keywords

Examples

			a(1) = 4 is the first composite number.
		

Crossrefs

Programs

  • Maple
    b:=proc(n) if isprime(n)=true then else n fi end: B:=[seq(b(n),n=2..250)]: seq(B[2*m-1],m=1..75); # Emeric Deutsch, Dec 09 2004
  • Mathematica
    Partition[Select[Range[200], CompositeQ], 2][[All, 1]] (* Jean-François Alcover, Mar 22 2023 *)
  • Python
    from sympy import composite
    def A099861(n): return composite((n<<1)-1) # Chai Wah Wu, Nov 14 2024

Formula

a(n) = A175228(n+1). - A.H.M. Smeets, Aug 19 2019

Extensions

More terms from Emeric Deutsch, Dec 09 2004

A175227 Sequence of the remaining nonprimes out of sieve of type: {step 1: starting with the sequence of positive integers A000027; step 2: delete every prime number A000040; step 3: delete every prime(1)-th number greater than the prime(1) from the remaining sequence; step 4: delete every prime(2)-th number greater than the prime(2) from the remaining sequence; etc. for prime(k)-th numbers for k = 3, 4, 5, ...}.

Original entry on oeis.org

1, 4, 8, 14, 16, 22, 30, 33, 40, 49, 54, 56, 62, 77, 80, 92, 94, 99, 111, 116, 118, 132, 144, 152, 154, 166, 174, 182
Offset: 1

Views

Author

Jaroslav Krizek, Mar 07 2010

Keywords

Comments

Sequence of step 1: A000027, sequences of step 2: delete A000040 = primes, remaining A018252 = nonprimes, sequences of step 3: delete A099862 = {6, 9, 12, 15, 18, 21, 24, 26, 28, 32, ...}, remaining A175228 = {1, 4, 8, 10, 14, 16, 20, 22, 25, 27, ...}, sequences of step 4: delete A175229 = {10, 20, 27, 35, 44, 51, 58, 66, 75, 82, ...}, remaining A175230 = {1, 4, 8, 14, 16, 22, 25, 30, 33, 38, ...}, sequences of step 5: delete sequence = {25, 46, 64, 85, 102, 122, 140, 159, 176, 196, ...}, remaining sequence = {1, 4, 8, 14, 16, 22, 30, 33, 38, 40, ...}, ...

A377898 A121053 sorted into increasing order, or, equivalently, the indices of prime terms in A121053.

Original entry on oeis.org

1, 2, 3, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 27, 29, 30, 31, 33, 35, 37, 38, 40, 41, 43, 44, 46, 47, 49, 51, 53, 54, 56, 58, 59, 61, 62, 64, 66, 67, 69, 71, 72, 73, 75, 77, 79, 80, 82, 83, 85, 87, 89, 90, 92, 94, 96, 97, 99, 101, 102, 103, 105, 107, 108, 109, 111, 113, 114, 116, 118, 120, 122, 124, 126, 127, 129, 131, 132, 134, 136, 137, 139
Offset: 1

Views

Author

N. J. A. Sloane, Nov 14 2024

Keywords

Comments

That the two definitions produce the same values is a consequence of the definition of A121053.

Crossrefs

Cf. A121053.
Complement of A099862.

A379054 a(n) = composite(2*n+2) - composite(2*n).

Original entry on oeis.org

3, 3, 3, 3, 3, 3, 2, 2, 4, 2, 2, 3, 3, 3, 3, 2, 2, 3, 2, 3, 3, 2, 3, 2, 4, 2, 2, 3, 3, 2, 2, 3, 2, 2, 3, 2, 4, 2, 4, 2, 3, 2, 2, 2, 2, 2, 3, 2, 3, 2, 3, 3, 2, 2, 2, 3, 3, 2, 3, 2, 2, 3, 3, 2, 2, 3, 2, 3, 3, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 3, 3, 3, 3
Offset: 1

Views

Author

N. J. A. Sloane, Dec 18 2024

Keywords

Comments

A121053 is divided into blocks, and (ignoring the initial terms of A121053) these are the lengths of the blocks.

Crossrefs

First differences of A099862.

Programs

  • Mathematica
    Differences[Select[Range[300], CompositeQ][[2 ;; ;; 2]]] (* Paolo Xausa, Dec 18 2024 *)

A354430 First diagonal of an array, generated from the sequence of the nonprimes.

Original entry on oeis.org

1, 7, 22, 58, 142, 334, 766, 1726, 3837, 8435, 18364, 39646, 84986, 181117, 384160, 811676, 1709425, 3590213, 7522354, 15728427, 32827027, 68405533, 142344708, 295824870, 614046159, 1273068141, 2636250146, 5452584131, 11264148401, 23242423457, 47903544728
Offset: 1

Views

Author

Tamas Sandor Nagy, May 27 2022

Keywords

Comments

Mirroring the idea in A048457, here with nonprimes, and including 1 of the first generation.
We write down the sequence of the nonprimes 1, 4, 6, ... in the first row of the array. Nonprime(k) + nonprime(k+2) will generate the second row. Thereafter we generate the further rows in a similar manner. The leftmost diagonal gives the sequence.

Examples

			1    4    6    8    9   10   12   14   15   16   18   20   21 ...
     7   12   15   18   21   24   27   30   33   36   39 ...
         22   30   36   42   48   54   60   66   72 ...
              58   72   84   96  108  120  132 ...
                  142  168  192  216  240 ...
                       334  384  432 ...
                            766 ...
		

Crossrefs

Programs

  • Python
    from sympy import composite
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def T(r, k):
        if r == 1: return 1 if k == 1 else composite(k-1)
        return T(r-1, k) + T(r-1, k+2)
    def a(n): return T(n, 1)
    print([a(n) for n in range(1, 30)]) # Michael S. Branicky, May 28 2022

Extensions

a(8) and beyond from Michael S. Branicky, May 28 2022

A377900 After A121053(n) has been found, a(n) is the smallest candidate for A121053(n+1) that has not been eliminated.

Original entry on oeis.org

1, 1, 1, 6, 6, 9, 9, 9, 12, 12, 12, 15, 15, 15, 18, 18, 18, 21, 21, 21, 24, 24, 24, 26, 26, 28, 28, 32, 32, 32, 32, 34, 34, 36, 36, 39, 39, 39, 42, 42, 42, 45, 45, 45, 48, 48, 48, 50, 50, 52, 52, 55, 55, 55, 57, 57, 60, 60, 60, 63, 63, 63, 65, 65, 68, 68, 68, 70
Offset: 1

Views

Author

N. J. A. Sloane, Nov 14 2024

Keywords

Examples

			After a(8) = 9, and A121053(9) = 10 has been determined, the smallest prime not yet used is 17 and the smallest composite not yet used or eliminated is 12 (10 is now eliminated because the terms of A121053 must be distinct), so a(9) = 12.
		

Crossrefs

Programs

  • PARI
    lista(nn) = my(c=4, t=0); print1("1, 1, 1"); forcomposite(k=4, nn, if(t%2, for(n=c, k-1, print1(", ", k)); c=k); t++); \\ Jinyuan Wang, Nov 29 2024
    
  • Python
    from sympy import isprime
    from itertools import count, islice
    def nextcomposite(n): return next(k for k in count(n+1) if not isprime(k))
    def agen(): # generator of terms
        yield from [1, 1, 1]
        c, c2 = 4, 6
        for n in count(4):
            if n == c2: c, c2 = c2, nextcomposite(nextcomposite(c2))
            yield c2
    print(list(islice(agen(), 70))) # Michael S. Branicky, Nov 29 2024

Formula

a(n) = A099862(k+1) for A099862(k) <= n < A099862(k+1). - Jinyuan Wang, Nov 29 2024

Extensions

More terms from Jinyuan Wang, Nov 29 2024
Showing 1-6 of 6 results.