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 19 results. Next

A227843 Numbers n such that the binary XOR of the divisors of n (A178910(n)) is a binary repunit (A000225).

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 2592, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 2458624, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592
Offset: 1

Views

Author

Alex Ratushnyak, Jul 06 2013

Keywords

Comments

These are also numbers n such that A178910(n) >= A178910(i) for all i
All powers of 2 are in the sequence. Terms that are not 2^x are 2592 and 2458624. No other non-2^x terms below 2^35.

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Union@ IntegerDigits[ Fold[ BitXor[#1, #2] &, 0, Divisors@ n], 2] == {1}; Select[ Range@ 1000000000, fQ] (* Robert G. Wilson v, Aug 22 2013 *)

A226643 Numbers n such that the binary XOR of the divisors of n (A178910) is a binary palindrome (A006995) and not a power of 2 (A000079).

Original entry on oeis.org

81, 162, 169, 324, 338, 648, 676, 1296, 1352, 2401, 2592, 2704, 3249, 4802, 5184, 5408, 6498, 9604, 10368, 10816, 12996, 19208, 20736, 21632, 25992, 38416, 41472, 43264, 51984, 76832, 82944, 86528, 103968, 112225, 153664, 165888, 173056, 194481
Offset: 1

Author

Robert G. Wilson v, Aug 18 2013

Keywords

Comments

A takeoff of A227843.

Crossrefs

Programs

  • Mathematica
    f[n_] := Fold[ BitXor[#1, #2] &, 0, Divisors@ n]; palQ[n_Integer, base_Integer] := Module[{idn = IntegerDigits[n, base]}, idn == Reverse@ idn]; fQ[n_] := palQ[ f@ n, 2] && ! IntegerQ@ Log2@ n; Select[ Range@ 200000, fQ]

A028982 Squares and twice squares.

Original entry on oeis.org

1, 2, 4, 8, 9, 16, 18, 25, 32, 36, 49, 50, 64, 72, 81, 98, 100, 121, 128, 144, 162, 169, 196, 200, 225, 242, 256, 288, 289, 324, 338, 361, 392, 400, 441, 450, 484, 512, 529, 576, 578, 625, 648, 676, 722, 729, 784, 800, 841, 882, 900, 961, 968, 1024
Offset: 1

Keywords

Comments

Numbers n such that sum of divisors of n (A000203) is odd.
Also the numbers with an odd number of run sums (trapezoidal arrangements, number of ways of being written as the difference of two triangular numbers). - Ron Knott, Jan 27 2003
Pell(n)*Sum_{k|n} 1/Pell(k) is odd, where Pell(n) is A000129(n). - Paul Barry, Oct 12 2005
Number of odd divisors of n (A001227) is odd. - Vladeta Jovovic, Aug 28 2007
A071324(a(n)) is odd. - Reinhard Zumkeller, Jul 03 2008
Sigma(a(n)) = A000203(a(n)) = A152677(n). - Jaroslav Krizek, Oct 06 2009
Numbers n such that sum of odd divisors of n (A000593) is odd. - Omar E. Pol, Jul 05 2016
A187793(a(n)) is odd. - Timothy L. Tiffin, Jul 18 2016
If k is odd (k = 2m+1 for m >= 0), then 2^k = 2^(2m+1) = 2*(2^m)^2. If k is even (k = 2m for m >= 0), then 2^k = 2^(2m) = (2^m)^2. So, the powers of 2 sequence (A000079) is a subsequence of this one. - Timothy L. Tiffin, Jul 18 2016
Numbers n such that A175317(n) = Sum_{d|n} pod(d) is odd, where pod(m) = the product of divisors of m (A007955). - Jaroslav Krizek, Dec 28 2016
Positions of zeros in A292377 and A292383, positions of ones in A286357 and A292583. (See A292583 for why.) - Antti Karttunen, Sep 25 2017
Numbers of the form A000079(i)*A016754(j), i,j>=0. - R. J. Mathar, May 30 2020
Equivalently, numbers whose odd part is square. Cf. A042968. - Peter Munn, Jul 14 2020
These are the Heinz numbers of the partitions counted by A119620. - Gus Wiseman, Oct 29 2021
Numbers m whose abundance, A033880(m), is odd. - Peter Munn, May 23 2022
Numbers with an odd number of middle divisors (cf. A067742). - Omar E. Pol, Aug 02 2022

Crossrefs

Complement of A028983.
Characteristic function is A053866, A093709.
Odd terms in A178910.
Supersequence of A000079.

Programs

  • Haskell
    import Data.List.Ordered (union)
    a028982 n = a028982_list !! (n-1)
    a028982_list = tail $ union a000290_list a001105_list
    -- Reinhard Zumkeller, Jun 27 2015
    
  • Mathematica
    Take[ Sort[ Flatten[ Table[{n^2, 2n^2}, {n, 35}] ]], 57] (* Robert G. Wilson v, Aug 27 2004 *)
  • PARI
    list(lim)=vecsort(concat(vector(sqrtint(lim\1),i,i^2), vector(sqrtint(lim\2),i,2*i^2))) \\ Charles R Greathouse IV, Jun 16 2011
    
  • Python
    from itertools import count, islice
    from sympy.ntheory.primetest import is_square
    def A028982_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:int(is_square(n) or is_square(n<<1)),count(max(startvalue,1)))
    A028982_list = list(islice(A028982_gen(),30)) # Chai Wah Wu, Jan 09 2023
    
  • Python
    from math import isqrt
    def A028982(n):
        def f(x): return n-1+x-isqrt(x)-isqrt(x>>1)
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 22 2024

Formula

a(n) is asymptotic to c*n^2 with c = 2/(1+sqrt(2))^2 = 0.3431457.... - Benoit Cloitre, Sep 17 2002
In particular, a(n) = c*n^2 + O(n). - Charles R Greathouse IV, Jan 11 2013
a(A003152(n)) = n^2; a(A003151(n)) = 2*n^2. - Enrique Pérez Herrero, Oct 09 2013
Sum_{n>=1} 1/a(n) = Pi^2/4. - Amiram Eldar, Jun 28 2020

A028983 Numbers whose sum of divisors is even.

Original entry on oeis.org

3, 5, 6, 7, 10, 11, 12, 13, 14, 15, 17, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80, 82
Offset: 1

Keywords

Comments

The even terms of this sequence are the even terms appearing in A178910. [Edited by M. F. Hasler, Oct 02 2014]
A071324(a(n)) is even. - Reinhard Zumkeller, Jul 03 2008
Sigma(a(n)) = A000203(a(n)) = A152678(n). - Jaroslav Krizek, Oct 06 2009
A083207 is a subsequence. - Reinhard Zumkeller, Jul 19 2010
Numbers k such that the number of odd divisors of k (A001227) is even. - Omar E. Pol, Apr 04 2016
Numbers k such that the sum of odd divisors of k (A000593) is even. - Omar E. Pol, Jul 05 2016
Numbers with a squarefree part greater than 2. - Peter Munn, Apr 26 2020
Equivalently, numbers whose odd part is nonsquare. Compare with the numbers whose square part is even (i.e., nonodd): these are the positive multiples of 4, A008586\{0}, and A225546 provides a self-inverse bijection between the two sets. - Peter Munn, Jul 19 2020
Also numbers whose reversed prime indices have alternating product > 1, where we define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)). Also Heinz numbers of the partitions counted by A347448. - Gus Wiseman, Oct 29 2021
Numbers whose number of middle divisors is not odd (cf. A067742). - Omar E. Pol, Aug 02 2022

Crossrefs

The complement is A028982 = A000290 U A001105.
Subsequences: A083207, A091067, A145204\{0}, A225838, A225858.
Cf. A334748 (a permutation).
Related to A008586 via A225546.
Ranks the partitions counted by A347448, complement A119620.

Programs

  • Mathematica
    Select[Range[82],EvenQ[DivisorSigma[1,#]]&] (* Jayanta Basu, Jun 05 2013 *)
  • PARI
    is(n)=!issquare(n)&&!issquare(n/2) \\ Charles R Greathouse IV, Jan 11 2013
    
  • Python
    from math import isqrt
    def A028983(n):
        def f(x): return n-1+isqrt(x)+isqrt(x>>1)
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 22 2024

Formula

a(n) ~ n. - Charles R Greathouse IV, Jan 11 2013
a(n) = n + (1 + sqrt(2)/2)*sqrt(n) + O(1). - Charles R Greathouse IV, Sep 01 2015
A007913(a(n)) > 2. - Peter Munn, May 05 2020

A295901 Unique sequence satisfying SumXOR_{d divides n} a(d) = n^2 for any n > 0, where SumXOR is the analog of summation under the binary XOR operation.

Original entry on oeis.org

1, 5, 8, 20, 24, 40, 48, 80, 88, 120, 120, 160, 168, 240, 240, 320, 288, 312, 360, 480, 384, 408, 528, 640, 616, 520, 648, 960, 840, 816, 960, 1280, 1072, 1440, 1248, 1248, 1368, 1224, 1360, 1920, 1680, 1920, 1848, 1632, 1872, 2640, 2208, 2560, 2384, 3016
Offset: 1

Author

Rémy Sigrist, Nov 29 2017

Keywords

Comments

This sequence is a variant of A256739; both sequences have nice graphical features.
Replacing "SumXOR" by "Sum" in the name leads to the Jordan function J_2 (A007434).
For any sequence f of nonnegative integers with positive indices:
- let x_f be the unique sequence satisfying SumXOR_{d divides n} x_f(d) = f(n) for any n > 0,
- in particular, x_A000027 = A256739 and x_A000290 = a (this sequence),
- also, x_A178910 = A000027 and x_A055895 = A000079,
- see the links section for a gallery of x_f plots for some classic f functions,
- x_f(1) = f(1),
- x_f(p) = f(1) XOR f(p) for any prime p,
- x_f(n) = SumXOR_{d divides n and n/d is squarefree} f(d) for any n > 0,
- the function x: f -> x_f is a bijection,
- A000004 is the only fixed point of x (i.e. x_f = f if and only if f = A000004),
- for any sequence f, x_{2*f} = 2 * x_f,
- for any sequences g and f, x_{g XOR f} = x_g XOR x_f.
From Antti Karttunen, Dec 29 2017: (Start)
The transform x_f described above could be called "Xor-Moebius transform of f" because of its analogous construction to Möbius transform with A008683 replaced by A008966 and the summation replaced by cumulative XOR.
(End)

Programs

  • PARI
    a(n{, f=k->k^2}) = my (v=0); fordiv(n,d,if (issquarefree(n/d), v=bitxor(v,f(d)))); return (v)

Formula

a(n) = SumXOR_{d divides n and n/d is squarefree} d^2.

A072594 In prime factorization of n replace multiplication with bitwise logical 'xor'.

Original entry on oeis.org

1, 2, 3, 0, 5, 1, 7, 2, 0, 7, 11, 3, 13, 5, 6, 0, 17, 2, 19, 5, 4, 9, 23, 1, 0, 15, 3, 7, 29, 4, 31, 2, 8, 19, 2, 0, 37, 17, 14, 7, 41, 6, 43, 11, 5, 21, 47, 3, 0, 2, 18, 13, 53, 1, 14, 5, 16, 31, 59, 6, 61, 29, 7, 0, 8, 10, 67, 17, 20, 0, 71, 2, 73, 39, 3, 19, 12, 12, 79, 5, 0, 43, 83, 4
Offset: 1

Author

Reinhard Zumkeller, Jun 23 2002

Keywords

Comments

n is prime iff a(n)=n;
for primes p, k>0: a(p^k)=p*(k mod 2);
for m>1: a(m^2)=0, see A072595.
a(A127812(n)) = n and a(m) <> n for m < A127812(n).

Examples

			a(35) = a(5*7) = a(5) 'xor' a(7) = '101' xor '111' = '010' = 2.
		

Crossrefs

Programs

  • Haskell
    import Data.Bits (xor)
    a072594 = foldl1 xor . a027746_row :: Integer -> Integer
    -- Reinhard Zumkeller, Nov 17 2012
    
  • Mathematica
    a[n_] := BitXor @@ Flatten[ Table[ First[#], {Last[#]} ]& /@ FactorInteger[n] ]; Table[a[n], {n, 1, 84}] (* Jean-François Alcover, Mar 11 2013 *)
  • PARI
    a(n)=if(n==1, return(1)); my(f=factor(n),t); for(i=1,#f~, if(f[i,2]%2, t=bitxor(t,f[i,1]))); t \\ Charles R Greathouse IV, Aug 28 2016
    
  • Python
    from sympy import factorint
    from operator import _xor_
    from functools import reduce
    def a(n): return reduce(_xor_, (f for f in factorint(n, multiple=True))) if n > 1 else 1
    print([a(n) for n in range(1, 85)]) # Michael S. Branicky, May 31 2025

A169813 a(n) = n XOR sigma(n), where sigma(n) is the number of divisors of n, A000203.

Original entry on oeis.org

0, 1, 7, 3, 3, 10, 15, 7, 4, 24, 7, 16, 3, 22, 23, 15, 3, 53, 7, 62, 53, 50, 15, 36, 6, 48, 51, 36, 3, 86, 63, 31, 17, 20, 19, 127, 3, 26, 31, 114, 3, 74, 7, 120, 99, 102, 31, 76, 8, 111, 123, 86, 3, 78, 127, 64, 105, 96, 7, 148, 3, 94, 87, 63, 21, 210, 7, 58, 37, 214, 15, 139, 3, 56
Offset: 1

Author

N. J. A. Sloane, May 28 2010

Keywords

Programs

A227320 Binary XOR of proper divisors of n.

Original entry on oeis.org

0, 1, 1, 3, 1, 0, 1, 7, 2, 6, 1, 2, 1, 4, 7, 15, 1, 15, 1, 8, 5, 8, 1, 6, 4, 14, 11, 14, 1, 6, 1, 31, 9, 18, 3, 21, 1, 16, 15, 20, 1, 26, 1, 26, 1, 20, 1, 14, 6, 21, 19, 16, 1, 6, 15, 26, 17, 30, 1, 4, 1, 28, 25, 63, 9, 58, 1, 52, 21, 38, 1, 33, 1, 38, 17, 50, 13, 54, 1
Offset: 1

Author

Alex Ratushnyak, Jul 06 2013

Keywords

Comments

An alternative definition (with A027751) would define a(1)=1. - R. J. Mathar, Jul 14 2013
However, this definition is more aligned with A001065 and A218403 where the initial term a(1) is also 0. - Antti Karttunen, Oct 08 2017

Programs

  • Mathematica
    Array[BitXor @@ Most@ Divisors@ # &, 79] (* Michael De Vlieger, Oct 08 2017 *)
  • PARI
    A227320(n) = { my(s=0); fordiv(n,d,if(dAntti Karttunen, Oct 08 2017

Formula

a(n) = A178910(n) XOR n, where XOR is the binary logical exclusive or operator.
From Antti Karttunen, Oct 08 2017: (Start)
a(n) = A248663(A293214(n)).
a(n) <= A218403(n) <= A001065(n).
(End)

A178908 GF(2) sum of divisors of n.

Original entry on oeis.org

1, 3, 2, 7, 7, 6, 6, 15, 12, 9, 10, 14, 12, 10, 8, 31, 25, 20, 18, 21, 19, 30, 24, 30, 24, 20, 18, 18, 20, 24, 30, 63, 60, 43, 40, 36, 36, 54, 54, 45, 40, 53, 48, 54, 48, 40, 46, 62, 60, 40, 42, 36, 36, 54, 54, 34, 36, 60, 58, 56, 60, 34, 38, 127, 121, 68, 66, 79, 79, 120, 120
Offset: 1

Author

Keywords

Comments

Take the n-th GF(2) polynomial, compute its sum of divisors, and find the index of that polynomial in the list of GF(2) polynomials.
If 2^k <= n < 2^(k+1), then also 2^k <= a(n) < 2^(k+1), since any proper divisor of a GF(2) polynomial has lower degree.
Numbers whose binary representations correspond to the divisors occur as the nonzero terms on row n of A280499, and they are XORed together to obtain a(n). A280493 gives another GF(2)[X]-analog of A000203. - Antti Karttunen, Jan 11 2017

Examples

			5 => x^2 + 1 = (x+1)^2. sigma((x+1)^2) = (x+1)^2 + x+1 + 1 = x^2 + x + 1 => 7, so a(5) = 7. (All polynomials here are over GF(2).)
		

Programs

  • PARI
    a(n)={local(p,fm,r,k);
    while(n>0,p+=Mod(n,2)*x^k;n\=2;k++);
    r=Mod(1,2);fm=factor(p);for(k=1,matsize(fm)[1],r*=(fm[k,1]^(fm[k,2]+1)-1)/(fm[k,1]-1));
    subst(lift(r),x,2)}
    
  • PARI
    a(n) = {my(s = vecsum(divisors(Mod(1,2)*Pol(binary(n))))); subst(lift(s), x, 2);} \\ Michel Marcus, Jan 13 2019
    
  • Scheme
    ;; A003987bi implements the 2-argument bitwise-XOR function (A003987).
    ;; A091255bi implements the 2-argument GF(2)[X] GCD-function (A091255) which is used for checking that k is a divisor of n.
    (define (A178908 n) (let loop ((k n) (s 0)) (if (zero? k) s (loop (- k 1) (A003987bi s (if (= k (A091255bi n k)) k 0))))))
    ;; Antti Karttunen, Jan 11 2017

Formula

For all n >= 0, a(2^n) = A000203(2^n) = A280493(2^n) = A000225(1+n). - Antti Karttunen, Jan 11 2017

A296207 Xor-Moebius transform of A227320, binary XOR of proper divisors of n.

Original entry on oeis.org

0, 1, 1, 2, 1, 0, 1, 4, 3, 6, 1, 0, 1, 4, 7, 8, 1, 12, 1, 12, 5, 8, 1, 0, 5, 14, 9, 8, 1, 6, 1, 16, 9, 18, 3, 24, 1, 16, 15, 24, 1, 26, 1, 16, 5, 20, 1, 0, 7, 22, 19, 28, 1, 0, 15, 16, 17, 30, 1, 12, 1, 28, 31, 32, 9, 58, 1, 36, 21, 38, 1, 48, 1, 38, 19, 32, 13, 54, 1, 48, 27, 42, 1, 52, 21, 40, 31, 32, 1, 34, 11, 40, 29, 44, 23, 0, 1
Offset: 1

Author

Antti Karttunen, Dec 25 2017

Keywords

Comments

Unique sequence satisfying SumXOR_{d divides n} a(d) = A227320(n) for all n > 0, where SumXOR is the analog of summation under the binary XOR operation. See A295901 for a list of some of the properties of Xor-Moebius transform.

Crossrefs

Cf. A297107 (positions of zeros).

Programs

  • PARI
    A227320(n) = { my(s=0); fordiv(n,d,if(dA296207(n) = { my(v=0); fordiv(n, d, if(issquarefree(n/d), v=bitxor(v, A227320(d)))); (v); } \\ after code in A295901.

Formula

a(n) = n XOR A256739(n), where XOR is the bitwise XOR-operation (A003987).
Showing 1-10 of 19 results. Next