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-10 of 12 results. Next

A359082 Indices of records in A246600.

Original entry on oeis.org

1, 3, 15, 63, 255, 495, 4095, 96255, 98175, 130815, 203775, 1048575, 5810175, 6455295, 16777215, 67096575, 88062975, 389656575, 553517055, 850917375, 1157349375, 9141354495, 12826279935, 22828220415, 26818379775, 31684427775, 68719476735, 242870910975, 1168231038975
Offset: 1

Views

Author

Amiram Eldar, Dec 15 2022

Keywords

Comments

Numbers k with a record number of divisors d such that the bitwise OR of k and d is equal to k (or equivalently, the bitwise AND of k and d is equal to d).
All the terms are odd since A246600(2*k) = A246600(k).
This sequence is infinite since A246600(2^m-1) = A000005(2^m-1) = A046801(m), and A046801 is unbounded (A046801(2^(m+1)) > A046801(2^m) for all m >= 0).
The corresponding record values are 1, 2, 4, 6, 8, 11, 24, 25, 28, 32, 35, 48, 56, 89, 96, 105, 121, 127, 148, 162, 216, 243, 245, 256, 319, 358, 512, 633, 768, ... .
2*10^11 < a(28) <= 2^48 - 1.

Crossrefs

Programs

  • Mathematica
    s[n_] := DivisorSum[n, 1 &, BitAnd[n, #] == # &]; seq={}; sm = 0; Do[If[(sn = s[n]) > sm, sm = sn; AppendTo[seq, n]], {n, 1, 10^6}]; seq
  • PARI
    lista(nmax) = {my(list = List(), ndmax = 0, d, s); for(n = 1, nmax, nd = sumdiv(n, d, bitand(d, n)==d); if(nd > ndmax, ndmax = nd; listput(list, n))); Vec(list)};

Extensions

a(28)-a(29) from Martin Ehrenstein, Dec 19 2022

A359080 Numbers k such that A246600(k) = A000005(k).

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 15, 17, 19, 23, 27, 29, 31, 37, 41, 43, 47, 51, 53, 59, 61, 63, 67, 71, 73, 79, 83, 85, 89, 95, 97, 101, 103, 107, 109, 111, 113, 119, 123, 125, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 173, 179, 181, 187, 191, 193, 197, 199, 211, 219
Offset: 1

Views

Author

Amiram Eldar, Dec 15 2022

Keywords

Comments

Numbers k such that for all the divisors d of k the bitwise OR of k and d is equal to k (or equivalently, the bitwise AND of k and d is equal to d).
Subsequence of A102553. Terms of A102553 that are not in this sequence: 2, 135, 175, 243, 343, ... .
All the terms are odd since if k is even and d = 1 then bitor(k, 1) > k and thus A246600(k) < A000005(k).
All the odd primes are terms.
All the numbers of the form 2^k-1 (A000225) are terms.
Numbers k such that the bitwise OR(k, d_1, d_2, ..., d_m) = k, where d_1, ..., d_m are the divisors of k. - Chai Wah Wu, Dec 18 2022

Crossrefs

Subsequence of A102553.
Subsequences: A000225, A065091.

Programs

  • Mathematica
    s[n_] := DivisorSum[n, 1 &, BitAnd[n, #] == # &]; Select[Range[250], s[#] == DivisorSigma[0, #] &]
  • PARI
    is(n) = sumdiv(n, d, bitor(d, n) == n) == numdiv(n);
    
  • Python
    from itertools import count, islice
    from operator import ior
    from functools import reduce
    from sympy import divisors
    def A359080_gen(startvalue=1):  # generator of terms >= startvalue
        return filter(
            lambda n: n | reduce(ior, divisors(n, generator=True)) == n,
            count(max(startvalue, 1)),
        )
    A359080_list = list(islice(A359080_gen(), 20))  # Chai Wah Wu, Dec 18 2022
    print(A359080_list)

A359083 Numbers k such that A246600(k) = A000005(k) and A000005(k) sets a new record.

Original entry on oeis.org

1, 3, 15, 63, 255, 891, 4095, 262143, 1048575, 16777215, 68719476735
Offset: 1

Views

Author

Amiram Eldar, Dec 15 2022

Keywords

Comments

Numbers k with a record number of divisors, such that for all the divisors d of k the bitwise OR of k and d is equal to k (or equivalently, the bitwise AND of k and d is equal to d).
All the terms are odd since all the terms of A359080 are odd.
The corresponding numbers of divisors are 1, 2, 4, 6, 8, 10, 24, 32, 48, 96, 512, ... .
a(12) > 3*10^11, if it exists.

Crossrefs

Subsequence of A359080.

Programs

  • Mathematica
    s[n_] := DivisorSum[n, 1 &, BitAnd[n, #] == # &]; seq={}; dm = 0; Do[d = DivisorSigma[0, n]; If[d > dm && d == s[n], dm = d; AppendTo[seq, n]], {n, 1, 2*10^7}]; seq
  • PARI
    lista(nmax) = {my(list = List(), ndmax = 0, d, s); for(n = 1, nmax, nd = numdiv(n); if(nd > ndmax && sumdiv(n, d, bitand(d, n)==d) == nd, ndmax = nd; listput(list, n))); Vec(list)};

A359081 a(n) is the least number k such that A246600(k) = n, and -1 if no such k exists.

Original entry on oeis.org

1, 3, 39, 15, 175, 63, 1275, 255, 1215, 891, 495, 6975, 14175, 26367, 13311, 8127, 20475, 42735, 95931, 69615, 36855, 24255, 404415, 4095, 96255, 423423, 253935, 98175, 913275, 165375, 507375, 130815, 3198975, 1576575, 203775, 2154495, 4398975, 1616895, 1556415
Offset: 1

Views

Author

Amiram Eldar, Dec 15 2022

Keywords

Comments

All the terms are odd since A246600(2*k) = A246600(k).

Crossrefs

Programs

  • Mathematica
    seq[nmax_, kmax_] := Module[{s = Table[0, {nmax}], c = 0, k = 1, i}, While[c < nmax && k < kmax, i = DivisorSum[k, 1 &, BitOr[#, k] == k &]; If[i <= nmax && s[[i]] == 0, c++; s[[i]] = k]; k++]; s]; seq[20, 5*10^6]
  • PARI
    lista(nmax, kmax=oo) = {my(s = vector(nmax), c = 0, k = 1, i); while(c < nmax && k < kmax, i = sumdiv(k, d, bitor(d, k) == k); if(i <= nmax && s[i] == 0, c++; s[i] = k); k++); s};

A361937 Numbers k with record values of the ratio A000005(k)/A246600(k) between the total number of divisors of k and the number of divisors d of k such that the bitwise OR of k and d is equal to k.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 336, 420, 840, 1680, 3360, 6720, 7560, 15120, 30240, 60480, 95760, 120960, 176400, 191520, 257040, 352800, 383040, 514080, 1028160, 1681680, 2056320, 2998800, 3112200, 5525520, 5997600, 6224400, 8353800, 12448800, 16216200, 24897600
Offset: 1

Views

Author

Amiram Eldar, Mar 31 2023

Keywords

Comments

This sequence is infinite since the ratio A000005(k)/A246600(k) is unbounded. For example, if k = 2^m then A000005(k)/A246600(k) = m+1.
All the terms except for 1 are in A355670.

Examples

			The ratios A000005(k)/A246600(k) for k = 1, 2, 3 and 4 are 1, 2, 1 and 3. The record values, 1, 2 and 3, occur at 1, 2 and 4, the first 3 terms of this sequence.
		

Crossrefs

Programs

  • Mathematica
    r[n_] := DivisorSigma[0,n]/DivisorSum[n, Boole[BitOr[#, n] == n] &];
    seq[kmax_] := Module[{rm = 0, k = 1, s = {}, r1}, Do[r1 = r[k]; If[r1 > rm, rm = r1; AppendTo[s, k]], {k, 1 , kmax}]; s]; seq[10^6]
  • PARI
    r(n) = numdiv(n)/sumdiv(n, d, bitor(d, n) == n);
    lista(kmax) = {my(rm = 0, r1); for(k = 1, kmax, r1 = r(k); if(r1 > rm, rm = r1; print1(k, ", "))); }

A363690 Numbers k such that A246600(k) = 2.

Original entry on oeis.org

3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 31, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 52, 53, 56, 57, 58, 59, 61, 62, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 79, 80, 81, 82, 83, 84, 86, 88
Offset: 1

Views

Author

Amiram Eldar, Jun 16 2023

Keywords

Comments

A subsequence of A080943 and first differs from it at n = 42: A080943(42) = 55 is not a term of this sequence.
Numbers k such that A246600(k) = 1 are the powers of 2 (A000079).
Numbers k that have exactly 2 divisors d such that the bitwise AND of k and d is equal to d, or equivalently, the bitwise OR of k and d is equal to k. These two divisors are k and the highest power of 2 dividing k, A006519(k).
Includes all the even squarefree semiprimes (i.e., the odd primes doubled, A100484 \ {4}).
If k is a term then 2*k is also a term. The primitive terms are the odd terms of this sequence, A363691.
The numbers of terms not exceeding 10^k, for k = 1, 2, ..., are 6, 76, 681, 6268, 60002, 587247, 5811449, 57817051, 576781821, 5761341533, 57583082392, 575687822743, ... . Apparently, the asymptotic density of this sequence exists and equals 0.575... .

Crossrefs

Programs

  • Mathematica
    q[n_] := DivisorSum[n, Boole[BitOr[#, n] == n] &] == 2; Select[Range[100], q]
  • PARI
    is(n) = sumdiv(n, d, bitor(d, n) == n) == 2;
    
  • Python
    from itertools import count, islice
    from sympy import divisors
    def A363690_gen(startvalue=2): # generator of terms >= startvalue
        return filter(lambda n:(m:=n&-n)!=n and all(d==m or d==n or n|d!=n for d in divisors(n,generator=True)),count(max(startvalue,2)))
    A363690_list = list(islice(A363690_gen(),20)) # Chai Wah Wu, Jun 20 2023

A363691 Odd numbers k such that A246600(k) = 2.

Original entry on oeis.org

3, 5, 7, 9, 11, 13, 17, 19, 21, 23, 25, 29, 31, 33, 35, 37, 41, 43, 47, 49, 53, 57, 59, 61, 65, 67, 69, 71, 73, 77, 79, 81, 83, 89, 91, 93, 97, 101, 103, 105, 107, 109, 113, 115, 117, 121, 127, 129, 131, 133, 137, 139, 141, 145, 149, 151, 155, 157, 161, 163, 167
Offset: 1

Views

Author

Amiram Eldar, Jun 16 2023

Keywords

Comments

Odd numbers k that have exactly 2 divisors d such that the bitwise AND of k and d is equal to d, or equivalently, the bitwise OR of k and d is equal to k. These two divisors are 1 and k.
The terms of this sequence are the primitive terms of A363690: If m is a term, then 2^k*m is a term of A363690 for all k >= 0.
Includes all the odd primes (A065091), and all the squares of odd primes (A001248 \ {4}).

Crossrefs

Programs

  • Mathematica
    q[n_] := DivisorSum[n, Boole[BitOr[#, n] == n] &] == 2; Select[Range[1, 200, 2], q]
  • PARI
    is(n) = n % 2 && sumdiv(n, d, bitor(d, n) == n) == 2;
    
  • Python
    from itertools import count, islice
    from sympy import divisors
    def A363691_gen(startvalue=3): # generator of terms >= startvalue
        return filter(lambda n:all(d==1 or d==n or n|d!=n for d in divisors(n,generator=True)),count(max(startvalue,3)|1,2))
    A363691_list = list(islice(A363691_gen(),20)) # Chai Wah Wu, Jun 20 2023

A355670 Numbers k such that A246600(k) < A000005(k).

Original entry on oeis.org

2, 4, 6, 8, 9, 10, 12, 14, 16, 18, 20, 21, 22, 24, 25, 26, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 49, 50, 52, 54, 55, 56, 57, 58, 60, 62, 64, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 84, 86, 87, 88, 90, 91, 92, 93, 94, 96
Offset: 1

Views

Author

Chai Wah Wu, Dec 19 2022

Keywords

Comments

Numbers k such that bitwise OR(k, d_1, d_2, ... d_m) > k where d_1, ..., d_m are the divisors of k.
Complement of A359080.
First 21 terms coincide with A336376.
A102554 is a subsequence; this sequence contains 1, 135, 175, 243, 343, 351, 363, ... which are not in A102554.

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from operator import ior
    from functools import reduce
    from sympy import divisors
    def A355670_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:n|reduce(ior,divisors(n,generator=True))>n,count(max(startvalue,1)))
    A355670_list = list(islice(A355670_gen(), 20))

A359411 a(n) is the number of divisors of n that are both infinitary and exponential.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Amiram Eldar, Dec 30 2022

Keywords

Comments

First differs from A318672 and A325989 at n = 32.
If e > 0 is the exponent of the highest power of p dividing n (where p is a prime), then for each divisor d of n that is both an infinitary and an exponential divisor, the exponent of the highest power of p dividing d is a number k such that k | e and the bitwise AND of e and k is equal to k.
The least term that is higher than 2 is a(216) = 4.
The position of the first appearance of a prime p in this sequence is 2^A359081(p), if A359081(p) > -1. E.g., 2^39 = 549755813888 for p = 3, 2^175 = 4.789...*10^52 for p = 5, and 2^1275 = 6.504...*10^383 for p = 7.
This sequence is unbounded since A246600 is unbounded (see A359082).

Examples

			a(8) = 2 since 8 has 2 divisors that are both infinitary and exponential: 2 and 8.
		

Crossrefs

Programs

  • Mathematica
    s[n_] := DivisorSum[n, 1 &, BitAnd[n, #] == # &]; f[p_, e_] := s[e]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    s(n) = sumdiv(n, d, bitand(d, n)==d);
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, s(f[i,2]));}
    
  • Python
    from math import prod
    from sympy import divisors, factorint
    def A359411(n): return prod(sum(1 for d in divisors(e,generator=True) if e|d == e) for e in factorint(n).values()) # Chai Wah Wu, Sep 01 2023

Formula

Multiplicative with a(p^e) = A246600(e).
a(n) = 1 if and only if n is in A138302.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Product_{p prime} (1 + Sum_{k>=1} A246600(k)/p^k) = 1.135514937... .

A246601 Sum of divisors d of n with property that the binary representation of d can be obtained from the binary representation of n by changing any number of 1's to 0's.

Original entry on oeis.org

1, 2, 4, 4, 6, 8, 8, 8, 10, 12, 12, 16, 14, 16, 24, 16, 18, 20, 20, 24, 22, 24, 24, 32, 26, 28, 40, 32, 30, 48, 32, 32, 34, 36, 36, 40, 38, 40, 43, 48, 42, 44, 44, 48, 60, 48, 48, 64, 50, 52, 72, 56, 54, 80, 61, 64, 58, 60, 60, 96, 62, 64, 104, 64, 66, 68, 68, 72, 70, 72
Offset: 1

Views

Author

N. J. A. Sloane, Sep 06 2014

Keywords

Comments

Equivalently, the sum of the divisors d of n such that the bitwise OR of d and n is equal to n. - Chai Wah Wu, Sep 06 2014
Equivalently, the sum of the divisors d of n such that the bitwise AND of n and d is equal to d. - Amiram Eldar, Dec 15 2022

Examples

			12 = 1100_2; only the divisors 4 = 0100_2 and 12 = 1100_2 satisfy the condition, so(12) = 4+12 = 16.
15 = 1111_2; all divisors 1,3,5,15 satisfy the condition, so a(15)=24.
		

Crossrefs

Programs

  • Maple
    with(numtheory);
    sd:=proc(n) local a,d,s,t,i,sw;
    s:=convert(n,base,2);
    a:=0;
    for d in divisors(n) do
    sw:=-1;
    t:=convert(d,base,2);
    for i from 1 to nops(t) do if t[i]>s[i] then sw:=1; fi; od:
    if sw<0 then a:=a+d; fi;
    od;
    a;
    end;
    [seq(sd(n),n=1..100)];
  • Mathematica
    a[n_] := DivisorSum[n, #*Boole[BitOr[#, n] == n] &]; Array[a, 100] (* Jean-François Alcover, Dec 02 2015, adapted from PARI *)
  • PARI
    a(n) = sumdiv(n, d, d*(bitor(n,d)==n)); \\ Michel Marcus, Sep 07 2014
  • Python
    from sympy import divisors
    def A246601(n):
        return sum(d for d in divisors(n) if n|d == n)
    # Chai Wah Wu, Sep 06 2014
    

Formula

a(2^i) = 2^i.
a(odd prime p) = p+1.
From Amiram Eldar, Dec 15 2022: (Start)
a(2*n) = 2*a(n), and therefore a(m*2^k) = 2^k*a(m) for m odd and k>=0.
a(2^n-1) = sigma(2^n-1) = A075708(n). (End)
a(n) = Sum_{d|n} d*(binomial(n,d) mod 2). - Ridouane Oudra, Apr 09 2025
Showing 1-10 of 12 results. Next