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

A332820 Integers in the multiplicative subgroup of positive rationals generated by the products of two consecutive primes and the cubes of primes. Numbers k for which A048675(k) is a multiple of three.

Original entry on oeis.org

1, 6, 8, 14, 15, 20, 26, 27, 33, 35, 36, 38, 44, 48, 50, 51, 58, 63, 64, 65, 68, 69, 74, 77, 84, 86, 90, 92, 93, 95, 106, 110, 112, 117, 119, 120, 122, 123, 124, 125, 141, 142, 143, 145, 147, 156, 158, 160, 161, 162, 164, 170, 171, 177, 178, 185, 188, 196, 198, 201, 202, 208, 209, 210, 214, 215, 216, 217, 219, 221, 225
Offset: 1

Views

Author

Antti Karttunen and Peter Munn, Feb 25 2020

Keywords

Comments

The positive integers are partitioned between this sequence, A332821 and A332822, which list the integers in respective cosets of the subgroup.
As the sequence lists the integers in a multiplicative subgroup of the positive rationals, the sequence is closed under multiplication and, provided the result is an integer, under division.
It follows that for any n in this sequence, all powers n^k are present (k >= 0), as are all cubes.
If we take each odd term of this sequence and replace each prime in its factorization by the next smaller prime, the resulting numbers are a permutation of the full sequence; and if we take the square root of each square term we get the full sequence.
There are no primes in the sequence, therefore if k is present and p is a prime, k*p and k/p are absent (noting that k/p might not be an integer). This property extends from primes to all terms of A050376 (often called Fermi-Dirac primes), therefore to squares of primes, 4th powers of primes etc.
The terms are the even numbers in A332821 halved. The terms are also the numbers m such that 5m is in A332821, and so on for alternate primes: 11, 17, 23 etc. Likewise, the terms are the numbers m such that 3m is in A332822, and so on for alternate primes: 7, 13, 19 etc.
The numbers that are half of the even terms of this sequence are in A332822, which consists exactly of those numbers. The numbers that are one third of the terms that are multiples of 3 are in A332821, which consists exactly of those numbers. These properties extend in a pattern of alternating primes as described in the previous paragraph.
If k is an even number, exactly one of {k/2, k, 2k} is in the sequence (cf. A191257 / A067368 / A213258); and generally if k is a multiple of a prime p, exactly one of {k/p, k, k*p} is in the sequence.
If m and n are in this sequence then so is m*n (the definition of "multiplicative semigroup"), while if n is in this sequence, and x is in the complement A359830, then n*x is in A359830. This essentially follows from the fact that A048675 is totally additive sequence. Compare to A329609. - Antti Karttunen, Jan 17 2023

Crossrefs

Positions of zeros in A332823; equivalently, numbers in row 3k of A277905 for some k >= 0.
Cf. A048675, A195017, A332821, A332822, A353350 (characteristic function), A353348 (its Dirichlet inverse), A359830 (complement).
Subsequences: A000578\{0}, A006094, A090090, A099788, A245630 (A191002 in ascending order), A244726\{0}, A325698, A338471, A338556, A338907.
Subsequence of {1} U A268388.

