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 21 results. Next

A378030 Lexicographically earliest sequence of distinct positive integers such that a(a(n)) = a(a(n)-1) + a(a(n)-2).

Original entry on oeis.org

3, 4, 7, 11, 6, 17, 23, 9, 32, 12, 44, 56, 14, 70, 16, 86, 102, 19, 121, 21, 142, 24, 166, 190, 26, 216, 28, 244, 30, 274, 33, 307, 340, 35, 375, 37, 412, 39, 451, 41, 492, 43, 535, 578, 46, 624, 48, 672, 50, 722, 52, 774, 54, 828, 57, 885, 942, 59, 1001, 61, 1062, 63, 1125, 65, 1190, 67, 1257, 69, 1326, 1395, 72, 1467, 74, 1541, 76, 1617, 78, 1695, 80
Offset: 1

Views

Author

Scott R. Shannon, Nov 14 2024

Keywords

Comments

A self-referencing Fibonacci sequence. The terms appear to be concentrated along two lines, a lower straight line where a(n) is approximately n and an upper curved line where a(n) ~ n^2/4.
The missing numbers are 1, 2, 5, 8, 10, 13, 15, 18, 20, 22, 25, 27, 29, 31, ... .

Examples

			a(1) = 3 as a(3) = 7 and a(3-1) + a(3-2) = 4 + 3 = 7.
		

Crossrefs

A379051 Lexicographically earliest infinite sequence of distinct positive numbers with the property that n is a member of the sequence iff a(n) is composite.

Original entry on oeis.org

2, 4, 5, 6, 8, 9, 10, 12, 14, 15, 7, 16, 17, 18, 20, 21, 22, 24, 23, 25, 26, 27, 28, 30, 32, 33, 34, 35, 31, 36, 38, 39, 40, 42, 44, 45, 41, 46, 48, 49, 50, 51, 47, 52, 54, 55, 56, 57, 58, 60, 62, 63, 59, 64, 65, 66, 68, 69, 70, 72, 67, 74, 75, 76, 77, 78, 80
Offset: 1

Views

Author

N. J. A. Sloane, Dec 17 2024

Keywords

Comments

The sequence tells you exactly which terms of the sequence are composite: the second, fourth, fifth, sixth, etc. terms are composite, and this is the lexicographically earliest sequence with this property.
Let P be a property of the nonnegative integers, such as being a prime.
The OEIS contains many entries whose definitions have the following form.
"The sequence is the lexicographically earliest infinite sequence of distinct positive (or sometimes nonnegative) integers with the property that n is a term of the sequence iff a(n) has property P."
That is, the terms of the sequence tell you which terms of the sequence have the property. A121053 is the classical example.
Since these are lists, the offset is usually 1.
There are two versions, one where the sequence is required to be strictly increasing, and an unrestricted version which is not required to be increasing.
Examples:
Property P Unrestricted Increasing
----------------------------------------
Prime A121053 A079254, A334067 (offset 0)
Composite A379051 A099797
Not composite A377901 A099798
Not prime A379053 A085925

Crossrefs

Programs

  • Mathematica
    nn = 120; u = 3; v = {}; w = {2}; c = 4;
    {2}~Join~Reap[Do[
      If[MemberQ[w, n],
        k = c; w = DeleteCases[w, n],
        m = Min[c, u, v]; If[And[CompositeQ[m], n < m],
          AppendTo[v, n]];
          If[Length[v] > 0,
            If[v[[1]] == m,
            v = Rest[v] ] ]; k = m];
        AppendTo[w, k];
        If[k == c, c++; While[PrimeQ[c], c++] ]; Sow[k];
    If[n + 1 >= u, u++; While[CompositeQ[u], u++]], {n, 2, nn}] ][[-1, 1]] (* Michael De Vlieger, Dec 17 2024 *)

Formula

When sorted, this appears to be the complement of [1, 3, 11, and prime(2*t), t >= 3]. - Scott R. Shannon, Dec 18 2024

Extensions

More terms from Michael De Vlieger, Dec 17 2024

