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-10 of 12 results. Next

A338352 Indices of primes in A280985.

Original entry on oeis.org

2, 4, 6, 8, 13, 15, 20, 22, 27, 34, 36, 42, 46, 48, 53, 61, 66, 68, 75, 80, 82, 89, 94, 99, 108, 112, 114, 119, 121, 127, 141, 146, 151, 154, 165, 167, 173, 179, 184, 191, 198, 200, 211, 213, 218, 220, 233, 244, 246, 249, 256, 261, 263, 276, 283, 289, 294, 296, 303, 307, 309, 324
Offset: 1

Views

Author

N. J. A. Sloane, Nov 01 2020

Keywords

Crossrefs

Cf. A280985.

A281117 Inverse permutation to A280985.

Original entry on oeis.org

1, 2, 4, 3, 6, 5, 8, 10, 11, 7, 13, 12, 15, 9, 17, 19, 20, 18, 22, 24, 25, 14, 27, 26, 29, 16, 31, 32, 34, 30, 36, 33, 38, 21, 40, 39, 42, 23, 44, 41, 46, 45, 48, 50, 51, 28, 53, 52, 55, 57, 58, 60, 61, 59, 63, 56, 65, 35, 66, 64, 68, 37, 70, 72, 73, 71, 75
Offset: 1

Views

Author

Rémy Sigrist, Jan 15 2017

Keywords

Comments

a(A280985(n))=A280985(a(n))=n for any n>0.

Crossrefs

Cf. A280985.

A281353 Fixed points in A280985.

Original entry on oeis.org

1, 2, 12, 18, 30, 56
Offset: 1

Views

Author

N. J. A. Sloane, Jan 21 2017

Keywords

Comments

Numbers n such that A280985(n)=n.
In the first 75000 terms there are no other fixed points.
A127202 is very similar to A280985, and in the first 10000 terms it has just these six fixed points.
It may be that there are no further fixed points in either sequence.

Crossrefs

A281354 a(n) = smallest missing number after A280985(n) has been computed.

Original entry on oeis.org

2, 3, 3, 5, 5, 7, 7, 8, 8, 9, 11, 11, 13, 13, 15, 15, 16, 16, 17, 19, 19, 20, 20, 21, 23, 23, 25, 25, 27, 27, 28, 29, 29, 31, 31, 33, 33, 35, 35, 37, 37, 39, 39, 41, 41, 43, 43, 44, 44, 45, 47, 47, 49, 49, 50, 50, 51, 52, 52, 53, 55, 55, 57, 57, 59, 61, 61, 63, 63, 64, 64, 65, 67, 67, 68, 68, 69, 71, 71
Offset: 1

Views

Author

N. J. A. Sloane, Jan 21 2017

Keywords

Comments

Since A280985 and A127202 agree for the first 719 terms, for n < 719 this is also the smallest missing number after A127202(n) has been computed.

Crossrefs

A338358 First differences of A280985.

Original entry on oeis.org

1, 2, -1, 3, -1, 5, -3, 7, -6, 1, 3, -1, 11, -9, 13, -11, 3, -2, 1, 17, -15, 19, -18, 1, 3, -1, 23, -21, 5, -3, 1, 4, -3, 29, -27, 31, -29, 3, -1, 5, -3, 37, -35, 3, -1, 41, -39, 43, -42, 1, 3, -1, 47, -45, 7, -6, 1, 3, -2, 1, 53, -51, 5, -3, 2, 59, -57, 61, -59, 3, -2, 1, 5, -3, 67
Offset: 1

Views

Author

N. J. A. Sloane, Nov 03 2020

Keywords

Crossrefs

Cf. A280985.

A338360 Indices of records in A280985.

Original entry on oeis.org

1, 2, 3, 5, 7, 9, 14, 16, 21, 23, 28, 35, 37, 43, 47, 49, 54, 62, 67, 69, 76, 81, 83, 90, 95, 100, 109, 113, 115, 120, 122, 128, 142, 147, 152, 155, 166, 168, 174, 180, 185, 192, 199, 201, 212, 214, 219, 221, 234, 245, 247, 250, 257, 262, 264, 277, 284, 290, 295, 297, 304, 308, 310, 325
Offset: 1

Views

Author

N. J. A. Sloane, Nov 03 2020

Keywords

Comments

The records themselves are essentially twice the primes (A001747).

Crossrefs

A338365 a(n) = (index of prime(n) in A280985) - prime(n).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Nov 04 2020

Keywords

Comments

Gives amount by which primes are delayed in A280985. For comparison, the amount by which primes are delayed in A283312 is given by A107347. There is a simple formula for the latter sequence, but no such formula is presently known for the current sequence.

