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

A354791 Indices of nonprime terms in A354790.

Original entry on oeis.org

1, 7, 14, 15, 17, 29, 31, 35, 59, 63, 64, 71, 79, 119, 120, 127, 129, 143, 159, 223, 239, 241, 255, 259, 260, 287, 288, 319, 320, 447, 479, 483, 484, 511, 512, 519, 521, 575, 577, 639, 641, 895, 959, 960, 967, 968, 969, 1023, 1025, 1039, 1043, 1044, 1151, 1152
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • C
    See Links section.
  • Python
    from math import lcm, gcd
    from itertools import count, islice
    from collections import deque
    from sympy import factorint
    def A354791_gen(): # generator of terms
        aset, aqueue, c, b, f, i = {1}, deque([1]), 2, 1, True, 1
        yield 1
        while True:
            for m in count(c):
                if m not in aset and gcd(m,b) == 1 and all(map(lambda n:n<=1,fs:=factorint(m).values())):
                    i += 1
                    if len(fs) > 1:
                        yield i
                    aset.add(m)
                    aqueue.append(m)
                    if f: aqueue.popleft()
                    b = lcm(*aqueue)
                    f = not f
                    while c in aset:
                        c += 1
                    break
    A354791_list = list(islice(A354791_gen(),30)) # Chai Wah Wu, Jul 17 2022
    

Extensions

More terms from Rémy Sigrist, Jul 17 2022

A354792 Nonprime terms in A354790 in order of appearance.

Original entry on oeis.org

1, 6, 35, 22, 39, 85, 14, 33, 65, 34, 133, 69, 319, 155, 481, 82, 119, 57, 253, 1247, 235, 403, 74, 287, 901, 177, 1159, 737, 1633, 2117, 215, 611, 2449, 166, 3293, 679, 697, 159, 1121, 671, 1541, 2059, 365, 4343, 1339, 5029, 3379, 158, 3071, 623, 1649, 4633
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • C
    See Links section.
  • Python
    from math import lcm, gcd
    from itertools import count, islice
    from collections import deque
    from sympy import factorint
    def A354792_gen(): # generator of terms
        aset, aqueue, c, b, f = {1}, deque([1]), 2, 1, True
        yield 1
        while True:
            for m in count(c):
                if m not in aset and gcd(m,b) == 1 and all(map(lambda n:n<=1,fs:=factorint(m).values())):
                    if len(fs) > 1:
                        yield m
                    aset.add(m)
                    aqueue.append(m)
                    if f: aqueue.popleft()
                    b = lcm(*aqueue)
                    f = not f
                    while c in aset:
                        c += 1
                    break
    A354792_list = list(islice(A354792_gen(),30)) # Chai Wah Wu, Jul 17 2022
    

Extensions

More terms from Rémy Sigrist, Jul 17 2022

A355895 Even terms in A354790, divided by 2, in order of appearance.

Original entry on oeis.org

1, 3, 11, 7, 17, 41, 37, 83, 79, 109, 241, 239, 499, 491, 1117, 1109, 2539, 2531, 5623, 5591, 11471, 11467, 23369, 23357
Offset: 1

Views

Author

N. J. A. Sloane, Aug 27 2022

Keywords

Comments

The even terms in A354790 appear at indices 2, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, ... and conjecturally at indices 2^k-1 for all k >= 3.

Crossrefs

Extensions

a(16)-a(24) from Rémy Sigrist, Aug 29 2022

A355897 a(n) = index in A354790 of first nonprime term divisible by prime(n).

Original entry on oeis.org

7, 7, 14, 14, 15, 17, 29, 64, 71, 79, 119, 120, 127, 223, 239, 260, 287, 288, 319, 320, 447, 484, 511, 512, 519, 960, 967, 968, 969, 1044, 1151, 1152, 1155, 1156, 1279, 1280, 1283, 1387, 1791, 1792, 1919, 1920, 1921, 2048, 2051, 2052, 2079, 3872, 3875, 3876, 3879, 3880, 4095, 4096
Offset: 1

Views

Author

N. J. A. Sloane, Aug 28 2022

Keywords

Examples

			The first few nonprime terms in B = A354790, and their prime factors are:
    n  B(n)=p*q   p     pi(p)     q     pi(q)
    7,   6,       2,      1,      3,      2
   14,   35,      5,      3,      7,      4
   15,   22,      2,      1,      11,     5
   17,   39,      3,      2,      13,     6
   29,   85,      5,      3,      17,     7
   31,   14,      2,      1,      7,      4
   35,   33,      3,      2,      11,     5
