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 81-90 of 127 results. Next

A338222 The index of prime(n) in A337182.

Original entry on oeis.org

2, 13, 36, 76, 188, 269, 450, 555, 815, 1272, 1456, 2043, 2504, 2767, 3303, 4210, 5196, 5567, 6716, 7530, 7972, 9340, 10315, 11855, 14112, 15296, 15927, 17209, 17866, 19235, 24331, 25888, 28357, 29197, 33630, 34547, 37337, 40282, 42316, 45467, 48720, 49830, 55564, 56726, 59151, 60403, 67908
Offset: 1

Views

Author

Scott R. Shannon, Jan 30 2021

Keywords

Examples

			a(2) = 13 as A337182(13) = 3 = prime(2).
a(3) = 36 as A337182(36) = 5 = prime(3).
		

Crossrefs

A338351 Lexicographically earliest infinite sequence {a(n)} of distinct odd positive numbers such that, for n>2, a(n) has a common factor with a(n-1) but not with a(n-2).

Original entry on oeis.org

1, 3, 15, 35, 77, 33, 39, 65, 55, 99, 21, 91, 143, 165, 51, 119, 133, 57, 45, 85, 187, 209, 95, 75, 63, 161, 115, 135, 87, 203, 175, 155, 93, 69, 253, 275, 105, 111, 407, 319, 145, 185, 259, 147, 117, 221, 323, 171, 123, 205, 215, 129, 141, 235, 245, 189, 153, 391, 299, 195, 159, 371
Offset: 1

Views

Author

N. J. A. Sloane, Oct 30 2020

Keywords

Comments

A version of A336957 defined just on the odd numbers.
Let Ker(k), the kernel of k, denote the set of primes dividing k. Thus Ker(36) = {2,3}, Ker(1) = {}. Then Product_{p in Ker(k)} p = A000265(k), which is denoted by ker(k).
Theorem 1: For n>2, a(n) is the smallest odd number m not yet in the sequence such that
(i) Ker(m) intersect Ker(a(n-1)) is nonempty,
(ii) Ker(m) intersect Ker(a(n-2)) is empty, and
(iii) The set Ker(m) \ Ker(a(n-1)) is nonempty.

Crossrefs

