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 41-50 of 54 results. Next

A358267 a(1) = 1, a(2) = 2. Thereafter:(i). If no prime divisor of a(n-1) divides a(n-2), a(n) is the least novel multiple of the squarefree kernel of a(n-1). (ii). If some (but not all) prime divisors of a(n-1) do not divide a(n-2), a(n) is the least of the least novel multiples of all such primes. (iii). If every prime divisor of a(n-1) also divides a(n-2), a(n) = u, the least unused number.

Original entry on oeis.org

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

Views

Author

David James Sycamore, Nov 06 2022

Keywords

Comments

Let a(n-2) = i, a(n-1) = j. The sequence is generated from divisor relationships j->i, ranging from coprime: gcd(i,j) =1, to partial: 1 < gcd(i,j) < j, to total: gcd(i,j) = j, using conditions described in the definition.
The first 26 terms are the same as those of A280864 and A280866.
A prime cannot occur consequent to condition (i). a(n) = prime p either because p|a(n-1) but not a(n-2); see (ii), or because every prime divisor of a(n-1) also divides a(n-2), as when for example a(n-1) is a prime power q^k and q|a(n-2), which forces a(n) = u prime, see (iii).
If a(n) = u = p from condition (iii), a(n+1) = 2*p. If p|a(n-1)-> a(n) = p we see m*p->p->u (and u may of course be prime, as in ...,13,17,...). 13 is the first prime to appear consequent to condition (ii), see Example. Consecutive primes appear often: (13,17); (53,59); (61,67); ... Sequence is conjectured to be a permutation of the positive integers with primes appearing slowest, and in natural order.
Local minima consist of 1 and the primes p, while 4p dominates the maxima as n increases. - Michael De Vlieger, Nov 06 2022

Examples

			a(1) = 1, a(2) = 2 and since 2|a(2) but not a(1), and no other primes are involved, a(3) = 4, the least novel multiple of 2, the squarefree kernel of 2 (by (i)).
Every prime divisor of a(3) = 4 also divides a(2) = 2, thus a(4) = 3, the least unused number (by (iii)).
a(23) = 13 because 13|a(22) = 26, but does not divide a(21) = 28 (by (ii)). Then since every prime divisor of a(23) also divides a(22), a(24) = 17, the least unused term (by (iii)). This is the first occasion of consecutive primes.
a(25) = 34, a(26) = 30 and there are two primes (3,5) which divide 30 but not 34. At this point the least novel multiples of 3 and 5 are 27 and 25 respectively, so a(27) = 25 (by (ii)). This is the first departure from A280864/A280866, which both have a(27) = 45.
		

Crossrefs