B(14) = A354790(14) = 35 = 5*7 is the first nonprime term divisible by 5 = prime(3), therefore a(3) = 14.
		

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.

A355894 Let A354790(n) = Product_{i >= 1} prime(i)^e(i); then a(n) is the concatenation, in reverse order, of e_1, e_2, ..., ending at the exponent of the largest prime factor of A354790(n); a(1)=0 by convention.

Original entry on oeis.org

0, 1, 10, 100, 1000, 10000, 11, 100000, 1000000, 10000000, 100000000, 1000000000, 10000000000, 1100, 10001, 100000000000, 100010, 1000000000000, 10000000000000, 100000000000000, 1000000000000000, 10000000000000000, 100000000000000000, 1000000000000000000, 10000000000000000000
Offset: 0

Views

Author

N. J. A. Sloane, Aug 25 2022

Keywords

Comments

The terms of A354790 are squarefree, so here the exponents e_i are 0 or 1.
This bears the same relation to A354790 as A355893 does to A090252.

Examples

			The terms, right-justified, for comparison with A355892 and A355893, are:
   1 ...................................0
   2 ...................................1
   3 ..................................10
   4 .................................100
   5 ................................1000
   6 ...............................10000
   7 ..................................11
   8 ..............................100000
   9 .............................1000000
  10 ............................10000000
  11 ...........................100000000
  12 ..........................1000000000
  13 .........................10000000000
  14 ................................1100
  15 ...............................10001
  16 ........................100000000000
  17 ..............................100010
  18 .......................1000000000000
  19 ......................10000000000000
  20 .....................100000000000000
  21 ....................1000000000000000
  22 ...................10000000000000000
  23 ..................100000000000000000
  24 .................1000000000000000000
  ...
		

Crossrefs

A355896 Multiples of 3 in A354790, divided by 3, in order of appearance.

Original entry on oeis.org

1, 2, 13, 11, 23, 19, 59, 53, 127, 113, 277, 271, 631, 619, 1409, 1399, 1823, 3967, 3947, 8783, 8779, 18257, 18253, 25873
Offset: 1

Views

Author

N. J. A. Sloane, Aug 27 2022

Keywords

Comments

The multiples of 3 in A354790 appear at indices 3, 7, 17, 35, 71, 143, 287, 575, 1151, ... and conjecturally at indices 9*2^k-1 for all k >= 1.

Crossrefs

Extensions

a(16)-a(24) from Rémy Sigrist, Aug 29 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

A356804 a(n) is a binary encoded version of A356803(n).

Original entry on oeis.org

0, 0, 1, 3, 6, 14, 28, 31, 59, 123, 243, 499, 995, 2019, 2028, 2045, 4061, 4095, 8127, 16319, 32575, 65343, 130623, 261695, 523327, 1047615, 2095167, 4192319, 8386611, 8386679, 16775270, 16775279, 33550447, 67104879, 134213709, 134213727, 268427359, 536862815
Offset: 1

Views

Author

Michael De Vlieger, Sep 06 2022

Keywords

Comments

Let S(n) = list of forbidden primes for A354790(n); A356803(n) is the product of these primes. Then a(n) = Sum of 2^(i-1) over all prime(i) in S(n).
Conversely, if a(n) has binary expansion a(n) = Sum b(i)*2^i, b(i) = 0 or 1, then S(n) consists of {prime(i+1) such that b(i) = 1}. (After comment by N. J. A. Sloane at A354765)
Analogous to A354765.

Examples

			For n = 7 the forbidden primes are 5, 7, 11 = prime(3), prime(4) and prime(5). Their product is A356803(7) = 385. Then a(7) = 2^2 + 2^3 + 2^4 = 28.
		

Crossrefs

Programs

  • Mathematica
    Block[{s = Import["https://oeis.org/A354790/a354790.txt", "Data"][[1 ;; 25, -1]], m = 0}, Join[{0, 0}, Reap[Do[If[i > 1, m += Total[2^PrimePi@ FactorInteger[s[[i - 1]]][[All, 1]]]]; If[IntegerQ[#] && # > 0, m -= Total[2^PrimePi@ FactorInteger[s[[#]]][[All, 1]]]] &[(i - 1)/2]; Sow[m], {i, Length[s]}] ][[-1, -1, 3 ;; -1]]/2] ]
Showing 1-9 of 9 results.