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.

A354765 a(n) is a binary encoded version of A355057(n).

Original entry on oeis.org

0, 0, 1, 3, 6, 7, 13, 15, 27, 59, 122, 123, 243, 499, 501, 511, 1007, 2031, 4047, 8143, 16271, 32655, 65422, 65423, 130831, 261903, 523791, 1048079, 2096651, 2096671, 4193813, 4193815, 4193311, 8387615, 16775199, 33552415, 67104799, 134213663, 268427295, 536862751, 1073725471, 2147467295, 4294934559, 8589901855, 17179803679
Offset: 1

Views

Author

Keywords

Comments

Let plist = list of forbidden primes for A090252(n); A355057(n) is the product of these primes. Then a(n) = Sum of 2^(i-1) over all prime(i) in plist.
Conversely, if a(n) has binary expansion a(n) = Sum b(i)*2^i, b(i) = 0 or 1, then plist consists of {prime(i+1) such that b(i) = 1}.

Examples

			For n = 7 the forbidden primes are 2, 5, 7 = prime(1), prime(3) and prime(4). Their product is A355057(7) = 70. Then a(7) = 2^0 + 2^2 + 2^3 = 13.
		

Crossrefs

Programs

  • Maple
    # To get first M terms:
    with(numtheory);
    M:=20; ans:=[0,0,1];
    for i from 4 to M do
    S:={}; j1:=floor((i+1)/2); j2:=i-1;
      for j from j1 to j2 do S:={op(S), op(factorset(b252[j]))} od:
    plis:=sort(convert(S,list));
    t3:=0; for ii from 1 to nops(plis) do p:=plis[ii]; p2:=pi(p); t3:=t3+2^(p2-1); od:
    ans:=[op(ans),t3];
    od:
    ans;
  • Python
    from math import gcd, lcm
    from itertools import count, islice
    from collections import deque
    from sympy import primepi, primefactors
    def A354765_gen(): # generator of terms
        aset, aqueue, c, b, f = {1}, deque([1]), 2, 1, True
        yield 0
        while True:
            for m in count(c):
                if m not in aset and gcd(m,b) == 1:
                    yield sum(2**(primepi(p)-1) for p in primefactors(b))
                    aset.add(m)
                    aqueue.append(m)
                    if f: aqueue.popleft()
                    b = lcm(*aqueue)
                    f = not f
                    while c in aset:
                        c += 1
                    break
    A354765_list = list(islice(A354765_gen(),20)) # Chai Wah Wu, Jun 18 2022

A090252 The Two-Up sequence: a(n) is the least positive number not already used that is coprime to the previous floor(n/2) terms.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 9, 11, 13, 17, 8, 19, 23, 25, 21, 29, 31, 37, 41, 43, 47, 53, 16, 59, 61, 67, 71, 73, 55, 79, 27, 49, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 26, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 85, 121, 223, 227, 57, 229
Offset: 1

Views

Author

Amarnath Murthy, Nov 27 2003

Keywords

Comments