Programs

  • Mathematica
    Select[Range@ 225, Or[Mod[Total@ #, 3] == 0 &@ Map[#[[-1]]*2^(PrimePi@ #[[1]] - 1) &, FactorInteger[#]], # == 1] &] (* Michael De Vlieger, Mar 15 2020 *)
  • PARI
    isA332820(n) =  { my(f = factor(n)); !((sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2)%3); };

Formula

{a(n) : n >= 1} = {1} U {2 * A332822(k) : k >= 1} U {A003961(a(k)) : k >= 1}.
{a(n) : n >= 1} = {1} U {a(k)^2 : k >= 1} U {A331590(2, A332822(k)) : k >= 1}.
From Peter Munn, Mar 17 2021: (Start)
{a(n) : n >= 1} = {k : k >= 1, 3|A048675(k)}.
{a(n) : n >= 1} = {k : k >= 1, 3|A195017(k)}.
{a(n) : n >= 1} = {A332821(k)/2 : k >= 1, 2|A332821(k)}.
{a(n) : n >= 1} = {A332822(k)/3 : k >= 1, 3|A332822(k)}.
(End)

Extensions

New name from Peter Munn, Mar 08 2021

A191257 a(n) = A067368(n)/2.

Original entry on oeis.org

1, 3, 5, 7, 8, 9, 11, 13, 15, 17, 19, 21, 23, 24, 25, 27, 29, 31, 33, 35, 37, 39, 40, 41, 43, 45, 47, 49, 51, 53, 55, 56, 57, 59, 61, 63, 64, 65, 67, 69, 71, 72, 73, 75, 77, 79, 81, 83, 85, 87, 88, 89, 91, 93, 95, 97, 99, 101, 103, 104, 105, 107, 109, 111, 113, 115, 117, 119, 120, 121, 123, 125, 127, 129, 131, 133, 135, 136, 137, 139, 141, 143
Offset: 1

Views

Author

Clark Kimberling, May 28 2011

Keywords

Comments

From Jianing Song, Sep 21 2018: (Start)
Numbers n such that A191255(n) = 0 or 3. Previous definition was numbers n such that A191255(2*n) = 1, that is, numbers of the form 2^(3t)*s where s is an odd number.
{+-a(n)} gives all nonzero cubes modulo all powers of 2, that is, nonzero cubes over the 2-adic integers. So this sequence is closed under multiplication. (End)
The old entry had the conjecture that a(n) = A067368(n)/2. Jianing Song, Sep 21 2018 showed that this is true, and gave us the simpler definition that we have now used. The conjecture is correct because {a(n)} lists the numbers of the form 2^(3t)*s, and {A067368(n)} lists the numbers of the form 2^(3t+1)*s, where s is an odd number. Note also that a(n) = A213258(n)/4.
The asymptotic density of this sequence is 4/7. - Amiram Eldar, May 31 2024

Crossrefs

Perfect powers over the 2-adic integers:
Squares: positive: A234000; negative: A004215 (negated);
Cubes: this sequence;
Fourth powers: positive: A319281; negative: A319282 (negated).

Programs

  • Mathematica
    t = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0, 2}, 2 -> {0, 3},
          3 -> {0, 1}}] &, {0}, 9] (* A191255 *)
    Flatten[Position[t, 0]] (* A005408, the odds *)
    a = Flatten[Position[t, 1]] (* A067368 *)
    b = Flatten[Position[t, 2]] (* A213258 *)
    a/2  (* A191257 *)
    b/4  (* a/2 *)
  • PARI
    isok(n) = valuation(2*n, 2)%3==1; \\ Altug Alkan, Sep 21 2018
    
  • Python
    def A191257(n):
        def f(x): return n+x-sum(((x>>i)-1>>1)+1 for i in range(0,x.bit_length(),3))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Feb 17 2025

Extensions

Name corrected by Altug Alkan, Apr 03 2018
New name from Jianing Song, Sep 21 2018

A067368 a(n) is the smallest positive even integer that cannot be expressed as the product of two or three previous terms (not necessarily distinct).

Original entry on oeis.org

2, 6, 10, 14, 16, 18, 22, 26, 30, 34, 38, 42, 46, 48, 50, 54, 58, 62, 66, 70, 74, 78, 80, 82, 86, 90, 94, 98, 102, 106, 110, 112, 114, 118, 122, 126, 128, 130, 134, 138, 142, 144, 146, 150, 154, 158, 162, 166, 170, 174, 176, 178, 182, 186, 190, 194, 198, 202, 206
Offset: 1

Views

Author

Jeremiah K. Hower (jhower(AT)vt.edu), Jan 20 2002

Keywords

Comments

a(n+1) - a(n) = 2 or 4 for all n >= 1. See A067395 for the sequence of differences.
From Jianing Song, Sep 21 2018: (Start)
Numbers of the form 2^(3t+1)*s where s is an odd number.
Also positions of 1 in A191255. (End)
The asymptotic density of this sequence is 2/7. - Amiram Eldar, May 31 2024

Examples

			8 = 2*2*2, but 10 = 2*5 cannot be expressed with factors 2 and 6, so a(3) = 10.
		

Crossrefs

