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

A354757 a(n) = Sum_{k = ceiling(n/2)..n-1} A354169(k).

Original entry on oeis.org

0, 0, 1, 2, 6, 12, 15, 27, 59, 115, 127, 252, 508, 1004, 1021, 2013, 2047, 4031, 8127, 16307, 16375, 32631, 32767, 65279, 130815, 261375, 262143, 524270, 1048558, 2096110, 2097135, 4194253, 4194271, 8386527, 8388607, 16773119, 33550335, 67096575, 67108863
Offset: 0

Views

Author

Rémy Sigrist, Jun 06 2022

Keywords

Comments

The 1's in the binary expansion of a(n) are forbidden in that of A354169(n). In other words, a(n) AND A354169(n) = 0 (where AND denotes the bitwise AND operator).

Examples

			a(5) = A354169(3) + A354169(4) = 4 + 8 = 12.
a(7) = A354169(4) + A354169(5) + A354169(6) = 8 + 3 + 16 = 27.
		

Crossrefs

A354780 is a bisection.

Programs

  • PARI
    See Links section.
    
  • Python
    from itertools import count, islice
    from collections import deque
    from functools import reduce
    from operator import or_
    def A354757_gen(): # generator of terms
        aset, aqueue, b, f = {0,1,2}, deque([2]), 2, False
        yield from (0,0,1)
        while True:
            for k in count(1):
                m, j, j2, r, s = 0, 0, 1, b, k
                while r > 0:
                    r, q = divmod(r,2)
                    if not q:
                        s, y = divmod(s,2)
                        m += y*j2
                    j += 1
                    j2 *= 2
                if s > 0:
                    m += s*2**b.bit_length()
                if m not in aset:
                    yield sum(aqueue)
                    aset.add(m)
                    aqueue.append(m)
                    if f: aqueue.popleft()
                    b = reduce(or_,aqueue)
                    f = not f
                    break
    A354757_list = list(islice(A354757_gen(),40)) # Chai Wah Wu, Jun 06 2022

A355057 a(n) = product of prohibited prime factors of A090252(n).

Original entry on oeis.org

1, 1, 2, 6, 15, 30, 70, 210, 462, 6006, 51051, 102102, 277134, 6374082, 10623470, 223092870, 588153930, 18232771830, 51893273670, 2127624220470, 5381637734130, 252936973504110, 6702829797858915, 13405659595717830, 41628100849860630, 2539314151841498430, 7397132529277408470
Offset: 1

Views

Author

Michael De Vlieger, Jun 16 2022

Keywords

Comments

Let s(n) = A090252(n) and let K(n) = A007947(n) = squarefree kernel of n.
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. - N. J. A. Sloane, Jun 17 2022

Examples

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

Crossrefs

See A354758 for another version.
A354765 is a binary encoding.

Programs

  • Maple
    # To get first M terms, from N. J. A. Sloane, Jun 18 2022
    with(numtheory);
    M:=20; ans:=[1,1,2];
    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:
    t2 := product(S[k], k = 1..nops(S));
    ans:=[op(ans),t2];
    od:
    ans;
  • Mathematica
    Block[{s = Import["https://oeis.org/A090252/b090252.txt", "Data"][[1 ;; 120, -1]], m = 1}, 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]] ]
  • Python
    from math import prod, lcm, gcd
    from itertools import count, islice
    from collections import deque
    from sympy import primefactors
    def A355057_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:
                    yield prod(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
    A355057_list = list(islice(A355057_gen(),20)) # Chai Wah Wu, Jun 18 2022

Formula

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

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

A354781 If the binary expansion of A354780(n) is 1 d_1 d_2 ... d_k, then the binary expansion of a(n) is c_1 c_2 ... c_k, where c_i = 1 - d_i.

Original entry on oeis.org

1, 3, 4, 12, 3, 19, 34, 64, 76, 136, 256, 768, 17, 1041, 50, 2080, 4096, 12288, 68, 16452, 200, 32896, 65536, 196608, 768, 262912, 524800, 1048576, 1049601, 2098176, 18, 4194322, 2096, 8390656, 16777216, 50331648, 12288, 67121152, 134225920, 268435456, 268451844, 536887296, 72, 1073741896, 32960, 2147516416, 4294967296, 12884901888
Offset: 1

Views

Author

N. J. A. Sloane, Jul 05 2022

Keywords

Examples

			See A354780.
		

Crossrefs

Showing 1-4 of 4 results.