Programs

  • Maple
    with(numtheory);
    N:= 10^3: # to get a(1) to a(n) where a(n+1) is the first term > N
    B:= Vector(N, datatype=integer[1]):
    A[1]:=1; A[2]:=3;
    for n from 3 do
      for k from 5 to N by 2 do
        if B[k] = 0 and igcd(k, A[n-1]) > 1 and igcd(k, A[n-2]) = 1 then
              if nops(factorset(k) minus factorset(A[n-1])) > 0 then
           A[n]:= k;
           B[k]:= 1;
           break;
              fi;
        fi;
      od:
      if k > N then break; fi;
    od:
    s1:=[seq(A[i], i=1..n-1)];
  • PARI
    a338351(upto)={my(v=[1,3]);for(n=1,upto,forstep(k=5,oo,2,if(!vecsearch(vecsort(v),k),if(gcd(k,v[#v])>1&&gcd(k,v[#v-1])==1,if(#setminus(Set(factor(k)[,1]),Set(factor(v[#v])[,1]))>0,v=concat(v,[k]);break)))));v};
    a338351(60) \\ Hugo Pfoertner, Oct 30 2020

A339133 a(n) = A339107(n)*A339107(n+1)/(A339107(n)+A339107(n+1)).

Original entry on oeis.org

2, 4, 8, 6, 7, 24, 14, 12, 20, 21, 10, 6, 8, 24, 15, 16, 30, 12, 14, 48, 12, 10, 28, 60, 56, 45, 8, 6, 12, 20, 30, 54, 60, 36, 18, 24, 120, 108, 80, 90, 96, 60, 24, 28, 96, 72, 42, 54, 126, 108, 140, 126, 110, 84, 33, 28, 66, 21, 18, 66, 90, 66, 85, 132, 51, 52, 204, 51, 36, 78, 72, 40, 52, 60, 26
Offset: 1

Views

Author

Scott R. Shannon, Nov 24 2020

Keywords

Comments

This is the ratio of the multiplication and addition of successive terms in A339107. See that sequence for further details.

Examples

			a(1) = 2 as A339107(1) = 3 and A339107(2) = 6, and 3*6/(3+6) = 2.
		

Crossrefs

A339557 a(0) = 0, a(1) = 1; for n > 1, a(n) = a(n-1) - n if a(n) is nonnegative, not already in the sequence, and gcd(a(n-1),n) > 1 or gcd(a(n-2),n) = 1. Otherwise a(n) = a(n-1) + n.

Original entry on oeis.org

0, 1, 3, 6, 2, 7, 13, 20, 12, 21, 31, 42, 30, 17, 31, 16, 32, 15, 33, 14, 34, 55, 77, 54, 78, 53, 79, 52, 24, 53, 83, 114, 82, 115, 149, 184, 148, 111, 149, 188, 228, 187, 229, 186, 142, 187, 233, 280, 232, 281, 331, 382, 330, 277, 331, 276, 220, 277, 335, 394, 334, 273, 335, 398, 462, 397
Offset: 0

Views

Author

Scott R. Shannon, Dec 08 2020

Keywords

Comments

This sequence is a variation of the Recamán sequence A005132 where the same rules apply except an additional restriction is added whereby a(n) = a(n-1) - n can occur only if gcd(a(n-1),n) > 1 or gcd(a(n-2),n) = 1, where gcd is the greatest common divisor. This additional restriction is inspired by the selection rules of A336957 and A098550.
The sequence shows large variations in its values; the bifurcated pattern typical of the Recamán sequence is present but there are regions where the terms rapidly spike up to huge values only to return to smaller values quickly again. For example after 37 million terms a value of ~1.6*10^12 is reached, but just after 41 million terms values below 10000 are again present. See the linked images.
It is unclear if all values are eventually visited; numerous small values like 4 and 5 have not occurred after 100 million terms.

Examples

			a(4) = 2. As gcd(a(3),4) = gcd(6,4) = 2 > 1, and as 6 - 4 = 2 has not occurred previously, a(4) = 2.
a(10) = 31. a(9) = 21, and 21 - 10 = 11 has not occurred previously. However as gcd(a(9),10) = gcd(21,10) = 1, and gcd(a(8),10) = gcd(12,10) = 2 > 1, both additional criteria for subtraction fail, thus a(10) = a(9) + 10 = 21 + 10 = 31. This is the first term which differs from the standard Recamán sequence A005132.
		

Crossrefs

Programs

  • Mathematica
    Block[{a = {0, 1}, k = 1}, Do[AppendTo[a, If[And[# > 0, FreeQ[a, #], Or[GCD[a[[-1]], i] > 1, GCD[a[[-2]], i] == 1 ]], #, a[[-1]] + i] &[a[[-1]] - i]], {i, 2, 10^4}]; a] (* Michael De Vlieger, Dec 09 2020 *)

A339670 a(1) = 2, a(2) = 3; for n>2, a(n) = smallest number not already used that shares a prime factor with a(n-2) and has a prime factor not in a(n-1).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Dec 12 2020

Keywords

Comments

Inspired by A064413 and A336957. The terms show a similar pattern to A064413, and like that sequence they are likely a permutation of the positive integers.
See A339671 for a similar sequence where the prime factor rules are reversed.

Examples

			a(4) = 4 as a(3) = 4 = 2*2 and a(2) = 2, thus a(4) must contain 2 as a prime factor but must also contain a prime factor other than 2. The lowest unused number matching these criteria is 2*3 = 6.
a(7) = 9 as a(6) = 10 = 2*5 and a(5) = 6 = 2*3, thus a(7) must contain 2 or 3 as a prime factor but must also contain a prime factor other than 2 and 5. The lowest unused number matching these criteria is 3*3 = 9.
		

Crossrefs

Programs

  • Mathematica
    Block[{a = {1, 2, 3}, b = {2}, c = {3}, p, k}, Do[k = 2; While[Nand[FreeQ[a, k], IntersectingQ[b, Set[p, FactorInteger[k][[All, 1]]]], Length@ Complement[p, Intersection[c, p]] > 0], k++]; AppendTo[a, k]; b = c; c = p, 73]; a] (* Michael De Vlieger, Dec 12 2020 *)

A339671 a(1) = 1, a(2) = 2; for n>2, a(n) = smallest number not already used that shares a prime factor with a(n-1) and has a prime factor not in a(n-2).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Dec 12 2020

Keywords

Comments

Inspired by A064413 and A336957. The terms show a similar pattern to A064413, and like that sequence they are likely a permutation of the positive integers. Many terms also match the values in A169837. For example a(17)=20 to a(115)=111 (shifted by an index of 1) are the same, but then differ again before more matches occurr.
See A339670 for a similar sequence where the prime factor rules are reversed.

Examples

			a(4) = 6 as a(3) = 4 = 2*2 and a(2) = 2, thus a(4) must contain 2 as a prime factor but must also contain a prime factor other than 2. The lowest unused number matching these criteria is 2*3 = 6.
a(6) = 15 as a(5) = 3 and a(4) = 6 = 2*3, thus a(6) must contain 3 as a prime factor but must also contain a prime factor other than 2 and 3. The lowest unused number matching these criteria is 3*5 = 15. This is the first term that differs from A064413.
		

Crossrefs

Programs

  • Mathematica
    Block[{a = {1, 2}, b = {}, c = {2}, p, k}, Do[k = 2; While[Nand[FreeQ[a, k], IntersectingQ[c, Set[p, FactorInteger[k][[All, 1]]]], Length@ Complement[p, Intersection[b, p]] > 0], k++]; AppendTo[a, k]; b = c; c = p, 75]; a] (* Michael De Vlieger, Dec 12 2020 *)

A340807 a(n) = n if n <= 3; for n > 3, a(n) is the closest number to a(n-2) that has not occurred earlier and has at least one common factor with a(n-2), but none with a(n-1). In case of a tie, choose the smaller.

Original entry on oeis.org

1, 2, 3, 4, 9, 8, 15, 14, 5, 12, 25, 16, 35, 18, 49, 20, 63, 22, 57, 26, 51, 28, 45, 32, 39, 34, 33, 38, 27, 40, 21, 44, 7, 46, 77, 48, 91, 50, 117, 55, 114, 65, 112, 75, 116, 69, 118, 81, 122, 87, 124, 99, 128, 93, 130, 111, 134, 105, 136, 95, 138, 85, 141, 80, 147, 82, 153, 86, 159, 88
Offset: 1

Views

Author

Scott R. Shannon, Jan 22 2021

Keywords

Comments

The sequence uses a similar selection rule to the Yellowstone permutation A098550 but instead of choosing the smallest number that has not occurred earlier that has a common factor with a(n-2) and no common factor with a(n-1), the number closest to a(n-2) that satisfies these rules is selected for a(n). If two such numbers are the same distance from a(n-2) then the smaller is chosen.
Many terms are clustered along a line with gradient approximately 1.33. However, along this line the terms often rapidly drop to much smaller values before returning to the main line. More interesting is the existence of regions on the same line where the terms split and form two lines of constantly increasing values. These lines continue until they both start decreasing again to rejoin near the original line.
In the first 15 million terms the maximum number of consecutive increasing terms is seven. This run starts at n = 47685. The maximum number of consecutive decreasing terms is also seven. This starts at n = 4134621.
In the first 15 million terms the fixed points, other than the first three terms, are 4, 323, 516718, 2199679, 2401224. As the terms for larger n seem to drop below the a(n)=n line on numerous occasions, it is possible that more exist, although this is unknown. The smallest number not appearing is 6, although other small values appear after many terms, e.g. a(4946191) = 23. It is unknown if all values eventually appear. The largest change in consecutive terms is from a(399922)=527754 to a(399923)=2887, a difference of 524867.
See also A340783 where the next term is the closest to a(n-1).

Examples

			a(5) = 9 as a(5-2) = a(3) = 3 so a(5) must have 3 as a factor, but cannot be 6 = 3*2 as it cannot have a common factor with a(5-1) = a(4) = 2.
a(12) = 16 as a(12-2) = a(10) = 12 so a(12) must have 2 or 3 as a factor, but cannot have a common factor with a(12-1) = a(11) = 25 = 5*5. The closest numbers to a(12-2) = a(10) = 12 which have 2 or 3 as a factor but not 5 are 8,9,14,16. The first three have already appeared so a(12) = 16.
		

Crossrefs

Programs

  • PARI
    See Links section.

A351496 Lexicographically earliest infinite sequence of distinct positive numbers such that, for n>2, a(n) has a common factor with the largest previous term but not with the second largest previous term.

Original entry on oeis.org

1, 2, 6, 3, 4, 15, 5, 35, 7, 14, 28, 25, 45, 9, 12, 18, 24, 27, 33, 36, 55, 11, 22, 44, 77, 21, 42, 49, 56, 99, 30, 39, 48, 51, 54, 57, 60, 69, 72, 75, 78, 187, 17, 34, 68, 85, 119, 66, 88, 110, 121, 102, 136, 143, 153, 154, 221, 13, 26, 52, 65, 91, 104, 117, 130, 156, 169, 182, 195, 238, 8, 10
Offset: 1

Views

Author

Scott R. Shannon, May 03 2022

Keywords

Comments

Similar to the Enots Wolley sequence A336957 the next term, when required, is chosen so that the sequence is infinite. All terms must satisfy the condition of sharing a factor with the largest previous term and not with the second largest previous term. When such a term is smaller than the second largest previous term then no other restriction need be applied since it will not influence subsequent terms in the sequence. This means such terms can be prime or a prime power - this is in contrast to A336957 where such numbers cannot occur.
When the next term is larger than the current second largest term but smaller than the largest term then it must be chosen so that the largest term has a prime factor not in common with it. When the next term is larger than the current largest term then it must be chosen so that it has a prime factor not in common with the current largest term. These later conditions ensure that the following term always exists. See the examples below. Although these rules are enforced surprisingly, in the first 200000 terms, they are very rarely required. Only three times in this range is a number, which is larger than the current largest value, rejected as it would not have a unique prime factor with the current largest term. And in the same range a number, between the current largest and second largest term, is never rejected as it would have all the same prime factors as the current largest term. If this holds true as n grows arbitrarily large is unknown.
The primes do not occur in their natural order, and the terms before and after prime values can be a large multiple of the prime, e.g. a(2147) = 3097, a(2148) = 19, a(2149) = 361. The sequence is conjectured to be a permutation of the positive integers although it may take many terms for some primes to appear, e.g., 29 has not occurred after 200000 terms. In the same range the fixed points beyond 2 are 92 and 40100, although it is possible more exist.

Examples

			a(4) = 3 as the largest and second largest previous terms are a(3) = 6 and a(2) = 2 respectively, and 3 is the smallest unused number that shares a factor with 6, not with 2, and does not contain the same prime factors as 6.
a(6) = 15 as the largest and second largest previous terms are a(3) = 6 and a(5) = 4 respectively, and 15 is the smallest unused number that shares a factor with 6, not with 4, and has a prime factor not in common with 6. Note that 9 satisfies the first two conditions but not the third.
a(7) = 5 as the largest and second largest previous terms are a(6) = 15 and a(3) = 6 respectively, and 5 is the smallest unused number that shares a factor with 15 but not with 6.
		

Crossrefs

A351497 Lexicographically earliest infinite sequence of distinct positive numbers such that, for n>2, a(n) has a common factor with the second largest previous term but not with the largest previous term.

Original entry on oeis.org

1, 2, 3, 4, 9, 8, 10, 21, 5, 16, 20, 22, 7, 15, 27, 11, 14, 26, 13, 28, 33, 32, 34, 39, 17, 38, 19, 40, 51, 25, 35, 44, 46, 23, 50, 52, 45, 57, 56, 49, 58, 63, 29, 62, 31, 64, 69, 68, 70, 81, 55, 65, 74, 37, 76, 80, 82, 75, 87, 41, 86, 43, 88, 93, 77, 92, 94, 99, 47, 98, 91, 100, 111, 85, 95, 104
Offset: 1

Views

Author

Scott R. Shannon, May 03 2022

Keywords

Comments

Similar to the Yellowstone permutation A098550 the next term can be chosen just by satisfying the conditions of sharing a factor with the second largest previous term and not with the largest previous term. When such a term is smaller than the second largest previous term then it can take any value not previously seen as it will not influence subsequent terms in the sequence. This means such terms can be prime or prime powers. If instead the term is larger than the second largest previous term then, as a result of the required factor sharing conditions, it will always have prime factors not in common with the current largest term. This means a following term can always be found and no other conditions on the prime factors of the term are required. This is in contrast to A351496 where additional restriction on the prime factors of the next term need to be enforced to ensure the sequence is infinite.
The primes occur in their natural order, and in general are not divisors of the previous or following term. The sequence is conjectured to be a permutation of the positive integers although it takes many terms for some values to appear, e.g., a(176478) = 42. In the first 200000 terms the fixed points beyond 4 are 7968 and 18552, although it is possible more exist.

Examples

			a(6) = 8 as the largest and second largest previous terms are a(5) = 9 and a(4) = 4 respectively, and 8 is the smallest unused number that shares a factor with 4 and not with 9.
a(9) = 5 as the largest and second largest previous terms are a(8) = 21 and a(7) = 10 respectively, and 5 is the smallest unused number that shares a factor with 10 and not with 21.
		

Crossrefs

A354717 Lexicographically earliest infinite sequence of distinct positive integers such that in any run of four consecutive terms there is one term which is prime to the other three, none of which are pairwise coprime.

Original entry on oeis.org

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

Views

Author

David James Sycamore, Jun 03 2022

Keywords

Comments

Can be regarded as the reverse of A354732, which has the opposite coprime relations to those defined here. Records tend to be nonprime, but not all nonprimes are records.
The primes do not appear in natural order (5 and 7 precede 3).
Open question: Is it true that in any run of four consecutive terms there is always a prime or prime power (this being the term prime to the other three)?
Conjecture: Sequence is a permutation of the positive integers.

Examples

			a(1,2,3,4) = 1,2,4,6 is the lexicographically earliest string of four consecutive numbers which satisfy the definition, hence the sequence starts with these terms.
a(13,14,15) = 7,20,15 respectively, and 24 is the least unused number such that 7 is prime to 20,15 and 24, whereas (20,15)=5, (15,24)=3 and (20,24)=2. Therefore a(16)=24.
		

Crossrefs

Programs

Previous Showing 81-90 of 127 results. Next