Programs

  • Maple
    N:= 1000:
    A:= {seq(seq(2^(3*k+1)*s,s=1..N/2^(3*k+1),2),k=0..floor(log[2](N/2)/3))}:
    sort(convert(A,list)); # Robert Israel, Jul 23 2019
  • Mathematica
    t = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0, 2}, 2 -> {0, 3}, 3 -> {0, 1}}] &, {0}, 9] (* A191255 *)
    Flatten[Position[t, 0]] (* A005408, the odds *)
    a = Flatten[Position[t, 1]] (* this sequence *)
    b = Flatten[Position[t, 2]] (* A213258 *)
    a/2  (* A191257 *)
    b/4  (* a/2 *)
    (* Clark Kimberling, May 28 2011 *)
  • PARI
    isok(n) = valuation(n, 2)%3==1; \\ Altug Alkan, Sep 21 2018
    
  • Python
    def A067368(n):
        def f(x): return n+x-sum(((x>>i)-1>>1)+1 for i in range(0,x.bit_length(),3))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m<<1 # Chai Wah Wu, Feb 17 2025

Formula

Conjecture: a(n) = a(n-1) + 2 if (n = 2a(k) + k + 1) or (n = 2a(k) + k) for some k, otherwise a(n) = a(n-1) + 4. This has been confirmed for several hundred terms.
The above conjecture is correct because there are 2*(a(k+1)-a(k)) terms that are not divisible by 4 in the k-th interval which are determined by terms that are divisible by 4. For example, there are 2*(a(2)-a(1)) = 2*(6-2) = 8 terms between a(5) = 16 and a(14) = 48 because numbers of the form 2*s are always terms where s is an odd number. So first differences of a(n) determine the corresponding intervals and the formula above always holds. - Altug Alkan, Sep 24 2018
a(n) = 2*A191257(n) = A213258(n)/2. - Jianing Song, Sep 21 2018

Extensions

Edited by John W. Layman, Jan 23 2002

A191255 Fixed point of the morphism 0 -> 01, 1 -> 02, 2 -> 03, 3 -> 01.

Original entry on oeis.org

0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 1, 0, 1, 0, 2
Offset: 1

Views

Author

Clark Kimberling, May 28 2011

Keywords

Comments

See A191250.
The asymptotic density of the occurrences of k = 0, 1, 2 and 3 is 1/2, 2/7, 1/7 and 1/14, respectively. The asymptotic mean of this sequence is 11/14. - Amiram Eldar, May 31 2024

Crossrefs

Positions of 0 or 3: A191257; positions of 0: A005408; positions of 1: A067368; positions of 2: A213258.

Programs

  • Mathematica
    t = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0, 2}, 2 -> {0, 3}, 3 -> {0, 1}}] &, {0}, 9] (* this sequence *)
    Flatten[Position[t, 0]] (* A005408, the odds *)
    a = Flatten[Position[t, 1]] (* A067368 *)
    b = Flatten[Position[t, 2]] (* A213258 *)
    a/2  (* A191257 *)
    b/4  (* a/2 *)
  • PARI
    A191255(n) = if(n%2, 0, my(e=valuation(n, 2)%3); if(!e, 3, e)); \\ Antti Karttunen, May 28 2024, after Jianing Song's Sep 21 2018 formula

Formula

a(n) = 0 for odd n, otherwise a(n) is the unique number in {1,2,3} that is congruent to v2(n) modulo 3, where v2(n) = A007814(n) is the 2-adic valuation of n. - Jianing Song, Sep 21 2018 [Clarified by Jianing Song, May 30 2024]
Recurrence: a(2n-1) = 0, a(2n) = 1, 2, 3, 1 for a(n) = 0, 1, 2, 3 respectively. - Jianing Song, May 30 2024

A332821 One part of a 3-way classification of the positive integers. Numbers n for which A048675(n) == 1 (mod 3).

Original entry on oeis.org

2, 5, 9, 11, 12, 16, 17, 21, 23, 28, 30, 31, 39, 40, 41, 47, 49, 52, 54, 57, 59, 66, 67, 70, 72, 73, 75, 76, 83, 87, 88, 91, 96, 97, 100, 102, 103, 109, 111, 116, 126, 127, 128, 129, 130, 133, 135, 136, 137, 138, 148, 149, 154, 157, 159, 165, 167, 168, 169, 172, 175, 179, 180, 183, 184, 186, 190, 191, 197, 203, 211, 212
Offset: 1