Crossrefs

A127202 a(1)=1, a(2)=2; a(n) = the smallest positive integer not occurring earlier in the sequence such that gcd(a(n), a(n-1)) does not equal gcd(a(n-1), a(n-2)).

Original entry on oeis.org

1, 2, 4, 3, 6, 5, 10, 7, 14, 8, 9, 12, 11, 22, 13, 26, 15, 18, 16, 17, 34, 19, 38, 20, 21, 24, 23, 46, 25, 30, 27, 28, 32, 29, 58, 31, 62, 33, 36, 35, 40, 37, 74, 39, 42, 41, 82, 43, 86, 44, 45, 48, 47, 94, 49, 56, 50, 51, 54, 52, 53, 106, 55, 60, 57, 59, 118, 61, 122, 63, 66
Offset: 1

Views

Author

Leroy Quet, Jan 08 2007

Keywords

Comments

This sequence appears to be a permutation of the positive integers. - Leroy Quet, Jan 08 2007
From N. J. A. Sloane, Jan 26 2017: (Start)
Theorem: This is a permutation of the positive integers.
Proof: (Outline. For details see the link.)
1. Sequence is infinite.
2. For all m, either m is in the sequence or there exists an n_0 such that for n >= n_0, a(n) > m.
3. For all primes p, there is a term divisible by p.
4. For all primes p, there are infinitely many multiples of p in the sequence.
5. Every prime appears in the sequence.
6. For any number m, there are infinitely many multiples of m in the sequence.
7. Every number m appears in the sequence.
(End)
Comment from N. J. A. Sloane, Feb 28 2017: (Start)
There are several short cycles and at least one apparently infinite orbit:
[1], [2], [3, 4], [5, 6], [7, 10, 8],
[9, 14, 22, 19, 16, 26, 24, 20, 17, 15, 13, 11],
[21, 34, 29, 25],
and the first apparently infinite orbit is, in the forward direction,
[23, 38, 33, 32, 28, 46, 41, 40, 35, 58, 51, 45, 42, 37, 62, 106, ...] (see A282712), and in the reverse direction
[23, 27, 31, 36, 39, 44, 50, 57, 65, 73, 82, 47, 53, 61, 68, 77, ...] (see A282713). (End)
Conjecture: The two lines in the graph are (apart from small local deviations) defined by the same equations as the two lines in the graph of A283312. - N. J. A. Sloane, Mar 12 2017

Examples

			gcd(a(7), a(8)) = gcd(10,7) = 1. So a(9) is the smallest positive integer which does not occur earlier in the sequence and which is such that gcd(a(9), 7) is not 1. So a(9) = 14, since gcd(14,7) = 7.
		

Crossrefs

Agrees with A280985 for first 719 terms.
For fixed points see A281353. See also A282712, A282713.

Programs

  • Mathematica
    f[l_List] := Block[{k = 1, c = GCD[l[[ -1]], l[[ -2]]]},While[MemberQ[l, k] || GCD[k, l[[ -1]]] == c, k++ ];Append[l, k]];Nest[f, {1, 2}, 69] (* Ray Chandler, Jan 16 2007 *)
  • PARI
    \\ based on Rémy Sigrist's program for A280985
    { seen = 0; p = 1; g = 2;
            for (n=1, 10000,
                    a = 1;
    while (bittest(seen, a) || (n>2 && gcd(p,a)==g), a++; );
                    print (n " " a);
                    g = gcd(p,a);
                    p = a;
                    seen += 2^a;
            )
    }

Extensions

Extended by Ray Chandler, Jan 16 2007

A283312 a(n) = smallest missing positive number, unless a(n-1) was a prime in which case a(n) = 2*a(n-1).

Original entry on oeis.org

1, 2, 4, 3, 6, 5, 10, 7, 14, 8, 9, 11, 22, 12, 13, 26, 15, 16, 17, 34, 18, 19, 38, 20, 21, 23, 46, 24, 25, 27, 28, 29, 58, 30, 31, 62, 32, 33, 35, 36, 37, 74, 39, 40, 41, 82, 42, 43, 86, 44, 45, 47, 94, 48, 49, 50, 51, 52, 53, 106, 54, 55, 56, 57, 59, 118, 60, 61, 122, 63, 64, 65, 66, 67, 134, 68, 69
Offset: 1

Views

Author

N. J. A. Sloane, Mar 08 2017

Keywords

Comments

