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

A304741 Inverse permutation to A280866.

Original entry on oeis.org

1, 2, 4, 3, 7, 5, 11, 6, 10, 8, 14, 9, 23, 12, 17, 13, 24, 16, 28, 18, 20, 15, 31, 19, 35, 22, 34, 21, 39, 26, 43, 30, 46, 25, 36, 33, 54, 29, 47, 41, 58, 37, 61, 45, 27, 32, 65, 38, 53, 42, 50, 48, 87, 49, 74, 52, 69, 40, 92, 56, 97, 44, 72, 60, 75, 63, 101, 51, 95, 67, 108, 71, 116, 55, 57, 70, 73, 76, 119
Offset: 1

Views

Author

Antti Karttunen, May 18 2018

Keywords

Crossrefs

Cf. A280866 (inverse).
Differs from similar A280741 for the first time at n=31, where a(31) = 43, while A280741(31) = 49.

Programs

  • PARI
    \\ Use the program given in A280866.

A304743 Restricted growth sequence transform of A046523(A280866(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 18 2018

Keywords

Crossrefs

Programs

  • PARI
    \\ Needs also code from A280866:
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    v304743 = rgs_transform(vector(65539,n,A046523(A280866(n))));
    A304743(n) = v304743[n];

A304742 Restricted growth sequence transform of A246277(A280866(n)).

Original entry on oeis.org

1, 2, 3, 2, 4, 5, 2, 6, 7, 3, 2, 8, 9, 2, 10, 11, 4, 12, 13, 6, 14, 15, 2, 2, 16, 17, 7, 2, 18, 19, 2, 20, 21, 5, 3, 4, 22, 23, 2, 24, 25, 26, 2, 27, 28, 8, 10, 29, 30, 15, 31, 32, 3, 2, 33, 34, 11, 2, 35, 36, 2, 37, 38, 14, 2, 39, 40, 17, 16, 41, 42, 12, 4, 6, 8, 43, 44, 6, 45, 46, 10, 47, 48, 15, 49, 50, 2, 51, 52
Offset: 1

Views

Author

Antti Karttunen, May 18 2018

Keywords

Comments

For all i, j: a(i) = a(j) => A304743(i) = A304743(j).

Crossrefs

Programs

  • PARI
    \\ Needs also code from A280866:
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A246277(n) = { if(1==n, 0, while((n%2), n = A064989(n)); (n/2)); };
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    v304742 = rgs_transform(vector(65539,n,A246277(A280866(n))));
    A304742(n) = v304742[n];

A372063 a(n) = A280864(n) - A280866(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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, -23, 8, 11, 38, -3, -23, 11, -18, 9, 29, 17, -37, 14, -19, 22, -31, 4, 17, -11, -25, -17, 17, -51, 16, -39, 42, -29, 22, 7, 28, 2, 11, -6, -15, 1, -24, 5, 17, -18, 1, 9, -26, 25, 0, 0, 2, 25, -41, 59, -22, -11, -8, 41, 37, -3, 38, -12
Offset: 1

Views

Author

N. J. A. Sloane, May 09 2024

Keywords

Comments

A280864 and A280866 are closely related. There is a proof that A280866 is a permutation of the positive integers, but for A280864 this is only a conjecture. The present sequence compares them term-by-term; A372064 compares their inverses; and A372065 compares where the primes appear.

Crossrefs

A372065 a(n) = (index of prime(n) in A280864) - (index of prime(n) in A280866).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 1, 5, 5, 5, 0, -1, -2, 3, 13, 12, 13, 12, 9, 6, 6, 11, 11, 24, 28, 38, 74, 70, 55, 49, 58, 60, 60, 54, 46, 51, 50, 43, 54, 51, 44, 36, 36, 21, 34, 45, 39, 25, 25, 22, 24, 24, 25, 42, 44, 27, 38, 33, 26, 28, 22, 24, 32, 56, 72, 84, 63, 67, 107, 114, 111, 104, 108, 105, 93, 100, 100, 108, 105, 96, 94, 92
Offset: 1

Views

Author

N. J. A. Sloane, May 10 2024

Keywords

Comments

A372063 compares A280864 and A280866 term-by-term; A372064 compares their inverses; and the present sequence compares where the successive primes appear.
This is a subsequence of A372064.

Examples

			The 11th prime, 31, appears in A280864 at index 49, and in A280866 at index 43, so a(11) = 49 - 43 = 6.
		

Crossrefs

A372697 Index k such that A280866(k) = A019565(n) or 0 if A019565(n) does not appear in A280866.

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 17, 26, 11, 12, 20, 37, 36, 67, 68, 205, 14, 15, 46, 63, 74, 90, 127, 302, 73, 145, 146, 373, 307, 736, 1101, 2126, 23, 22, 47, 76, 75, 121, 122, 364, 78, 176, 177, 510, 343, 842, 1229, 2607, 180, 275, 276, 826, 553, 1387, 1388, 4088, 827, 1878
Offset: 0

Views

Author

Michael De Vlieger, Jul 29 2024

Keywords

Comments

Offset matches A019565.
Conjecture: there are no zeros in this sequence, which is equivalent to the conjecture that A280866 is a permutation of natural numbers.

Examples

			Let s = A019565 and let t = A280866.
a(0) = 1 since s(0) = 1 = t(1).
a(1) = 2 since s(1) = 2 = t(2).
a(2) = 4 since s(2) = 3 = t(4).
a(3) = 5 since s(3) = 5 = t(5).
Table relating this sequence to s and t. The last column shows Y if s(n) is divisible by the prime in the heading, otherwise ".":
   n   s(n)  a(n)   2357
  ----------------------
   0     1     1    .
   1     2     2    Y
   2     3     4    .Y
   3     6     5    YY
   4     5     7    ..Y
   5    10     8    Y.Y
   6    15    17    .YY
   7    30    26    YYY
   8     7    11    ...Y
   9    14    12    Y..Y
  10    21    20    .Y.Y
  11    42    37    YY.Y
  12    35    36    .YYY
  13    70    67    Y.YY
  14   105    68    .YYY
  15   210   205    YYYY
  ...
		

Crossrefs

Programs

  • Mathematica
    nn = 2^14; c[] := False; m[] := 1;
    i = 1; j = m[1] = m[2] = 2; c[1] = c[2] = True;
    f[x_] := f[x] = Times @@ FactorInteger[x][[All, 1]];
    s = Association[
      Monitor[Reap[
         Do[While[c[Set[k, #   m[#]]], m[#]++] &[f[i * j]/f[i]];
          If[SquareFreeQ[k],
            Sow[Total[2^(-1 + PrimePi[FactorInteger[k][[All, 1]]])] -> n] ];
          Set[{c[k], i, j}, {True, j, k}], {n, 3, nn}] ][[-1, 1]], n]];
    TakeWhile[{1, 2}~Join~Array[If[KeyExistsQ[s, #], Lookup[s, #], 0] &, Floor@ Sqrt[nn], 2], # > 0 &]

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

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, 45, 19, 38, 32, 23, 46, 36, 27, 25, 35, 42, 48, 29, 58, 40, 55, 33, 39, 52, 44, 77, 49, 31, 62, 50, 65, 78, 54, 37, 74, 56, 63, 51, 68, 60, 75, 41, 82, 64, 43, 86
Offset: 1

Views

Author

Rémy Sigrist, Jan 09 2017

Keywords

Comments

In other words, each multiple of a prime p has exactly one neighbor that is also a multiple of p.
This sequence is similar to A280866; the first difference occurs at n=42: a(42)=55 whereas A280866(42)=50.
Conjectured to be a permutation of the positive integers.
Sometimes referred to as the "cup of coffee" sequence, since it feels as if just one more cup of coffee is all it would take to prove that this is indeed a permutation of the positive integers. - N. J. A. Sloane, Nov 04 2020
There are several short cycles, and apparently at least two infinite cycles. For a list see the attached file "Properties of A280864". - N. J. A. Sloane, Feb 03 2017
Properties (For proofs, see the attached file "Properties of A280864")
Theorem 1: This sequence contains every prime and every even number. (Added by N. J. A. Sloane, Jan 15 2017)
Theorem 2: The sequence contains infinitely many odd composite numbers. (Added by N. J. A. Sloane, Feb 14 2017)
Theorem 3: If p is an odd prime, the sequence contains infinitely many odd multiples of p. (Added by N. J. A. Sloane, Mar 12 2017, with corrected proof Apr 03 2017)
There are two types of primes in this sequence: Type I, the first time a term a(n) is divisible by p is when a(n)=p for some n; Type II, the first time a term a(n) is divisible by p is when a(n)=k*p for some n and some k>1 (the Type II primes are listed in A280745).
Conjecture 4: If a prime p divides a(n) then p <= n. - N. J. A. Sloane, Apr 07 2017 and Apr 16 2017
Theorem 5: The sequence is a permutation of the natural numbers iff it contains every square. - N. J. A. Sloane, Apr 14 2017
From Bob Selcoe, Apr 03 2017: (Start)
Define the "radical class" C_R to be the set of numbers which have the same radical R (or the same largest squarefree divisor - i.e., the same product of their prime factors). These are the columns in A284311. So for example C_10 is the set of numbers with radical 10 or prime factors {2,5}: {10, 20, 40, 50, 80, 100, 160, ...}.
If the sequence contains any members of C_R, then those members must appear in order; so for example, if 160 has appeared, {10, 20, 40, 50, 80} will have already appeared, in that order. Naturally, this holds for prime powers; for example, C_5: if 3125 has appeared, {5, 25, 125, 625} will have appeared earlier, in that order.
After seeing a(n), let S be smallest missing number (A280740) and let prime(G) be largest prime already appearing in the sequence. Conjecture: Prime(G) < S <= prime(G+1), and a(35) = 25 = S is the only nonprime S term (following a(31) = 23, preceding a(39) = 29). (End)

Examples

			The first terms, alongside their required and forbidden prime factors are:
n   a(n)  Required  Forbidden
--  ----  --------  ---------
1      1  none      none
2      2  none      none
3      4  2         none
4      3  none      2
5      6  3         none
6      8  2         3
7      5  none      2
8     10  5         none
9     12  2         5
10     9  3         2
11     7  none      3
12    14  7         none
13    16  2         7
14    11  none      2
15    22  11        none
16    18  2         11
17    15  3         2
18    20  5         3
19    24  2         5
20    21  3         2
21    28  7         3
22    26  2         7
23    13  13        2
24    17  none      13
25    34  17        none
26    30  2         17
27    45  3, 5      2
28    19  none      3, 5
29    38  19        none
30    32  2         19
31    23  none      2
32    46  23        none
33    36  2         23
34    27  3         2
35    25  none      3
36    35  5         none
37    42  7         5
38    48  2, 3      7
39    29  none      2, 3
40    58  29        none
41    40  2         29
42    55  5         2
		

Crossrefs

A280754 gives fixed points.
Cf. A280866.
In the same spirit as A064413 and A098550.
A338338, A338444, and A375029 are variants.
A373797 is a finite version.

Programs

  • Maple
    N:= 1000: # to get all terms until the first term > N
    A[1]:= 1:
    A[2]:= 2:
    G:= {}:
    Avail:= [$3..N]:
    found:= true:
    lastn:= 2:
    for n from 3 while found and nops(Avail)>0 do
      found:= false;
      H:= G;
      G:= numtheory:-factorset(A[n-1]);
      r:= convert(G minus H,`*`);
      s:= convert(G intersect H, `*`);
      for j from 1 to nops(Avail) do
        if Avail[j] mod r = 0 and igcd(Avail[j],s) = 1 then
          found:= true;
          A[n]:= Avail[j];
          Avail:= subsop(j=NULL,Avail);
          lastn:= n;
          break
        fi
      od;
    od:
    seq(A[i],i=1..lastn); # Robert Israel, Mar 22 2017
  • Mathematica
    terms = 100;
    rad[n_] := Times @@ FactorInteger[n][[All, 1]];
    A280864 = Reap[present = 0; p = 1; pp = 1; Do[forbidden = GCD[p, pp]; mandatory = p/forbidden; a = mandatory; While[BitGet[present, a] > 0 || GCD[forbidden, a] > 1, a += mandatory]; Sow[a]; present += 2^a; pp = p; p = rad[a], terms]][[2, 1]] (* Jean-François Alcover, Nov 23 2017, translated from Rémy Sigrist's PARI program *)

Extensions

Added "infinite" to definition. - N. J. A. Sloane, Sep 28 2019

A362855 a(n) = n for n <= 3; for n > 3, a(n) is the least novel multiple of k, the product of all distinct prime factors of a(n-2) that do not divide a(n-1).

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 12, 10, 9, 20, 15, 8, 30, 7, 60, 14, 45, 28, 75, 42, 25, 84, 35, 18, 70, 21, 40, 63, 50, 105, 16, 210, 11, 420, 22, 315, 44, 525, 66, 140, 33, 280, 99, 350, 132, 175, 198, 245, 264, 385, 24, 770, 27, 1540, 36, 1155, 26, 2310, 13, 4620, 39, 3080, 78, 1925, 156, 2695, 234, 3465, 52, 5775
Offset: 1

Views

Author

Keywords

Comments

Motivated by A362631, but instead of using one prime divisor of a(n-2) which does not divide a(n-1), the product of all such primes is used to compute a(n). - David James Sycamore, May 07 2023
From Michael De Vlieger, May 27 2023: (Start)
Primes p(k) enter the sequence in order and fairly regularly through a(20543) = p(15) = 47, immediately following primorial A002110(k-1). However, a(87723) = p(17) = 59 is the next prime to appear, following a(87722) = A002110(16).
Conjecture: all primes appear eventually, but not in order. (End)
Similar to A280866, except that the denominator here is rad(a(n-1)) instead of rad(a(n-2)). Also related to A369825. - David James Sycamore, Jan 27 2024
From Michael De Vlieger, Apr 23 2024: (Start)
Conjecture: permutation of natural numbers.
Conjecture: the smallest missing number is always either prime or a powerful number.
Primes do not appear in order; a(87723) = 59 but a(91307) = 53.
Powerful numbers appear in clusters, e.g., for n roughly between 91200 and 91320.
Though it appears primorials are always followed by primes, it is logically possible but rare that primorials can be followed by a composite number. (End)

Examples

			From _Michael De Vlieger_, Apr 23 2024: (Start)
Let rad(x) = A007947(x) and let P(x) = A002110(x).
Let S = { prime p : p | a(n-2) } and let T = { prime p : p | a(n-1) }. Then k = Product_{p in S\T} p = rad(a(n-2)*a(n-1))/rad(a(n-1)).
a(3) = 3 since rad(1*2)/rad(2) = 1; a(1) = 1, a(2) = 2, therefore a(3) = 3*1.
a(4) = 4 since rad(2*3)/rad(3) = 2; a(2) = 2, thus a(4) = 2*2.
a(5) = 6 since rad(3*4)/rad(4) = 6/2 = 3; a(3) = 3, thus a(5) = 2*3.
a(91305) = 108 and a(91306) = P(17), therefore k = 1 since rad(108) | P(17). The smallest missing number is 53, therefore a(91307) = 53*1. Related sequence A368133 = b is such that it is coincident with this sequence until b(91307) = 61, since prime(18) = 61 is the smallest prime that does not divide b(91306) = P(17). (End)
		

Crossrefs

Programs

  • Mathematica
    nn = 100; c[] := False; m[] := 1;
    f[x_] := f[x] = Times @@ FactorInteger[x][[All, 1]];
    Array[Set[{a[#], c[#], m[#]}, {#, True, 2}] &, 2]; i = 1; j = r = 2;
    Do[(While[c[Set[k, # m[#]]], m[#]++]) &[r/f[j]];
      Set[{a[n], c[k], i, j, r}, {k, True, j, k, f[j*k]}], {n, 3, nn}];
    Array[a, nn] (* Michael De Vlieger, Feb 21 2024 *)

Formula

A007947(a(n) * a(n+1)) | A007947(a(n+1) * a(n+2)). - Peter Munn, Apr 18 2024

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

Showing 1-10 of 11 results. Next