A379053 Lexicographically earliest infinite sequence of distinct positive numbers with the property that n is a member of the sequence iff a(n) is not a prime.

Original entry on oeis.org

1, 3, 4, 6, 7, 8, 9, 10, 12, 14, 13, 15, 16, 18, 20, 21, 19, 22, 24, 25, 26, 27, 28, 30, 32, 33, 34, 35, 23, 36, 37, 38, 39, 40, 42, 44, 45, 46, 48, 49, 43, 50, 51, 52, 54, 55, 53, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 61, 70, 72, 74, 75, 76, 77, 78, 71
Offset: 1

Views

Author

N. J. A. Sloane, Dec 17 2024

Keywords

Comments

The sequence tells you exactly which terms of the sequence are either 1 or composite.
See the Comments in A379051 for further information.

Crossrefs

Programs

  • Mathematica
    nn = 120; u = 3; v = {}; w = {}; c = 4;
    {1}~Join~Reap[Do[
      If[MemberQ[w, n],
        k = c; w = DeleteCases[w, n],
        m = Min[{c, u, v}]; If[And[CompositeQ[m], n < m],
          AppendTo[v, n]];
          If[Length[v] > 0,
            If[v[[1]] == m,
            v = Rest[v]]]; k = m];
        AppendTo[w, k]; If[k == c, c++; While[PrimeQ[c], c++]]; Sow[k];
    If[n + 1 >= u, u++; While[CompositeQ[u], u++]], {n, 2, nn}] ][[-1, 1]] (* Michael De Vlieger, Dec 17 2024 *)

Formula

When sorted, this appears to be the complement of [2, 5, 11, 17, 29, and prime(2*t+1), t >= 35]. - Scott R. Shannon, Dec 18 2024

Extensions

More terms from Michael De Vlieger, Dec 17 2024

A121175 Sequence S with the following properties: (i) a(1)=2; (ii) for n is S, a(n)=a(1)+a(2)+...+a(n-1); (iii) for n not in S, a(n)=the smallest number different from a(1), ..., a(n-1) not breaking property (ii).

Original entry on oeis.org

2, 2, 4, 8, 3, 7, 26, 52, 10, 114, 12, 240, 14, 494, 16, 1004, 18, 2026, 20, 4072, 22, 8166, 24, 16356, 27, 32739, 65478, 29, 130985, 31, 262001, 33, 524035, 35, 1048105, 37, 2096247, 39, 4192533, 41, 8385107, 43, 16770257, 45, 33540559
Offset: 1

Views

Author

Max Alekseyev, Aug 15 2006

Keywords

Comments

Taking a(1)=2 makes all terms distinct except for a(1)=a(2)=2

Crossrefs

A378098 Lexicographically earliest sequence of distinct positive integers such that a(a(n)) shares a factor with a(a(n)-1).

Original entry on oeis.org

2, 4, 5, 10, 6, 8, 9, 12, 14, 16, 13, 26, 18, 15, 20, 22, 19, 38, 24, 21, 27, 30, 25, 35, 28, 32, 34, 36, 23, 46, 33, 39, 42, 40, 44, 48, 41, 82, 50, 45, 51, 54, 47, 94, 52, 56, 49, 63, 57, 60, 55, 65, 58, 62, 64, 66, 68, 70, 61, 122, 72, 69, 75, 78, 74, 76, 71, 142, 80, 84, 77, 88, 79, 158, 86, 90, 81, 87, 93, 96, 92, 98, 85, 95, 100, 102, 99, 105, 91, 104
Offset: 1

Views

Author

Scott R. Shannon, Nov 16 2024

Keywords

Comments

A self-referencing EKG-type sequence. The terms appear to be concentrated along two lines, a lower straight line where a(n) is slightly above n and an upper straight line where a(n) is approximately 2*n. For larger values of n the later line is composed solely of even semiprimes.
In the first 100000 terms there are no fixed points, and it is likely none exist. In the same range there are only two terms where a(n) is less than n, for a(29) = 23 and a(97) = 89.
The missing numbers are 1, 3, 7, 11, 17, 29, 31, 37, 43, 53, 59, 67, 73, 83, ... .