Comments from N. J. A. Sloane, Nov 02 2020: (Start)
Alternatively, this is the lexicographically earliest infinite sequence of distinct positive numbers such that every prime is followed by its double.
Theorem: This is a permutation of the positive integers.
Proof. Sequence is clearly infinite, so for any k there is a number N_0(k) such that n >= N_0(k) implies a(n) > k.
Suppose m is missing. Consider a(n) for n = N_0(m). Then a(n) must be a prime p (otherwise it would have been m, which is missing), a(n+1) = 2*p, and a(n+2) = m, a contradiction. QED.
(End)
A toy model of A280864, A280985, and A127202.
Alternative definition: a(1,2) = 1,2. Let P(k) = rad(a(1)*a(2)*...*a(k)), then for n > 2, a(n) = P(n)/P(n-1), where rad is A007947. - David James Sycamore, Jan 27 2024

Examples

			The offset is 1. What is a(1)? It is the smallest missing positive number, which is 1. Similarly, a(2)=2.
What is a(3)? Since the previous term was the prime 2, a(3) = 4.
And so on.
		

Crossrefs

See A283313 for smallest missing number, A338362 for inverse, A338361 for indices of primes, A338357 for first differences.
For records see A338356 and A001747.

Programs

  • Maple
    a:=[1];
    H:=Array(1..1000,0); MMM:=1000;
    H[1]:=1; smn:=2; t:=2;
    for n from 2 to 100 do
    if t=smn then a:=[op(a),t]; H[t]:=1;
       if isprime(t) then a:=[op(a),2*t]; H[2*t]:=1; fi;
       t:=t+1;
    # update smallest missing number smn
       for i from smn+1 to MMM do if H[i]=0 then smn:=i; break; fi; od;
    else t:=t+1;
    fi;
    od:
    a;
  • Mathematica
    Module[{nmax = 100, smn = 1}, Nest[Append[#, If[PrimeQ[Last[#]], 2*Last[#], While[MemberQ[#, ++smn]]; smn]]&, {1}, nmax-1]] (* Paolo Xausa, Feb 12 2024 *)

Formula

There is an explicit formula for the n-th term of the inverse permutation: see A338362.
The graph: Numbers appear in the sequence in their natural order, except when interrupted by the appearance of primes. Suppose a(n)=x, where x is neither a prime nor twice a prime. Then if p is a prime in the range x/2 < p < x, 2p appears in the sequence between p and p+1. Therefore we have the identity
n = x + pi(x) - pi(x/2). ... (1)
If a(n) = x = a prime, then (1) is replaced by
n = x + pi(x) - pi(x/2) - 1. ... (2)
If a(n) = x = twice a prime then
n = x/2 + pi(x/2) - pi(x/4). ... (3)
These equations imply that the lower line in the graph of the sequence is
x approx= n(1 - 1/(2*log n)) ... (4)
while the upper line is
x approx= 2n(1 - 1/(2*log n)). ... (5)
a(2*n-1 + A369610(n)) = prime(n). - David James Sycamore, Jan 27 2024

Extensions

Entry revised by N. J. A. Sloane, Nov 03 2020

A127203 a(n) = gcd(A127202(n), A127202(n+1)).

Original entry on oeis.org

1, 2, 1, 3, 1, 5, 1, 7, 2, 1, 3, 1, 11, 1, 13, 1, 3, 2, 1, 17, 1, 19, 2, 1, 3, 1, 23, 1, 5, 3, 1, 4, 1, 29, 1, 31, 1, 3, 1, 5, 1, 37, 1, 3, 1, 41, 1, 43, 2, 1, 3, 1, 47, 1, 7, 2, 1, 3, 2, 1, 53, 1, 5, 3, 1, 59, 1, 61, 1, 3, 2, 1, 5, 1, 67, 2, 1, 3, 1, 71, 1, 73, 1, 3, 2, 1, 7, 1, 79, 2, 1, 3, 1, 83, 1, 5, 2
Offset: 1

Views

Author

Leroy Quet, Jan 08 2007

Keywords

Comments

a(n) never equals a(n+1), by decree.
For the first 719 terms this coincides with the sequence {gcd(A280985(n), A280985(n+1))}. By decree, the latter may not contain two consecutive 1's. - N. J. A. Sloane, Jan 21 2017

Crossrefs

Programs

  • Mathematica
    f[l_List] := Block[{k = 1, c = GCD[l[[ -1]], l[[ -2]]]},While[MemberQ[l, k] || GCD[k, l[[ -1]]] == c, k++ ];Append[l, k]]; GCD @@@ Partition[Nest[f, {1, 2}, 100], 2, 1] (* Ray Chandler, Jan 16 2007 *)

Extensions

Extended by Ray Chandler, Jan 16 2007
Showing 1-10 of 12 results. Next