a(n) is coprime to the next n terms. - David Wasserman, Oct 24 2005
All values up to a(1000000) are either prime powers or semiprimes; this suggests the sequence is unlikely to be a permutation of the integers.
It appears that a(n) is even iff n = 3*2^k-1 for some k (A083356). - N. J. A. Sloane, Nov 01 2014
The even terms in the present sequence are listed in A354255.
We have a(1) = 1 and a(2) = 2. At step k >= 2, the sequence is extended by adding two terms: a(2*k-1) = smallest unused number which is relatively prime to a(k), a(k+1), ..., a(2*k-2), and a(2*k) = smallest unused number which is relatively prime to a(k), a(k+1), ..., a(2*k-1). So at step k=2 we add a(3)=3, a(4)=5; at step k=3 we add a(5)=4, a(6)=7; and so on. - N. J. A. Sloane, May 21 2022
Comments from N. J. A. Sloane, May 23 2022: (Start)
Conjecture 1. A090252 is a subsequence of A354144 (prime powers and semiprimes).
Conjecture 2. The terms of A354144 that are missing from A090252 are 6, 10, 14, 15, 22, 33, 34, 35, 38, 39, 46, 51, 58, 62, 65, 69, 74, 77, 82, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 166, 177, 178, 183, 185, 187, 194, 201, 202, 203, 209, 213, 214, 215, 218, 219, 221, ...
But since there is no proof that any one of these numbers is really missing, this list cannot yet have an entry in the OEIS.
Let S_p = list of indices of terms in A090252 that are divisible by the prime p.
Conjecture 3. For a prime p, there are constants v_1, v_2, ..., v_K and c such that
S_p = { v_1, v_2, ..., v_k, lambda*2^i - 1, i >= c}.
For example, from Michael S. Branicky's 10000-term b-file, it appears that:
S_2 = { 3*2^k-1, k >= 0 } cf. A083329
S_3 = { 2^k-1, k >= 2 } cf. A000225
S_5 = { 4 then 15*2^k-1 k >= 0 } cf. A196305
S_7 = { 6, 15, then 33*2^k-1, k >= 0 }
S_11 = { 8, 29, then 61*2^k-1, k >= 0 }
S_13 = { 9, 47, 97*2^n-1, n >= 0 }
S_17 = { 10, 59, 121*2^n-1, n >= 0 }
S_19 = { 12, 63, 129*2^n-1, n >= 0 }
S_23 = { 13, 65, 133*2^n-1, n >= 0 }
S_29 = { 16, 121, 245*2^n-1, n >= 0 }
S_31 = { 17, 131, 265*2^n-1, n >= 0 }
The initial primes p and the corresponding values of lambda are:
p: 2 3 5 7 11 13 17 19 23 29 31
lambda:..3...1..15..33...61...97..121..129..133..245..265
(This sequence of lambdas does not seem to have any simpler explanation, is not in the OEIS, and cannot be since the terms shown are all conjectural.)
Conjecture 2 is a consequence of Conjecture 3. For example, 6 does not appear in A090252, since the sets S_2 and S_3 are disjoint.
Also 10 does not appear, since S_2 and S_5 are disjoint.
In fact 2*p for 3 <= p <= 11 does not appear, but 26 = 2*13 does appear since S_2 and S_13 have 47 in common.
Assuming the numbers that appear to be missing (see Conjecture 2) really are missing, the numbers that take a record number of steps to appear are 1, 2, 3, 4, 7, 8, 16, 26, 32, 64, 128, 206, 256, 478, 512, 933, ..., and the indices where they appear are 1, 2, 3, 5, 6, 11, 23, 47, 95, 191, 383, 767, 1535, 3071, 6143, 8191, .... These two sequences are not yet in the OEIS, and cannot be added since the terms are all conjectural.
(End)
From N. J. A. Sloane, Jun 06 2022 (Start)
Theorem: (a) a(n) <= prime(n-1) for all n >= 2 (cf. A354154).
(b) A stronger upper bound is the following. Let c(n) = A354166(n) denote the number of nonprime terms among a(1) .. a(n). Note c(1)=1. Then a(n) <= prime(n-c(n)) for n <> 7 and 14.
It appears that a(n) = prime(n-c(n)) for almost all n. That is, this is the equation to the line in the graph that contains most of the terms.
For example, a(34886) = 408710 (see the b-file) = prime(34886 - A354166(34886)) = prime(34886 - 374) = prime(34512) = 408710.
Another example: Consider Russ Cox's table of the first N = 5764982 terms. We see that a(5764982) = 99999989 = prime(5761455) = prime(N - 3527) which agrees with c(N) = 3527 (from the first Russ Cox link).
(End)
If we consider the May 23 2022 comment, note the conjectured indices show near complete overlap with terms of A081026: 1, 2, 3, 5, 6, 11, 23, 47, 95, 191, 383, 767, 1535, 3071, 6143, 8191. - Bill McEachen, Aug 09 2024

Crossrefs

See A247665 for the case when the numbers are required to be at least 2. A353730 is another version.
For a squarefree analog, see A354790, A354791, A354792.

Programs

Extensions

More terms from David Wasserman, Oct 24 2005

A354758 a(n) = Product_{k = ceiling(n/2)..n-1} A090252(k).

Original entry on oeis.org

1, 1, 2, 6, 15, 60, 140, 1260, 2772, 36036, 153153, 1225224, 3325608, 76488984, 212469400, 4461857400, 11763078600, 364655436600, 1037865473400, 42552484409400, 107632754682600, 5058739470082200, 33514148989294575, 536226383828713200, 1665124033994425200
Offset: 1

Views

Author

Rémy Sigrist, Jun 06 2022

Keywords

Comments

The prime divisors of a(n) are forbidden in A090252(n).

Examples

			a(7) = A090252(4) * A090252(5) * A090252(6) = 5 * 4 * 7 = 140.
		

Crossrefs

A355057 is another version.