Views

Author

Antti Karttunen and Peter Munn, Feb 25 2020

Keywords

Comments

The positive integers are partitioned between A332820, this sequence and A332822.
For each prime p, the terms include exactly one of p and p^2. The primes alternate between this sequence and A332822. This sequence has the primes with odd indexes, those in A031368.
The terms are the even numbers in A332822 halved. The terms are also the numbers m such that 5m is in A332822, and so on for alternate primes: 11, 17, 23 etc. Likewise, the terms are the numbers m such that 3m is in A332820, and so on for alternate primes: 7, 13, 19 etc.
The numbers that are half of the even terms of this sequence are in A332820, which consists exactly of those numbers. The numbers that are one third of the terms that are multiples of 3 are in A332822, which consists exactly of those numbers. For larger primes, an alternating pattern applies as described in the previous paragraph.
If we take each odd term of this sequence and replace each prime in its factorization by the next smaller prime, the resulting number is in A332822, which consists entirely of those numbers.
The product of any 2 terms of this sequence is in A332822, the product of any 3 terms is in A332820, and the product of a term of A332820 and a term of this sequence is in this sequence. So if a number k is present, k^2 is in A332822, k^3 is in A332820, and k^4 is in this sequence.
If k is an even number, exactly one of {k/2, k, 2k} is in the sequence (cf. A191257 / A067368 / A213258); and generally if k is a multiple of a prime p, exactly one of {k/p, k, k*p} is in the sequence.

Crossrefs

Positions of ones in A332823; equivalently, numbers in row 3k+1 of A277905 for some k >= 0.
Subsequences: intersection of A026478 and A066208, A031368 (prime terms), A033431\{0}, A052934\{1}, A069486, A099800, A167747\{1}, A244725\{0}, A244728\{0}, A338911 (semiprime terms).

