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

A349405 a(n) = A347113(A347313(n))+1.

Original entry on oeis.org

95, 6, 15, 39, 14, 22, 119, 87, 57, 46, 123, 215, 159, 94, 93, 219, 74, 118, 122, 303, 142, 134, 327, 166, 695, 178, 395, 206, 214, 226, 447, 959, 262, 254, 543, 291, 302, 326, 334, 699, 346, 358, 382, 386, 394, 843, 1727, 879, 446, 454, 478, 482, 502, 8159, 514
Offset: 1

Views

Author

Michael De Vlieger, Nov 16 2021

Keywords

Comments

These numbers generate primes in A347113.
Let s = A347113, j = s(i)+1, and k = s(i+1). For prime k, j is a squarefree semiprime pq, p < q.
The first 3 primes in s have k = p, while all others observed for i <= 2^19 have k = q.

Examples

			a(1) = s(6)+1 = 95 -> s(7) = 5,
a(2) = s(7)+1 = 6 -> s(8) = 2,
a(3) = s(10)+1 = 15, -> s(11) = 3,
a(4) = s(18)+1 = 39, -> s(19) = 13, etc.
		

Crossrefs

Programs

A347113 a(1)=1; for n > 1, a(n) is the smallest unused positive number k such that k != j and gcd(k,j) != 1, where j = a(n-1) + 1.

Original entry on oeis.org

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

Views

Author

Grant Olson, Aug 18 2021

Keywords

Comments

Alternative definition: Lexicographically earliest sequence of distinct positive numbers such that a(n) != a(n-1)+1 and gcd(a(n-1)+1,a(n)) > 1. This makes it a cousin of the EKG sequence A064413, the Yellowstone permutation A098550, the Enots Wolley sequence A336957, and others. - N. J. A. Sloane, Sep 01 2021; revised Nov 08 2021.
The successive gcd's are listed in A347309.

Examples

			a(1) = 1, by definition.
a(2) = 4; it cannot be 2, because 2 = a(1) + 1, and it cannot be 3, because gcd(a(1) + 1, 3) = 1.
a(3) = 10, because gcd(a(3), a(2) + 1) cannot equal 1. a(2) + 1 = 5, so a(3) must be a multiple of 5. It cannot be equal to 5, so it must be 10, the next available multiple of 5.
a(4) = 22, because 22 is the smallest positive integer not equal to 11 and not coprime to 11.
		

Crossrefs

See A347306 for the inverse, A347307, A347308 for the records, A347309 for the gcd values, A347312 for the parity of a(n), A347314 for the fixed points, and A348780 for partial sums.
For the main diagonal see (A348787(k), A348788(k)).