Programs

  • Mathematica
    Block[{a, c, f, g, k, m, q, u, nn}, nn = 120; c[] = False; q[] = 1; Array[Set[{a[#], c[#]}, {#, True}] &, 3]; q[2] = 2; u = 3; Do[m = FactorInteger[a[n - 1]][[All, 1]]; f = Select[m, CoprimeQ[#, a[n - 2]] &]; If[AllTrue[m, Mod[a[n - 2], #] == 0 &], k = u, Set[{k, q[#1]}, {#2, #2/#1}] & @@ First@ MinimalBy[Map[{#, Set[g, q[#]]; While[c[g #], g++]; # g} &, f], Last] ]; Set[{a[n], c[k]}, {k, True}]; If[k == u, While[c[u], u++]], {n, 3, nn}]; Array[a, nn] ] (* Michael De Vlieger, Nov 06 2022 *)

Extensions

More terms from Michael De Vlieger, Nov 06 2022

A372064 a(n) = A280741(n) - A304741(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, -3, 0, 0, 0, 1, 0, -3, 0, 5, 0, 5, 1, 0, 0, 5, 0, -5, 9, 9, -3, 0, 5, -32, 5, 5, 0, -1, 5, -2, 6, -14, 5, -23, 5, 3, 9, -18, 5, 13, 5, 12, 1, 5, 5, -26, -23, 13, -1, -2, 5, 12, 5, -1, 5, 4, -4, 9, 6, 5, -16, 13, 5, 17, 7, 6, -2, 5, 9
Offset: 1

Views

Author

N. J. A. Sloane, May 09 2024

Keywords

Comments

A372063 compares A280864 and A280866 term-by-term; the present sequence compares their inverses; and A372065 compares where the primes appear.

Crossrefs

A375029 Lexicographically least increasing sequence such that for any prime number p, any run of consecutive multiples of p has length exactly 2.

Original entry on oeis.org

1, 2, 4, 5, 10, 12, 15, 20, 22, 33, 36, 38, 57, 60, 70, 77, 88, 90, 105, 112, 114, 171, 172, 258, 261, 290, 300, 303, 404, 406, 609, 612, 646, 665, 700, 702, 741, 760, 770, 847, 848, 954, 957, 1276, 1278, 1491, 1498, 1712, 1713, 3426, 3428, 4285, 4290, 5148
Offset: 1

Views

Author

Rémy Sigrist, Jul 28 2024

Keywords

Comments

This sequence is a variant of A280864.

Examples

			The first terms, alongside their prime factors, are:
  n   a(n)  Prime factors
  --  ----  --------------------
   1     1
   2     2   2
   3     4   2
   4     5       5
   5    10   2   5
   6    12   2 3
   7    15     3 5
   8    20   2   5
   9    22   2       11
  10    33     3     11
  11    36   2 3
  12    38   2                19
  13    57     3              19
  14    60   2 3 5
  15    70   2   5 7
  16    77         7 11
  17    88   2       11
		

Crossrefs

Cf. A280864.

Programs

  • PARI
    { p = 0; r = 1; m = 1; for (n = 1, 54, forstep (v = ceil((p+1)/m)*m, oo, m, if (gcd(v, r)==m, print1 (v", "); r = vecprod(factor(p = v)[,1]~); m = r / m; break;););); }

A375030 Irregular triangle T(n, k), n > 0, k = 1..A373797(n), read by rows; the n-th row corresponds to the lexicographically earliest sequence S of A373797(n) distinct integers in the range 1..n such that for any prime number p, any run of consecutive multiples of p in S has length exactly 2.

Original entry on oeis.org

1, 1, 1, 1, 2, 4, 1, 2, 4, 1, 2, 6, 3, 1, 2, 6, 3, 1, 2, 4, 3, 6, 8, 1, 2, 4, 3, 6, 8, 1, 2, 4, 3, 9, 5, 10, 8, 1, 2, 4, 3, 9, 5, 10, 8, 1, 2, 4, 3, 6, 8, 5, 10, 12, 9, 1, 2, 4, 3, 6, 8, 5, 10, 12, 9, 1, 2, 4, 3, 6, 10, 5, 7, 14, 12, 9, 1, 2, 4, 3, 6, 8, 5, 15, 12, 14, 7
Offset: 1

Views

Author

Rémy Sigrist at the suggestion of Peter Luschny, Jul 28 2024

Keywords

Examples

			Triangle T(n, k) begins:
    1;
    1;
    1;
    1, 2, 4;
    1, 2, 4;
    1, 2, 6, 3;
    1, 2, 6, 3;
    1, 2, 4, 3, 6, 8;
    1, 2, 4, 3, 6, 8;
    1, 2, 4, 3, 9, 5, 10, 8;
    1, 2, 4, 3, 9, 5, 10, 8;
    1, 2, 4, 3, 6, 8, 5, 10, 12, 9;
    1, 2, 4, 3, 6, 8, 5, 10, 12, 9;
    1, 2, 4, 3, 6, 10, 5, 7, 14, 12, 9;
    1, 2, 4, 3, 6, 8, 5, 15, 12, 14, 7;
    1, 2, 4, 3, 6, 8, 5, 10, 12, 9, 7, 14, 16;
    1, 2, 4, 3, 6, 8, 5, 10, 12, 9, 7, 14, 16;
    1, 2, 4, 3, 6, 8, 5, 15, 9, 16, 14, 7, 12, 18;
    1, 2, 4, 3, 6, 8, 5, 15, 9, 16, 14, 7, 12, 18;
    ...
		

Crossrefs

Programs

  • Maple
    # See Links section.
  • PARI
    \\ See Links section.

A375024 a(n) is the length of the largest sequence S of distinct integers in the range 1..n such that for any prime number p, any run of consecutive multiples of p in S has length exactly 2, and two consecutive terms in S have some common prime factor.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 13, 13, 16, 16, 16, 16, 19, 19, 19, 19, 19, 19
Offset: 1

Views

Author

Rémy Sigrist, Jul 28 2024

Keywords

Comments

Sequences like A280864 can be split into segments of consecutive terms with properties similar to the sequences S that we are considering here.

Examples

			Some solutions for small n:
  n   a(n)  Solution S
  --  ----  --------------------------------------------------------------
   1     1  1
   4     2  2,4
   6     3  2,6,3
  10     4  3,6,10,5
  15     7  3,6,10,15,12,14,7
  21    10  3,6,10,15,12,14,21,18,20,5
  33    13  3,6,10,15,12,14,21,18,22,33,24,20,5
  35    16  3,6,10,15,12,14,21,18,20,35,28,22,33,24,26,13
  39    19  3,6,10,15,12,14,21,18,20,35,28,22,33,24,26,39,36,34,17
  45    22  5,10,6,15,20,12,21,14,18,33,22,24,39,26,36,45,40,28,35,30,42,7
		

Crossrefs

Formula

a(n) <= A373797(n).
a(p) = a(p-1) for any prime number p.

A282061 Lexicographically earliest sequence of distinct terms such that, for any prime p, any run of consecutive multiples of p has length exactly 2, and the terms in such a run have the same p-adic valuation.

Original entry on oeis.org

1, 2, 6, 3, 4, 12, 15, 5, 7, 14, 10, 35, 21, 24, 8, 9, 18, 22, 11, 13, 26, 30, 105, 28, 20, 45, 36, 44, 33, 39, 52, 60, 165, 77, 42, 66, 55, 40, 56, 63, 72, 88, 99, 90, 70, 91, 65, 80, 16, 17, 34, 38, 19, 23, 46, 50, 25, 27, 54, 58, 29, 31, 62, 74, 37, 32, 96
Offset: 1

Views

Author

Rémy Sigrist, Feb 05 2017

Keywords

Comments

This sequence is similar to A280864, with an additional constraint on the p-adic valuation of consecutive multiples of any prime p. However, the graphs of those two sequences are quite different.

Examples

			See Links section.
		

Crossrefs

Cf. A280864.

A285190 Records in A283832.

Original entry on oeis.org

1, 2, 3, 4, 10, 17, 20, 44, 52, 54, 78, 100, 102, 113, 135, 139, 140, 162, 180, 195, 259, 270, 288, 334, 336
Offset: 1

Views

Author

N. J. A. Sloane, Apr 25 2017

Keywords

Crossrefs

A285191 Where records occur in A283832.

Original entry on oeis.org

1, 2, 3, 4, 6, 16, 29, 32, 73, 185, 208, 248, 394, 521, 1349, 1431, 1564, 1901, 2149, 2462, 2613, 8288, 9987, 10858, 24526, 27276, 40736, 53726, 104154, 134561, 160874, 173744
Offset: 1

Views

Author

N. J. A. Sloane, Apr 25 2017

Keywords

Crossrefs

Extensions

a(26)-a(32) from Lars Blomberg, Jun 06 2017

A338350 Lexicographically earliest infinite sequence of distinct odd terms such that, for any prime p, any run of consecutive multiples of p has length exactly 2.

Original entry on oeis.org

1, 3, 9, 5, 15, 21, 7, 11, 33, 27, 13, 39, 45, 25, 17, 51, 57, 19, 23, 69, 63, 35, 55, 77, 49, 29, 87, 75, 65, 91, 105, 135, 31, 93, 81, 37, 111, 99, 121, 41, 123, 117, 143, 165, 195, 169, 43, 129, 141, 47, 53, 159, 147, 119, 85, 95, 133, 161, 115, 125, 59
Offset: 1

Views

Author

N. J. A. Sloane, Oct 29 2020

Keywords

Comments

A version of A280864 but only using odd numbers.

Crossrefs

Programs

  • PARI
    See Links section.

Extensions

More terms from Rémy Sigrist, Oct 30 2020

A339316 a(1) = 2; for n > 1, a(n) = smallest composite number not occurring earlier which does not share a factor with a(n-1).

Original entry on oeis.org

2, 9, 4, 15, 8, 21, 10, 27, 14, 25, 6, 35, 12, 49, 16, 33, 20, 39, 22, 45, 26, 51, 28, 55, 18, 65, 24, 77, 30, 91, 32, 57, 34, 63, 38, 69, 40, 81, 44, 75, 46, 85, 36, 95, 42, 115, 48, 119, 50, 87, 52, 93, 56, 99, 58, 105, 62, 111, 64, 117, 68, 121, 54, 125, 66, 133, 60, 143, 70, 123, 74, 129
Offset: 1

Views

Author

Scott R. Shannon, Nov 30 2020

Keywords

Comments

The sequence excludes primes as otherwise the terms would simply be all the ordered integers >= 2. The terms appear to cluster around two lines; the lower line is a(n) ~ n while the upper lines starts with a gradient of approximately 2 and then slowly flattens. It is possible this gradient approaches 1 as n->infinity.

Examples

			a(2) = 9, as a(1) = 2 thus a(2) cannot contain 2 as a factor and cannot be a prime. The lowest unused composite matching these criteria is 9.
a(3) = 4, as a(2) = 9 and thus a(3) cannot contain 3 as a factor and cannot be a prime. The lowest unused composite matching these criteria is 4.
a(4) = 15, as a(3) = 4 and thus a(4) cannot contain 2 as a factor and cannot be a prime. The lowest unused composite matching these criteria is 15.
		

Crossrefs

Programs

  • PARI
    isok(k, fprec, v) = {if (!isprime(k) && #select(x->(x==k), v) == 0, #setintersect(Set(factor(k)[,1]), fprec) == 0;);}
    lista(nn) = {my(va= vector(nn)); va[1] = 2; for (n=2, nn, my(k=2, fprec = Set(factor(va[n-1])[,1])); while (! isok(k, fprec, va), k++); va[n] = k;); va;} \\ Michel Marcus, Nov 30 2020
    
  • Python
    from sympy import isprime, primefactors as pf
    def aupton(terms):
      alst, aset = [2], {2}
      for n in range(2, terms+1):
        m, prevpf = 4, set(pf(alst[-1]))
        while m in aset or isprime(m) or set(pf(m)) & prevpf != set(): m += 1
        alst.append(m); aset.add(m)
      return alst
    print(aupton(72)) # Michael S. Branicky, Feb 09 2021
Previous Showing 41-50 of 54 results. Next