Programs

  • Mathematica
    Select[Range@ 212, Mod[Total@ #, 3] == 1 &@ Map[#[[-1]]*2^(PrimePi@ #[[1]] - 1) &, FactorInteger[#]] &] (* Michael De Vlieger, Mar 15 2020 *)
  • PARI
    isA332821(n) =  { my(f = factor(n)); (1==((sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2)%3)); };

Formula

{a(n) : n >= 1} = {2 * A332820(k) : k >= 1} U {A003961(A332822(k)) : k >= 1}.
{a(n) : n >= 1} = {A332822(k)^2 : k >= 1} U {A331590(2, A332820(k)) : k >= 1}.

A332822 One part of a 3-way classification of the positive integers. Numbers n for which A048675(n) == 2 (mod 3).

Original entry on oeis.org

3, 4, 7, 10, 13, 18, 19, 22, 24, 25, 29, 32, 34, 37, 42, 43, 45, 46, 53, 55, 56, 60, 61, 62, 71, 78, 79, 80, 81, 82, 85, 89, 94, 98, 99, 101, 104, 105, 107, 108, 113, 114, 115, 118, 121, 131, 132, 134, 139, 140, 144, 146, 150, 151, 152, 153, 155, 163, 166, 173, 174, 176, 181, 182, 187, 189, 192, 193, 194, 195, 199, 200, 204
Offset: 1

Views

Author

Antti Karttunen and Peter Munn, Feb 25 2020

Keywords

Comments

The positive integers are partitioned between A332820, A332821 and this sequence.
For each prime p, the terms include exactly one of p and p^2. The primes alternate between this sequence and A332821. This sequence has the primes with even indexes, those in A031215.
The terms are the even numbers in A332820 halved. The terms are also the numbers m such that 5m is in A332820, and so on for alternate primes: 11, 17, 23 etc. Likewise, the terms are the numbers m such that 3m is in A332821, and so on for alternate primes: 7, 13, 19, 29 etc.
If we take each odd term of this sequence and replace each prime in its factorization by the next smaller prime, we get the same set of numbers as we get from halving the even terms of this sequence, and A332821 consists exactly of those numbers. The numbers that are one third of the terms that are multiples of 3 are in A332820, which consists exactly of those numbers. The numbers that are one fifth of the terms that are multiples of 5 constitute A332821, and for larger primes, an alternating pattern applies as described in the previous paragraph.
The product of any 2 terms of this sequence is in A332821, the product of any 3 terms is in A332820, and the product of a term of A332820 and a term of this sequence is in this sequence. So if a number k is present, k^2 is in A332821, k^3 is in A332820, and k^4 is in this sequence.
If k is an even number, exactly one of {k/2, k, 2k} is in the sequence (cf. A191257 / A067368 / A213258); and generally if k is a multiple of a prime p, exactly one of {k/p, k, k*p} is in the sequence.

Crossrefs

Positions of terms valued -1 in A332823; equivalently, numbers in row 3k-1 of A277905 for some k >= 1.
Subsequences: intersection of A026478 and A066207, A031215 (prime terms), A033430\{0}, A117642\{0}, A169604, A244727\{0}, A244729\{0}, A338910 (semiprime terms).

Programs

  • Mathematica
    Select[Range@ 204, Mod[Total@ #, 3] == 2 &@ Map[#[[-1]]*2^(PrimePi@ #[[1]] - 1) &, FactorInteger[#]] &] (* Michael De Vlieger, Mar 15 2020 *)
  • PARI
    isA332822(n) =  { my(f = factor(n)); (2==((sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2)%3)); };

Formula

{a(n) : n >= 1} = {2 * A332821(k) : k >= 1} U {A003961(A332821(k)) : k >= 1}.
{a(n) : n >= 1} = {A332821(k)^2 : k >= 1} U {A331590(2, A332821(k)) : k >= 1}.

A067396 a(n) is the position of the n-th occurrence of the pair "2,2" in A067395 (the first difference sequence of A067368).

Original entry on oeis.org

4, 13, 22, 31, 36, 41, 50, 59, 68, 77, 86, 95, 104, 109, 114, 123, 132, 141, 150, 159, 168, 177, 182, 187, 196, 205, 214, 223, 232, 241, 250, 255, 260, 269, 278, 287, 292, 297, 306, 315, 324, 329, 334, 343, 352, 361, 370, 379, 388, 397, 402, 407, 416, 425
Offset: 1

Views

Author

John W. Layman, Jan 22 2002

Keywords

Comments

A comparison of this sequence with A067368 suggests the following conjecture: a(n)=2*A067368(n)+n-1. This has been confirmed for several hundred terms.
Above conjecture is true, and it is same as conjecture in Formula section of A067368. - Altug Alkan, Sep 26 2018
The asymptotic density of this sequence is 1/8. - Amiram Eldar, May 31 2024

Examples

			A067395 begins {4,4,4,2,2,4,4,4,4,...}, so a(1)=4.
		

Crossrefs

Programs

  • Python
    def A067396(n):
        def f(x): return n+x-sum(((x>>i)-1>>1)+1 for i in range(0,x.bit_length(),3))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return (m<<2)+n-1 # Chai Wah Wu, Feb 17 2025

A213257 a(1) = 1, a(2) = 2 and, for n > 2, a(n) is the smallest integer greater than a(n - 1) such that no three terms of the sequence form a geometric progression of the form {x, 2 x, 4 x}.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 69, 70, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 88, 89, 90, 91, 93, 94, 95, 97, 98, 99, 101, 102, 103, 104, 105
Offset: 1

Views

Author

John W. Layman, Jun 07 2012

Keywords

Comments

Conjecture. The positive integers that are not in this sequence are given by the positions of 2 in the fixed-point of the morphism 0->01, 1->02, 2->03, 3->01 (see A191255). (This has been confirmed for over 5000 terms of A213257.) To illustrate, the fixed-point of the indicated morphism is {0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,1,0,1,0,2,0,...} and 2 occurs at positions {4,12,20,...}, integers that are missing in A213257.
The positive integers that are not in this sequence are listed in A213258.
For the sequence containing no 3-term arithmetic progression,see A003278.

Examples

			Given that the sequence begins {1, 2, 3, 5, 6, 7, 8, 9, 10, 11,...}, the next term, a(11), cannot be 12, because then the forbidden progression {3,6,12} would occur in the sequence.  13 is allowed, however, so a(11)=13.
		

Crossrefs

Showing 1-8 of 8 results.