Programs

  • Maple
    b:= proc() true end:
    a:= proc(n) option remember; local j, k; j:= a(n-1)+1;
          for k from 2 do if b(k) and k<>j and igcd(k, j)>1
            then b(k):= false; return k fi od
        end: a(1):= 1:
    seq(a(n), n=1..100);  # Alois P. Heinz, Sep 02 2021
  • Mathematica
    Block[{a = {1}, c, k, m = 2}, Do[If[IntegerQ@Log2[i], While[IntegerQ[c[m]], m++]]; Set[k, m]; While[Or[IntegerQ[c[k]], k == # + 1, GCD[k, # + 1] == 1], k++] &[a[[-1]]]; AppendTo[a, k]; Set[c[k], i], {i, 65}]; a] (* Michael De Vlieger, Aug 18 2021 *)
  • PARI
    find(va, x) = {my(k=1, s=Set(va)); while ((k==x) || (gcd(k, x) == 1) || setsearch(s, k), k++); k;}
    lista(nn) = {my(va = vector(nn)); va[1] = 1; for (n=2, nn, va[n] = find(va, va[n-1]+1);); va;} \\ Michel Marcus, Aug 21 2021
    
  • Python
    from math import gcd
    A347113_list, nset, m = [1], {1}, 2
    for _ in range(100):
        j = A347113_list[-1]+1
        k = m
        while k == j or gcd(k,j) == 1 or k in nset:
            k += 1
        A347113_list.append(k)
        nset.add(k)
        while m in nset:
            m += 1 # Chai Wah Wu, Sep 01 2021

Extensions

Comments edited (including deletion of incorrect comments) by N. J. A. Sloane, Sep 05 2021
For the moment I am withdrawing my claim that this is a permutation of the positive integers. - N. J. A. Sloane, Sep 05 2022

A348777 a(n) = term in A347113 that precedes the n-th prime. Set a(n) = -1 if prime(n) does not appear in A347113.

Original entry on oeis.org

5, 14, 94, 13, 21, 38, 118, 56, 45, 86, 92, 73, 122, 214, 93, 158, 117, 121, 133, 141, 218, 394, 165, 177, 290, 302, 205, 213, 326, 225, 253, 261, 958, 694, 446, 301, 1726, 325, 333, 345, 357, 542, 381, 385, 393, 8158, 421, 445, 453, 686, 698, 477, 481, 501, 513, 525, 537, 1354, 553, 842
Offset: 1

Views

Author

N. J. A. Sloane, Nov 08 2021

Keywords

Examples

			A347113(11) = 3 is preceded by A347113(10) = 14, and 3 is the 2nd prime, so a(2) = 14. Also (14+1)/3 = 5 = A348778(2).
		

Crossrefs

A349406 a(n) = A349405(n)/A348779(n).

Original entry on oeis.org

19, 3, 5, 3, 2, 2, 7, 3, 3, 2, 3, 5, 3, 2, 3, 3, 2, 2, 2, 3, 2, 2, 3, 2, 5, 2, 5, 2, 2, 2, 3, 7, 2, 2, 3, 3, 2, 2, 2, 3, 2, 2, 2, 2, 2, 3, 11, 3, 2, 2, 2, 2, 2, 41, 2, 2, 3, 2, 2, 2, 3, 3, 2, 3, 2, 2, 2, 5, 3, 5, 3, 3, 5, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 3, 2, 2
Offset: 1

Views

Author

Michael De Vlieger, Nov 16 2021

Keywords

Comments

Ratio of progenitor and prime in A347113.
Let s = A347113, j = s(i)+1, and k = s(i+1). For prime k, j is a squarefree semiprime pq, p < q.
The first 3 primes in s have k = p, while all others observed for i <= 2^19 have k = q. This sequence thus lists the other prime factor r of j such that r*k = j.
The quasi-linear striations k < n are arranged according to this sequence (see color-coded log-log scatterplot). - Michael De Vlieger, Nov 17 2021

Examples

			s(6)+1 = 95 -> s(7) = 5; a(1) = 95/5 = 19.
s(7)+1 = 6 -> s(8) = 2; a(2) = 6/2 = 3.
s(10)+1 = 15, -> s(11) = 3; a(3) = 15/3 = 5.
s(18)+1 = 39, -> s(19) = 13; a(4) = 39/13 = 3, etc.
		

Crossrefs

Programs

A349412 Positions of prime j = A347113(i)+1.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 9, 13, 17, 21, 25, 31, 34, 35, 39, 40, 41, 45, 56, 60, 61, 66, 70, 75, 79, 88, 89, 90, 91, 92, 93, 102, 105, 108, 113, 121, 122, 126, 127, 133, 140, 143, 149, 156, 160, 167, 180, 185, 186, 191, 192, 199, 203, 208, 211, 231, 235, 240, 241, 245
Offset: 1

Views

Author

Michael De Vlieger, Nov 16 2021

Keywords

Comments

Let s = A347113, j = s(i)+1 and k = s(i+1). We recall the 3 constraints presented in A347113:
1. j = k is forbidden.
2. gcd(j,k) = 1 is forbidden.
3. All terms in s are distinct.
These constraints confine prime j to the relationship j | k, which in the context of s, implies j < k and increase. The least k > j such that j | k is 2j, giving rise to Cunningham chains of the first kind. The chains are evident in this sequence as series of consecutive positions in s.

Examples

			s(1) = 1, thus j = s(1)+1 = 2, which is prime, therefore a(1) = 1.
s(2) = 4; j = 5, thus a(2) = 2, etc.
		

Crossrefs

Programs

Showing 1-5 of 5 results.