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.

A379783 For n >= 2, let b(n) = 1 if A379899(n) is 3 mod 4, 0 if A379899(n) is 1 mod 4; form the RUNS transform of {b(n), n >= 2}.

Original entry on oeis.org

3, 7, 19, 42, 116, 292, 791, 2085, 5692, 15482, 42709, 118272, 329891, 923905, 2600458, 7344965, 20818129
Offset: 1

Views

Author

N. J. A. Sloane, Jan 11 2025

Keywords

Comments

If instead of A379899 we begin with the primes >= 2 in their natural order, the {b(n), n >= 2} sequence is 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, ..., with RUNS transform 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 2, 3, 2, ..., (a dramatically different sequence, essentially A091237).

Examples

			A379899 begins 2, 3, 7, 11, 5, 13, 17, 29, 37, 41, 53, 19, ..., and the {b(n), n >= 2} sequence begins 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, ..., whose RUNS transform is 3, 7, 19, 42, ...
		

Crossrefs

See also A379652, A379785.

Programs

  • Mathematica
    nn = 2^20; c[_] := True; j = 3; q = 0; r = 1; s = 4;
    Monitor[Reap[
      Do[m = j + s;
        While[k = SelectFirst[FactorInteger[m][[All, 1]], c]; !IntegerQ[k],
          m += s];
        c[k] = False; j = k;
        If[# == r, q++, r = #; Sow[q]; q = 1] &[(Mod[k, 4] - 1)/2],
    {n, nn}] ][[-1, 1]], n] (* Michael De Vlieger, Jan 11 2025 *)

Extensions

a(10)-a(17) from Michael De Vlieger, Jan 11 2025

A379784 Similar to A379899 but start with 1 instead of 2.

Original entry on oeis.org

1, 5, 3, 7, 11, 19, 23, 31, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97, 101, 109, 113, 43, 47, 59, 67, 71, 79, 83, 103, 107, 127, 131, 139, 151, 163, 167, 179, 191, 199, 211, 223, 227, 239, 251, 263, 271, 283, 307, 311, 331, 347, 359, 367, 379, 383, 137, 149, 157, 173, 181, 193, 197, 229, 233, 241, 257, 269, 277, 281, 293, 313
Offset: 1

Views

Author

N. J. A. Sloane, Jan 11 2025

Keywords

Crossrefs

Cf. A379899.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<1, {}, b(n-1) union {a(n)}) end:
    a:= proc(n) option remember; local c, p; p:= infinity;
          for c from a(n-1)+4 by 4 while p=infinity do
            p:= min(numtheory[factorset](c) minus b(n-1)) od; p
        end: a(1):=1:
    seq(a(n), n=1..200);  # Alois P. Heinz, Jan 11 2025

A380075 Records in A379899.

Original entry on oeis.org

2, 3, 7, 11, 13, 17, 29, 37, 41, 53, 59, 67, 71, 79, 83, 103, 107, 127, 131, 139, 151, 163, 167, 179, 181, 193, 197, 229, 233, 241, 257, 269, 277, 281, 293, 313, 317, 337, 349, 353, 373, 389, 397, 401, 409, 421, 433, 449, 457, 461, 509, 521, 541, 557, 569, 571
Offset: 1

Views

Author

Paolo Xausa, Jan 11 2025

Keywords

Crossrefs

Cf. A379899, A380076 (indices of records).

Programs

  • Mathematica
    nn = 120; c[_] := True; r = j = 2; s = 4; c[2] = False;
    {j}~Join~Reap[Do[m = j + s;
      While[k = SelectFirst[FactorInteger[m][[All, 1]], c];
        ! IntegerQ[k], m += s];
      c[k] = False; j = k;
      If[k > r, r = k; Sow[r]], {nn}] ][[-1, 1]] (* Michael De Vlieger, Jan 11 2025 *)

A380076 Indices of records in A379899.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114
Offset: 1

Views

Author

Paolo Xausa, Jan 11 2025

Keywords

Crossrefs

Cf. A379899, A380075 (records).

Programs

  • Mathematica
    nn = 120; c[_] := True; r = j = 2; s = 4; c[2] = False;
    {1}~Join~Reap[Do[m = j + s;
      While[k = SelectFirst[FactorInteger[m][[All, 1]], c];
        ! IntegerQ[k], m += s];
      c[k] = False; j = k;
    If[k > r, r = k; Sow[n]], {n, nn}] ][[-1, 1]] (* Michael De Vlieger, Jan 11 2025 *)

A379900 a(n) = position of prime(n) in A379899, or a(n) = -1 if prime(n) is not in A379899.

Original entry on oeis.org

1, 2, 5, 3, 4, 6, 7, 12, 13, 8, 14, 9, 10, 15, 16, 11, 17, 31, 18, 19, 32, 20, 21, 33, 34, 35, 22, 23, 36, 37, 24, 25, 38, 26, 39, 27, 40, 28, 29, 41, 30, 42, 73, 43, 44, 74, 75, 76, 77, 45, 46, 78, 47, 79, 48, 80, 49, 81, 50, 51, 82, 52, 83, 84, 53, 54, 85
Offset: 1

Views

Author

Robert C. Lyons, Jan 05 2025

Keywords

Crossrefs

Cf. A379899.

Programs

  • Python
    from sympy import prime, primefactors, primepi
    def get_a379900(a379899_indices):
        a379900 = []
        count = 1
        while True:
            p = prime(count)
            if p not in a379899_indices:
                break
            a379900.append(a379899_indices[p])
            count += 1
        return a379900
    a379899 = [2]
    a379899_indices = dict()
    a379899_indices[2] = 1
    max_a379899_len=1000
    while len(a379899) <= max_a379899_len:
        candidate = a379899[-1]
        done = False
        while not done:
            candidate = candidate + 4
            factors = primefactors(candidate)
            for factor in factors:
                if factor not in a379899_indices:
                    a379899.append(factor)
                    a379899_indices[factor] = len(a379899)
                    done = True
                    break
    a379900 = get_a379900(a379899_indices)
    print(a379900)

A379785 For n >= 2, let b(n) = 1 if A379652(n) is 3 mod 4, 0 if A379652(n) is 1 mod 4; form the RUNS transform of {b(n), n >= 2}.

Original entry on oeis.org

1, 8, 1, 1, 2, 1, 2, 3, 1, 3, 2, 4, 1, 1, 1, 2, 1, 3, 2, 1, 3, 1, 1, 5, 2, 2, 3, 3, 4, 4, 1, 1, 3, 2, 1, 2, 1, 3, 1, 6, 1, 3, 2, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 4, 2, 1, 1, 1, 1, 15, 1, 3, 3, 1, 5, 1, 1, 3, 1, 1, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 4, 3, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 4, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 7, 2, 2
Offset: 1

Views

Author

N. J. A. Sloane, Jan 11 2025

Keywords

Comments

Has the same relationship to A379652 as A379783 does to A379899. See A379783 for further information.

Crossrefs

Programs

  • Mathematica
    nn = 400; c[_] := True; j = 2; q = 0; r = 1;
    Rest@ Reap[Do[m = 2*j + 1;
      While[Set[k, SelectFirst[FactorInteger[m][[All, 1]], c]];
        ! IntegerQ[k], m = 2*m + 1];
      c[k] = False; j = k;
      If[# == r, q++, r = #; Sow[q]; q = 1] &[(Mod[k, 4] - 1)/2],
    {n, nn}] ][[-1, 1]] (* Michael De Vlieger, Jan 11 2025 *)
Showing 1-6 of 6 results.