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 11-20 of 26 results. Next

A055398 Result of fourth stage of sieve of Eratosthenes (after eliminating multiples of 2, 3, 5, 7).

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 169, 173, 179, 181, 187, 191, 193, 197, 199, 209, 211, 221, 223, 227, 229, 233, 239
Offset: 1

Views

Author

Henry Bottomley, May 15 2000

Keywords

Comments

Essentially the same as A052424. - R. J. Mathar, Oct 13 2008

Crossrefs

Programs

  • Mathematica
    Join[{2,3,5,7},Select[Table[n,{n,2,500}],Mod[#,2]!=0&&Mod[#,3]!=0&&Mod[#,5]!=0&&Mod[#,7]!=0&]] (* Vladimir Joseph Stephan Orlovsky, Feb 18 2011 *)

Formula

a(n+4) = 2 * floor((3 * floor((10 * floor((9 * floor((56 * floor((55 * floor((54 * floor((53 * floor((52 * floor((51 * floor((50 * floor((49 * n + 1) / 48) + 13) / 49) + 20) / 50) + 24) / 51) + 31) / 52) + 35) / 53) + 42) / 54) + 54) / 55) + 1) / 8) + 8) / 9) + 1) / 2) + 1 for n>=1; see (22) in Diab link. - Michel Marcus, Dec 14 2020

A322366 Number of integers k in {0,1,...,n} such that k identical test tubes can be balanced in a centrifuge with n equally spaced holes.

Original entry on oeis.org

1, 0, 2, 2, 3, 2, 5, 2, 5, 4, 7, 2, 11, 2, 9, 8, 9, 2, 17, 2, 17, 10, 13, 2, 23, 6, 15, 10, 23, 2, 29, 2, 17, 14, 19, 12, 35, 2, 21, 16, 37, 2, 41, 2, 35, 38, 25, 2, 47, 8, 47, 20, 41, 2, 53, 16, 51, 22, 31, 2, 59, 2, 33, 52, 33, 18, 65, 2, 53, 26, 67, 2, 71, 2, 39, 68, 59, 18, 77, 2, 77, 28, 43, 2, 83, 22, 45, 32, 79
Offset: 0

Views

Author

Alois P. Heinz, Dec 04 2018

Keywords

Comments

Numbers where a(n) + A000010(n) != n + 1: A102467. - Robert G. Wilson v, Aug 23 2021

Examples

			a(6) = |{0,2,3,4,6}| = 5.
a(9) = |{0,3,6,9}| = 4.
a(10) = |{0,2,4,5,6,8,10}| = 7.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; local f, b; f, b:=
           map(i-> i[1], ifactors(n)[2]),
           proc(m, i) option remember; m=0 or i>0 and
            (b(m, i-1) or f[i]<=m and b(m-f[i], i))
           end; forget(b); (t-> add(
          `if`(b(j, t) and b(n-j, t), 1, 0), j=0..n))(nops(f))
        end:
    seq(a(n), n=0..100);
  • Mathematica
    $RecursionLimit = 4096;
    a[1] = 0;
    a[n_] := a[n] = Module[{f, b}, f = FactorInteger[n][[All, 1]];
         b[m_, i_] := b[m, i] = m == 0 || i > 0 &&
         (b[m, i - 1] || f[[i]] <= m && b[m - f[[i]], i]);
         With[{t = Length[f]}, Sum[
         If[b[j, t] && b[n - j, t], 1, 0], {j, 0, n}]]];
    Table[a[n], {n, 0, 1000}] (* Jean-François Alcover, Dec 13 2018, after Alois P. Heinz, corrected and updated Aug 07 2021 *)
    f[n_] := Block[{c = 2, k = 2, p = First@# & /@ FactorInteger@ n}, While[k < n, If[ IntegerPartitions[k, All, p, 1] != {} && IntegerPartitions[n - k, All, p, 1] != {}, c++]; k++]; c]; f[0] = 1; f[1] = 0; Array[f, 75] (* Robert G. Wilson v, Aug 22 2021 *)

Formula

a(n) = |{ k : k and n-k can be written as a sum of prime factors of n }|.
a(n) = 2 <=> n is prime (A000040).
a(n) >= n-1 <=> n in {1,2,3,4} union { A008588 }.
a(n) = (n+4)/2 <=> n in { A100484 } minus { 4 }.
a(n) = (n+9)/3 <=> n in { A001748 } minus { 9 }.
a(n) = (n+25)/5 <=> n in { A001750 } minus { 25 }.
a(n) = (n+49)/7 <=> n in { A272470 } minus { 49 }.
a(n^2) = n+1 <=> n = 0 or n is prime <=> n in { A182986 }.
a(A001248(n)) = A008864(n).
a(n) is odd <=> n in { A163300 }.
a(n) is even <=> n in { A004280 }.

A054403 Result of third stage of sieve of Eratosthenes (after eliminating multiples of 2, 3 and 5).

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 77, 79, 83, 89, 91, 97, 101, 103, 107, 109, 113, 119, 121, 127, 131, 133, 137, 139, 143, 149, 151, 157, 161, 163, 167, 169, 173, 179, 181, 187, 191, 193, 197, 199, 203, 209, 211
Offset: 1

Views

Author

Henry Bottomley, May 15 2000

Keywords

Crossrefs

Programs

Formula

2, 3, 5 and numbers 30k +/- 1, 7, 11, or 13.
a(n+3) = 2*floor((3*floor((10*floor((9*n+1)/8)+8)/9)+1)/2)+1 for n>=1; see (19) in Diab link. - Michel Marcus, Dec 14 2020

A168007 Jumping divisor sequence (see Comments lines for definition).

Original entry on oeis.org

1, 2, 4, 3, 6, 5, 10, 9, 12, 11, 22, 21, 24, 23, 46, 45, 48, 47, 94, 93, 96, 95, 100, 99, 102, 101, 202, 201, 204, 203, 210, 209, 220, 219, 222, 221, 234, 233, 466, 465, 468, 467, 934, 933, 936, 935, 940, 939, 942, 941, 1882, 1881, 1884, 1883, 1890, 1889, 3778, 3777, 3780, 3779, 7558, 7557, 7560, 7559
Offset: 1

Views

Author

Omar E. Pol, Nov 19 2009

Keywords

Comments

Consider the diagram with overlapping periodic curves that appears in the Links section (figure 2). The number of curves that contain the point [n,0] equals the number of divisors of n. The curve of diameter d represents the divisor d of n. Now consider only the lower part of the diagram (figure 3). Starting from point [1,0] we continue our journey walking along the semicircumference with smallest diameter not used previously (see the illustration of initial terms, figure 1). The sequence is formed by the values of n where the trajectory intercepts the x axis. - Omar E. Pol, Jan 14 2019

Crossrefs

Programs

  • PARI
    lista(nn) = {my(v=vector(nn, i, if(i<4, 2^i/2))); for(n=4, nn, if(v[n-1]%2, v[n]=v[n-1] + factor(v[n-1])[1, 1], v[n]=v[n-1] - 1)); v; } \\ Jinyuan Wang, Mar 14 2020
    
  • Python
    from itertools import count, islice
    from sympy import primefactors
    def A168007_gen(): # generator of terms
        yield (a := 1)
        for n in count(2):
            yield (a:=a+(min(primefactors(a),default=1) if a&1 or a==2 else -1))
    A168007_list = list(islice(A168007_gen(),20)) # Chai Wah Wu, Mar 14 2023

Formula

a(1) = 1; if a(n) is an even composite number then a(n+1) = a(n) - 1; otherwise a(n+1) = a(n) + A020639(a(n)). - Omar E. Pol, Jan 13 2019

Extensions

More terms from Omar E. Pol, Jan 12 2019

A370952 a(1) = 1; for n > 1, a(n) is the least positive integer not already in the sequence such that a(n) == a(n-1) (mod 2*n-1).

Original entry on oeis.org

1, 4, 9, 2, 11, 22, 35, 5, 39, 20, 41, 18, 43, 16, 45, 14, 47, 12, 49, 10, 51, 8, 53, 6, 55, 106, 159, 104, 161, 102, 163, 37, 167, 33, 171, 29, 175, 25, 179, 21, 183, 17, 187, 13, 191, 100, 7, 197, 3, 201, 302, 96, 306, 92, 310, 88, 314, 84, 318, 80, 322, 76, 326, 72, 330, 68, 334, 64, 338, 60, 342, 56, 346, 52, 350
Offset: 1

Views

Author

N. J. A. Sloane, Mar 07 2024

Keywords

Comments

Very similar to A368382, except that there the differences are controlled by the sequence {2,3,5,7,9,11,13,15,...} (A004280), whereas here they are controlled by {3,5,7,9,11,13,15,...}.

Crossrefs

Cf. A004280, A368382, A370975, A372052 (where n appears).

Programs

  • Python
    from itertools import count, islice
    def A370952_gen(): # generator of terms
        a, aset = 1, {0,1}
        for p in count(3,2):
            yield a
            for b in count(a%p,p):
                if b not in aset:
                    aset.add(b)
                    a = b
                    break
    A370952_list = list(islice(A370952_gen(),20)) # Chai Wah Wu, Apr 17 2024

A303600 a(1)=2 and a(2)=3, then a(n+1) is the smallest integer larger than a(n) that can be written as the sum of two (not necessarily distinct) earlier terms in exactly one way.

Original entry on oeis.org

2, 3, 4, 5, 9, 10, 11, 16, 22, 24, 28, 29, 30, 37, 42, 50, 55, 56, 70, 73, 76, 82, 89, 95, 101, 102, 115, 128, 133, 135, 136, 141, 142, 153, 160, 161, 168, 174, 181, 195, 199, 200, 214, 221, 227, 233, 247, 252, 265, 266, 267, 273, 280, 285, 286, 325, 331, 332, 338
Offset: 1

Views

Author

Michel Marcus, Apr 26 2018

Keywords

Crossrefs

Cf. A004280 (with first terms 1 and 2).

Programs

  • Mathematica
    Nest[Append[#, Function[{m, s}, First@ SelectFirst[Tally[s], And[First@ # > m, Last@ # < 3] &]] @@ {Max@ #, Sort[Total /@ Tuples[#, {2}]]}] &, {2, 3}, 57] (* Michael De Vlieger, Apr 27 2018 *)
  • PARI
    \\ See PARI link \\ David A. Corneth, Apr 27 2018
    
  • Python
    terms = [2,3]
    while len(terms) < 100:
        options = []
        for x in range(len(terms)):
            for y in range(x,len(terms)):
                options.append(terms[x]+terms[y])
        for y in sorted(options):
            if options.count(y) == 1 and y > max(terms):
                terms.append(y)
                break
    print(terms)
    # David Consiglio, Jr., Apr 18 2018
    
  • Python
    from collections import Counter
    def A303600_list(num_terms):
        terms = [2, 3]
        sum_counts = Counter([4, 5, 6])
        next_term = 3
        for n in range(2, num_terms):
            next_term += 1
            while sum_counts[next_term] != 1: next_term += 1
            terms.append(next_term)
            for term in terms: sum_counts[term + next_term] += 1
        return terms
    print(A303600_list(59))
    # David Radcliffe, Jun 19 2025

Extensions

More terms from David Consiglio, Jr., Apr 26 2018

A321125 T(n,k) = b(n+k) - (2*b(n)*b(k) + 1)*b(n*k) + b(n) + b(k) + 1, where b(n) = A154272(n+1), square array read by antidiagonals (n >= 0, k >= 0).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1
Offset: 0

Views

Author

Keywords

Comments

Let (A,B,d) denote the three-variable bracket polynomial for the two-bridge knot with Conway's notation C(n,k). Then T(n,k) is the leading coefficient of the reduced polynomial x*(1,1,x). In Kauffman's language, T(n,k) is the number of states of the two-bridge knot C(n,k) corresponding to the maximum number of Jordan curves.

Examples

			Square array begins:
  1, 1, 1, 1, 1, 1, ...
  1, 2, 1, 1, 1, 1, ...
  1, 1, 3, 2, 2, 2, ...
  1, 1, 2, 1, 1, 1, ...
  1, 1, 2, 1, 1, 1, ...
  1, 1, 2, 1, 1, 1, ...
  ...
		

References

  • Louis H. Kauffman, Formal Knot Theory, Princeton University Press, 1983.

Crossrefs

Programs

  • Mathematica
    b[n_] = If[n == 0 || n == 2, 1, 0];
    T[n_, k_] = b[n + k] - (2*b[n]*b[k] + 1)*b[n*k] + b[n] + b[k] + 1;
    Table[T[k, n - k], {n, 0, 12}, {k, 0, n}] // Flatten
  • Maxima
    b(n) := if n = 0 or n = 2 then 1 else 0$ /* A154272(n+1) */
    T(n, k) := b(n + k) - (2*b(n)*b(k) + 1)*b(n*k) + b(n) + b(k) + 1$
    create_list(T(k, n - k), n, 0, 12, k, 0, n);

Formula

T(n,0) = T(0,n) = 1, and T(n,k) = b(n+k) - b(n)*b(k) - b(n*k) + c(n)*c(k) for n >= 1, k >= 1, where b(n) = A154272(n+1) and c(n) = A294619(n).
T(n,1) = A300453(n+1,A321126(n,1)).
T(n,2) = A300454(n,A321126(n,2)).
T(n,n) = A321127(n,A004280(n+1)).
G.f.: (1 + (x - x^2)*y - (x - 3*x^2 + x^3)*y^2 - x^2*y^3)/((1 - x)*(1 - y)).
E.g.f.: ((x^2 + 2*exp(x))*exp(y) - x^2 + (2*x - x^2)*y - (1 + x - exp(x))*y^2)/2.

A321126 T(n,k) = max(n + k - 1, n + 1, k + 1), square array read by antidiagonals (n >= 0, k >= 0).

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 4, 3, 3, 4, 5, 4, 3, 4, 5, 6, 5, 4, 4, 5, 6, 7, 6, 5, 5, 5, 6, 7, 8, 7, 6, 6, 6, 6, 7, 8, 9, 8, 7, 7, 7, 7, 7, 8, 9, 10, 9, 8, 8, 8, 8, 8, 8, 9, 10, 11, 10, 9, 9, 9, 9, 9, 9, 9, 10, 11, 12, 11, 10, 10, 10, 10, 10, 10, 10, 10, 11, 12, 13, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 13
Offset: 0

Views

Author

Keywords

Comments

T(n,k) - 1 is the maximum degree of d in the three-variable bracket polynomial (A,B,d) for the two-bridge knot with Conway's notation C(n,k). Hence, T(n,k) is the maximum number of Jordan curves that are obtained by splitting the crossings of such knot diagram.

Examples

			Square array begins:
    1,  2,  3,  4,  5,  6,  7,  8,  9, 10, ...
    2,  2,  3,  4,  5,  6,  7,  8,  9, 10, ...
    3,  3,  3,  4,  5,  6,  7,  8,  9, 10, ...
    4,  4,  4,  5,  6,  7,  8,  9, 10, 11, ...
    5,  5,  5,  6,  7,  8,  9, 10, 11, 12, ...
    6,  6,  6,  7,  8,  9, 10, 11, 12, 13, ...
    7,  7,  7,  8,  9, 10, 11, 12, 13, 14, ...
    8,  8,  8,  9, 10, 11, 12, 13, 14, 15, ...
    9,  9,  9, 10, 11, 12, 13, 14, 15, 16, ...
   10, 10, 10, 11, 12, 13, 14, 15, 16, 17, ...
  ...
		

References

  • Louis H. Kauffman, Formal Knot Theory, Princeton University Press, 1983.

Crossrefs

T(n,1) = degree of the (n+1)-th row polynomial in A300453.
T(n,k) = degree of the n-th row polynomials in A300454 and A321127, k = 2,n, respectively.

Programs

  • Mathematica
    Table[Max[k + 1, n - 1, n - k + 1], {n, 0, 10}, {k, 0, n}] // Flatten
  • Maxima
    create_list(max(k + 1, n - 1, n - k + 1), n, 0, 10, k, 0, n);

Formula

T(n,k) = T(k,n).
T(n,k) = A051125(n+1,k+1) for 0 <= k <= 2, n >= 0, and T(n,k) = A051125(n+1,k+1) + A003983(n-2,k-2) for k >= 3, n >= 3.
T(n,n) = A004280(n+1).
G.f.: (1 - (2*x - x^2)*y + (x - 2*x^2 + x^3)*y^2 + (x^2 - x^3)*y^3)/(((1 - x)*(1 - y))^2).

A382850 a(n) = least k such that binomial(n, k) > binomial(n - 1, h) for 0 <= h <= n - 1.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 9, 9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31
Offset: 2

Views

Author

Clark Kimberling, Apr 07 2025

Keywords

Comments

All runs appear to have length 2 or 3, with no two consecutive runs of length 3, except for the first two (1, 1, 1; 2, 2, 2). The length of the k-th run of consecutive length-2 runs seems to be close to 0.722*k, but varies irregularly: 1, 2, 2, 4, 3, 5, 5, 7, 6, 8, 8, 9, 9, ... . - Pontus von Brömssen, Apr 15 2025
(Runlength sequence of the runlength sequence) = (2,1,1,2,1,2,1,4,1,3,1,5,...) appears to have 1 in positions given by A004280(n) for n >= 2. - Clark Kimberling, Apr 15 2025

Examples

			The least k such that binomial(5,k) > binomial(4,h) for 0<=h<=4 is 3, since 10 > max{1,4,6}.
		

Crossrefs

Programs

  • Mathematica
    z = 40; c[n_, k_] := Binomial[n, k];
    t[n_] := Table[c[n, k], {k, 0, n}];
    a[n_] := Select[Range[z], c[n, #] > c[n - 1, Floor[(n - 1)/2]] &, 1];
    Flatten[Table[a[n], {n, 1, 3 z}]]  (* A382850 *)
    Flatten[Table[c[n, a[n]], {n, 1, z}]]  (* A382851 *)
  • PARI
    row(n) = vector(n+1, k, binomial(n,k-1));
    a(n) = my(val = vecmax(row(n-1)), w = row(n)); for (i=1, #w, if (w[i] > val, return(i-1));); \\ Michel Marcus, Apr 14 2025
    
  • Python
    from itertools import count
    def A382850_generator():
        k = C0 = C = 1
        for n in count(2):
            C0 = 2*C0 if n%2 == 1 else (n-1)*C0//(n//2) # C(n-1,floor((n-1)/2))
            C = C*n//(n-k) # C(n,k)
            if C <= C0:
                C = C*(n-k)//(k+1)
                k += 1
            yield k # Pontus von Brömssen, Apr 15 2025

Formula

a(n) - a(n-1) is either 0 or 1. - Pontus von Brömssen, Apr 15 2025
Apparently, the lower and upper limits of f(n) = a(n) - n/2 + sqrt(n*log(2)/2) are 0 and 1, respectively, with f(n) < 1 for all n, but with the minimum -0.0144167... of f attained at n = 184. - Pontus von Brömssen, Apr 16 2025

A216240 Composite numbers arising in Eratosthenes sieve with removing the multiples of every other remaining numbers after 2 (see comment).

Original entry on oeis.org

9, 21, 33, 49, 51, 77, 87, 119, 121, 123, 141, 177, 187, 201, 203, 219, 237, 287, 289, 291, 309, 319, 327, 329, 357, 393, 413, 417, 447, 451, 469, 471, 493, 501, 511, 517, 543, 553, 573, 591, 633, 649, 669, 679, 687, 697, 721, 723, 737, 763, 771, 799, 803, 807
Offset: 1

Views

Author

Vladimir Shevelev, Mar 14 2013

Keywords

Comments

We remove even numbers except for 2. The first two remaining numbers are 3,5. Further we remove all remaining numbers multiple of 5,except for 5. The following two remaining numbers are 7,9. Now we remove all remaining numbers multiple of 9, except for 9, etc. The sequence lists the remaining composite numbers.
Conjecture. There exists x_0 such that for every x>=x_0, the number of a(n)<=x is more than pi(x).

Crossrefs

Programs

  • Mathematica
    Module[{a=Insert[Range[1,1000,2], 2, 2], k=4}, While[Length[a] >= 2k, a = Flatten[{Take[a,k], Select[Take[a,-Length[a]+k], Mod[#,a[[k]]] != 0 &]}]; k+=2]; Rest[Select[a,!PrimeQ[#]&]]] (* Peter J. C. Moses, Mar 27 2013 *)
Previous Showing 11-20 of 26 results. Next