Examples

			a(2) = 4 as a(1) = 2 and 4 is the smallest unused number that shares a factor with a(2-1) = a(1) = 2.
a(3) = 5 as a(3) is not referenced earlier in the sequence so it is the lowest unused number that does not violate the sharing factor requirement. It cannot be 3 as that would require a(3) = 3 to share a factor with a(3-1) = a(2) = 4, which is does not, and it cannot be 4 as that has already been used.
		

Crossrefs

A377897 Numbers k such that k + PrimePi(k) is even.

Original entry on oeis.org

4, 5, 8, 10, 11, 14, 16, 17, 20, 22, 23, 25, 27, 30, 31, 33, 35, 38, 40, 41, 44, 46, 47, 49, 51, 54, 56, 58, 59, 62, 64, 66, 67, 69, 72, 73, 75, 77, 80, 82, 83, 85, 87, 90, 92, 94, 96, 97, 99, 102, 103, 105, 108, 109, 111, 114, 116, 118, 120, 122, 124, 126, 127, 129, 132, 134, 136, 137, 140
Offset: 1

Views

Author

N. J. A. Sloane, Nov 13 2024

Keywords

Crossrefs

Cf. A000720, A121053, A377994 (complement).

Programs

  • Mathematica
    Select[Range[200], EvenQ[# + PrimePi[#]] &] (* Paolo Xausa, Nov 13 2024 *)
  • Python
    from sympy import nextprime
    def A377897_gen(): # generator of terms
        p,q,a = 3,5,1
        while True:
            yield from range(p+a,q,2)
            p, q, a = q, nextprime(q), a^1
    A377897_list = list(islice(A377897_gen(),69)) # Chai Wah Wu, Nov 13 2024
    
  • Python
    from sympy import primepi, prevprime
    def A377897(n):
        def f(x):
            if x<=3: return n+x
            p = prevprime(x+1)
            i = int(primepi(p))
            return n+x-(p>>1)-(x-p-((i^x)&1)>>1)
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Nov 13 2024

A378116 Lexicographically earliest sequence of distinct positive integers such that a(a(n)) shares a factor with a(a(n)-2) while not sharing a factor with a(a(n)-1).

Original entry on oeis.org

3, 4, 9, 8, 7, 6, 35, 12, 25, 11, 15, 22, 14, 33, 16, 21, 18, 49, 20, 63, 26, 27, 19, 24, 95, 28, 45, 32, 31, 30, 217, 34, 77, 36, 55, 38, 39, 40, 51, 44, 42, 121, 46, 99, 50, 57, 43, 48, 215, 52, 75, 56, 54, 91, 58, 65, 62, 85, 60, 119, 64, 105, 68, 69, 70, 61, 71, 122, 213, 74, 81, 73, 78, 365, 76, 115, 82, 125, 83, 80, 249, 86, 87, 88, 93, 92, 111, 94, 84
Offset: 1

Views

Author

Scott R. Shannon, Nov 17 2024

Keywords

Comments

A self-referencing Yellowstone permutation-like sequence. Care must be taken when finding a(n) to ensure that, if n+1 has previously appeared in the sequence, a(n-1) has at least one prime factor not in a(n), else a(n+1) would not exist.
In the first 100000 terms the fixed points are 6, 24, 30, 48, 80, 240, 629, 2328, 2532, 3960, 17130, 29850, 57480, 57876, 60180. It is likely more exist.
The missing numbers are 1, 2, 5, 10, 13, 17, 23, 29, 37, 41, 47, 53, 59, 66 ... .

Examples

			a(1) = 3 as a(3) = 9 and 9 is the smallest unused number that shares a factor with a(3-2) = a(1) = 3 while not sharing a factor with a(3-1) = a(2) = 4.
a(5) = 7 as a(7) = 35 and 35 is the smallest unused number that shares a factor with a(7-2) = a(5) = 7 while not sharing a factor with a(7-1) = a(6) = 6. Note that a(5) cannot be 5 as 5 does not share a factor with a(5-2) = a(3) = 9, nor can it be 6 as that would imply a(6) shares a factor with a(6-2) = a(4) = 8 while not sharing a factor with a(6-1) = a(5) = 6, which is impossible.
		

Crossrefs

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 *)

A378766 Lexicographically earliest infinite sequence of distinct positive numbers with the property that n is a member of the sequence iff a(n) is powerful (in A001694).

Original entry on oeis.org

1, 3, 4, 8, 6, 9, 10, 16, 25, 27, 12, 32, 14, 36, 17, 49, 64, 19, 72, 21, 81, 23, 100, 26, 108, 121, 125, 29, 128, 31, 144, 169, 34, 196, 37, 200, 216, 39, 225, 41, 243, 43, 256, 45, 288, 47, 289, 50, 324, 343, 52, 361, 54, 392, 56, 400, 58, 432, 60, 441, 62, 484
Offset: 1

Views

Author

Michael De Vlieger, Dec 18 2024

Keywords

Comments

The sequence is a list of indices m of powerful numbers a(m).
See comments in A379051 for more information.

Examples

			a(1) = 1 since 1 is powerful, validating the appearance of 1 as an index of a powerful number in the sequence.
a(2) = 3 since self-referential 2 would prove false; 2 is not powerful, but 3 mandates a powerful number a(3).
a(3) = 4 since a(2) = 3, and 4 is the smallest powerful number that has not appeared.
a(4) = 8 since a(3) = 4, and 8 is the smallest powerful number that has not appeared.
a(5) = 6 since m = 5 has not appeared, and 6 is the smallest weak (nonpowerful, in A052485) number k > n.
a(6) = 9 since a(5) = 6, and 9 is the smallest powerful number that has not appeared, etc.
		

Crossrefs

Programs

  • Mathematica
    nn = 120;
    u = 3; v = {}; w = {}; c = 1;
    s = Rest@ Union@ Flatten@ Table[a^2*b^3, {b, Surd[#, 3]}, {a, Sqrt[#/b^3]}] &[2^30];
    rad[x_] := Times @@ FactorInteger[x][[All, 1]];
    {1}~Join~Reap[Do[
      If[MemberQ[w, n], k = s[[c]];
        w = DeleteCases[w, n],
        m = Min[{s[[c]], u, v}];
        If[And[Divisible[m, rad[m]^2], CompositeQ[m], n < m],
          AppendTo[v, n]];
          If[Length[v] > 0,
            If[v[[1]] == m, v = Rest[v] ] ]; k = m];
      AppendTo[w, k]; If[k == s[[c]], c++]; Sow[k];
        If[n + 1 >= u, u++;
          While[And[Divisible[u, rad[u]^2], CompositeQ[u]], u++] ], {n, 2, nn}] ][[-1, 1]]

A203620 A self-describing sequence: when the sequence is read as a string of digits, a(n) says the position of the digits that are prime.

Original entry on oeis.org

2, 3, 5, 1, 7, 8, 22, 11, 20, 15, 21, 14, 23, 25, 26, 27, 29, 31, 32, 19, 35, 36, 37, 39, 40, 41, 49, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 63, 70, 71, 73, 75, 76, 77, 78, 79, 81, 82, 83, 85, 90, 92, 94, 98, 105, 109, 200, 115, 201, 114, 122, 123, 125, 126
Offset: 1

Views

Author

Paolo P. Lava, Feb 15 2012

Keywords

Comments

Digits in position a(n) are prime, namely 2, 3, 5 or 7. Any step chooses the minimum integer not yet present in the sequence and not leading to a contradiction.

Examples

			The sequence cannot start with 1 because the first digit, 1 itself, is not prime. Then let us put 2. The next digit must be prime: 3. Even the third must be prime: 5. No specific indications for the fourth digit. We can choose 1 because the first digit, 2, is prime. The fifth must be prime: 7. And so on.
		

Crossrefs

Cf. A114315 and A121053.
Previous Showing 11-20 of 21 results. Next