Programs

  • Mathematica
    With[{s = Import["https://oeis.org/A090252/b090252.txt", "Data"][[1 ;; 25, -1]]}, Table[Product[s[[k]], {k, Ceiling[n/2], n - 1}], {n, Length[s]}]] (* Michael De Vlieger, Aug 28 2022 *)
  • PARI
    See Links section.

Formula

gcd(a(n), A090252(n)) = 1.

A354780 a(n) is the bitwise OR of (the binary expansions of) b(n+1) to b(2*n), where b is A354169.

Original entry on oeis.org

2, 12, 27, 115, 252, 1004, 2013, 4031, 16307, 32631, 65279, 261375, 524270, 2096110, 4194253, 8386527, 16773119, 67096575, 134217659, 536854459, 1073741623, 2147450751, 4294901759, 17179672575, 34359737599, 137438690559, 274877382143, 549754765311, 2199022205950, 4398044412927, 8796093022189, 35184367894509, 70368744175567
Offset: 1

Views

Author

N. J. A. Sloane, Jul 05 2022

Keywords

Comments

If the binary expansion of a(n) has a 1 in the 2^i's bit (for any i >= 0) then A354169(2*n+1) must have a 0 in that bit.
A354169(2*n+1) is the smallest number not yet in A354169 which satisfies that condition (this follows at once from the definition of A354169).
This sequence bears the same relation to A354169 as A355057 does to A090252.

Examples

			Consider n=6. Then b(7) to b(12) are 32, 64, 12, 128, 256, 512. The bitwise OR of those 6 numbers is 1111101100_2 = 1004_10 = a(6). The bitwise complement of 1004_10 is 10011_2 = 19_10 = A354781(6), and A354169(6) = 17_10 = 10001_2.
On the other hand, for n=5, b(6) to b(10) are 16, 32, 64, 12, 128, whose bitwise OR is 11111100_2 = 252_10 = a(5). The bitwise complement of 252_10 is 3_10 = 11_2 = A354781(5). However, 3 has already appeared in A354169, and the smallest available number whose binary expansion is disjoint from 252_10 = 11111100_2 is 2^8 = 100000000_2 = 256_10 = 2^8 = A354169(5).
		

Crossrefs

A356803 a(n) = product of prohibited prime factors of A354790(n).

Original entry on oeis.org

1, 1, 2, 6, 15, 105, 385, 2310, 6006, 102102, 277134, 6374082, 16804398, 520936338, 3038795305, 66853496710, 190275336790, 7420738134810, 17897074325130, 769574195980590, 1903683537425670, 100895227483560510, 258818192240437830, 15787909726666707630, 36475515575402393490
Offset: 1

Views

Author

Michael De Vlieger, Sep 06 2022

Keywords

Comments

Let s(n) = A354790(n), a squarefree number by definition. Prime p | s(n) implies p does not divide s(n+j), 1 <= j <= n. Therefore a(n) is the product of primes p that cannot divide s(n). a(n) = product of distinct primes that divide a(j) for floor((n+1)/2) <= j <= n-1. (After N. J. A. Sloane in A355057.)
Analogous to A355057.

Examples

			a(1) = 1;
a(2) = 1 since s(1) = 1, and (2-1)/2 is not an integer;
a(3) = a(2) * s(2) / s((3-1)/2) = 1 * 2 / 1 = 2;
a(4) = a(3) * s(3) = 2 * 3 = 6;
a(5) = a(4) * s(4) / s((5-1)/2) = 6 * 5 / 2 = 15;
a(6) = a(5) * s(5) = 15 * 7 = 105;
a(7) = a(6) * s(6) / s((7-1)/2) = 105 * 11 / 3 = 385; etc.
		

Crossrefs

Programs

  • Mathematica
    Block[{s = Import["https://oeis.org/A354790/b354790.txt", "Data"][[1 ;; 26, -1]], ww, m = 1, t, w = 3, k = 3}, Reap[Do[m *= Times @@ FactorInteger[s[[If[# == 0, 1, #] &[i - 1]]]][[All, 1]]; If[IntegerQ[#] && # > 0, m /= Times @@ FactorInteger[s[[#]]][[All, 1]]] &[(i - 1)/2]; Sow[m], {i, Length[s] - 1}]][[-1, -1]] ]

Formula

a(n) = a(n-1) * s(n-1) / s((n-1)/2), where the last operation is only carried out iff (n-1)/2 is an integer.
Showing 1-5 of 5 results.