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.

Previous Showing 11-19 of 19 results.

A235490 Numbers such that none of their prime factors share common 1-bits in the same bit-position and when added (or "ored" or "xored") together, yield a term of A000225 (a binary "repunit").

Original entry on oeis.org

1, 3, 7, 10, 26, 31, 58, 122, 127, 1018, 2042, 8186, 8191, 32762, 131071, 524287, 2097146, 8388602, 33554426, 1073741818, 2147483647, 2305843009213693951, 618970019642690137449562111, 39614081257132168796771975162, 162259276829213363391578010288127, 166153499473114484112975882535043066
Offset: 1

Views

Author

Antti Karttunen, Jan 22 2014

Keywords

Comments

a(1) = 1 is included on the grounds that it has no prime factors, thus A001414(1)=0, and 0 is one of the terms of A000225, marking the "repunit of length zero".
After 1, the sequence is a union of A000668 (Mersenne primes) and semiprimes of the form 2*A050415. The terms were constructed from the data given in those two entries.

Examples

			7 is included, because it is a prime, and repunit in base-2: '111'.
10 is included, as 10=2*5, and when we add 2 ('10' in binary) and 5 ('101' in binary), we also get 7 ('111' in binary), without producing any carries.
		

Crossrefs

A323394 Carryless sum of divisors of n.

Original entry on oeis.org

1, 3, 4, 7, 6, 2, 8, 5, 3, 18, 12, 18, 14, 14, 14, 11, 18, 19, 10, 32, 22, 36, 24, 30, 21, 32, 20, 36, 20, 52, 32, 43, 48, 44, 38, 51, 38, 40, 46, 70, 42, 76, 44, 74, 58, 62, 48, 84, 47, 83, 62, 88, 54, 80, 62, 80, 60, 70, 50, 48, 62, 96, 84, 7, 74, 24, 68, 6
Offset: 1

Views

Author

Rémy Sigrist, Jan 13 2019

Keywords

Comments

This sequence is a variant of A178910 for the base 10.

Examples

			For n = 42:
- the divisors of 42 are: 1, 2, 3, 6, 7, 14, 21, 42,
- the sum of the units is: 1 + 2 + 3 + 6 + 7 + 4 + 1 + 2 = 26 == 6 (mod 10),
- the sum of the tens is: 1 + 2 + 4 = 7,
- hence a(42) = 76.
For n = 973:
- the divisors of 973 are: 1, 7, 139, 973,
- the sum of the units is: 1 + 7 + 9 + 3 = 20 == 0 (mod 10),
- the sum of the tens is: 3 + 7 = 10 == 0 (mod 10),
- the sum of the hundreds is: 1 + 9 = 10 == 0 (mod 10),
- hence a(973) = 0.
		

Crossrefs

Cf. A000203, A169890, A178910, A323414 (positions of zeros), A323415 (fixed points).

Programs

  • Maple
    f:= proc(n) local t,d,dd,m,i;
    t:= Vector(convert(n,base,10));
    for d in numtheory:-divisors(n) minus {n} do
      dd:= convert(d,base,10);
      m:= nops(dd);
      t[1..m]:= t[1..m] + Vector(dd) mod 10;
    od:
    add(t[i]*10^(i-1),i=1..ilog10(n)+1)
    end proc:
    map(f, [$1..100]); # Robert Israel, Jan 15 2019
  • PARI
    a(n, base=10) = my (v=[]); fordiv (n, d, my (w=Vecrev(digits(d, base))); v=vector(max(#v, #w), k, (if (k>#v, w[k], k>#w, v[k], (v[k]+w[k])%base)))); fromdigits(Vecrev(v), base)

Formula

a(n) <= A000203(n).

A328178 a(n) is the minimal value of the expression d XOR (n/d) where d runs through the divisors of n and XOR denotes the bitwise XOR operator.

Original entry on oeis.org

0, 3, 2, 0, 4, 1, 6, 6, 0, 7, 10, 4, 12, 5, 6, 0, 16, 5, 18, 1, 4, 9, 22, 2, 0, 15, 10, 3, 28, 3, 30, 12, 8, 19, 2, 0, 36, 17, 14, 13, 40, 1, 42, 15, 12, 21, 46, 8, 0, 15, 18, 9, 52, 15, 14, 10, 16, 31, 58, 9, 60, 29, 14, 0, 8, 13, 66, 21, 20, 11, 70, 1, 72
Offset: 1

Views

Author

Rémy Sigrist, Oct 06 2019

Keywords

Examples

			For n = 12:
- we have the following values:
    d   12/d  d XOR (12/d)
    --  ----  ------------
     1    12            13
     2     6             4
     3     4             7
     4     3             7
     6     2             4
    12     1            13
- hence a(12) = min({4, 7, 13}) = 4.
		

Crossrefs

See A328176 and A328177 for similar sequences.
Cf. A178910.

Programs

  • Maple
    a:= n-> min(seq(Bits[Xor](d, n/d), d=numtheory[divisors](n))):
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 09 2019
  • Mathematica
    mvx[n_]:=Min[BitXor[#,n/#]&/@Divisors[n]]; Array[mvx,80] (* Harvey P. Dale, Nov 04 2019 *)
  • PARI
    a(n) = vecmin(apply(d -> bitxor(d, n/d), divisors(n)))

Formula

a(n) = 0 iff n is a square.
a(p) = p-1 for any odd prime number p.

A178911 Perfex numbers: n = binary XOR of divisors of n.

Original entry on oeis.org

1, 6, 120, 198, 3696, 6240, 32640, 56160, 1941408, 3592200, 8119800, 15628032, 27125280, 59032080, 61788240, 125859840, 1635834720, 2147450880, 3709081680, 16328199552, 26198072160, 52344970080, 52396088160, 209584184160, 210197601120, 236223190200, 237385437360
Offset: 1

Views

Author

Keywords

Comments

a(17) > 1e9.
10^11 < a(24) <= 209584184160. a(25) <= 210197601120. - Donovan Johnson, Mar 12 2011
a(28) > 3*10^11. - Giovanni Resta, Aug 14 2019

Crossrefs

Programs

  • Mathematica
    lst = {}; k = 1; While[k < 10^9, If[ BitXor @@ Divisors@k == k, AppendTo[lst, k]; Print@k]; k++ ]; lst (* Robert G. Wilson v, Jun 27 2010 *)
  • PARI
    xigma(n)=local(ds,r);ds=divisors(n);for(k=1,#ds,r=bitxor(r,ds[k]));r
    for(n=1,1000000000,if(xigma(n)==n,print1(n",")))

Extensions

a(17) from Robert G. Wilson v, Jul 30 2010
a(18)-a(23) from Donovan Johnson, Mar 12 2011
a(24)-a(27) from Giovanni Resta, Aug 14 2019

A293212 Binary XOR of prime divisors of n.

Original entry on oeis.org

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

Views

Author

Alex Ratushnyak, Feb 04 2018

Keywords

Comments

The sequence of indices of zeros begins: 70, 140, 280, 350, 490, 560, 646, 700, 980, 1120, 1292, 1400, 1750, 1798, 1960, 2145.

Examples

			a(6) = a(24) = 2 XOR 3 = 1.
a(2145) = 3 XOR 5 XOR 11 XOR 13 = 0.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local d, r; r:=0; for d in numtheory
          [factorset](n) do r:= Bits[Xor](r, d) od; r
        end:
    seq(a(n), n=2..100);  # Alois P. Heinz, Mar 09 2018
  • PARI
    a(n) = my(vp = factor(n)[,1]~, k=0); for (i=1, #vp, k = bitxor(k, vp[i])); k; \\ Michel Marcus, Feb 05 2018
    
  • Python
    from functools import reduce
    from operator import xor
    from sympy import primefactors
    def A293212(n): return reduce(xor,primefactors(n)) # Chai Wah Wu, Jun 03 2025

Formula

a(n) = n iff n is a prime.

A318504 SumXOR of divisors of n, up to, but not including the second largest of them A032742(n); a(1) = 0 by convention.

Original entry on oeis.org

0, 0, 0, 1, 0, 3, 0, 3, 1, 3, 0, 4, 0, 3, 2, 7, 0, 6, 0, 2, 2, 3, 0, 10, 1, 3, 2, 0, 0, 9, 0, 15, 2, 3, 4, 7, 0, 3, 2, 0, 0, 15, 0, 12, 14, 3, 0, 22, 1, 12, 2, 10, 0, 29, 4, 6, 2, 3, 0, 26, 0, 3, 12, 31, 4, 27, 0, 22, 2, 5, 0, 5, 0, 3, 8, 20, 6, 17, 0, 4, 11, 3, 0, 14, 4, 3, 2, 18, 0, 3, 6, 16, 2, 3, 4, 46, 0, 10, 0, 5, 0, 53, 0, 24, 26
Offset: 1

Views

Author

Antti Karttunen, Aug 28 2018

Keywords

Crossrefs

Programs

  • PARI
    A032742(n) = if(1==n,n,n/vecmin(factor(n)[,1]));
    A318504(n) = { my(v=0); fordiv(n,d,if(d<A032742(n), v = bitxor(v,d))); (v); };

Formula

a(n) = A032742(n) XOR A227320(n).
For n > 1, a(n) = A106409(n) XOR A178910(n).

A227443 Numbers k such that k and k+1 have the same binary XOR of divisors.

Original entry on oeis.org

6, 110, 116, 194, 198, 204, 237, 437, 452, 507, 965, 969, 986, 1011, 1736, 1748, 1808, 1824, 1896, 1971, 1989, 2021, 3696, 6230, 6243, 6533, 6875, 12974, 13736, 13764, 14567, 14790, 15720, 26625, 29516, 29715, 32102, 49251, 55686, 57489, 61329, 64440, 99780, 104247, 114738
Offset: 1

Views

Author

Alex Ratushnyak, Jul 11 2013

Keywords

Comments

n such that A178910(n+1) = A178910(n).

Crossrefs

Programs

  • Mathematica
    b[n_] := BitXor @@ Divisors[n]; b1 = 0; s = {}; Do[b2 = b[n]; If[b1 == b2, AppendTo[s, n-1]]; b1 = b2, {n, 1, 10^4}]; s (* Amiram Eldar, Sep 19 2019 *)

A331700 Binary XOR of squares of divisors of n.

Original entry on oeis.org

1, 5, 8, 21, 24, 40, 48, 85, 89, 120, 120, 168, 168, 240, 240, 341, 288, 317, 360, 504, 384, 408, 528, 680, 617, 520, 640, 1008, 840, 816, 960, 1365, 1072, 1440, 1248, 1197, 1368, 1224, 1360, 2040, 1680, 1920, 1848, 1560, 1864, 2640, 2208, 2728, 2385, 3021
Offset: 1

Views

Author

Rémy Sigrist, Jan 25 2020

Keywords

Examples

			For n = 6:
- the divisors of 6 are 1, 2, 3 and 6,
- so a(6) = 1 XOR 4 XOR 9 XOR 36 = 40.
		

Crossrefs

Programs

  • Mathematica
    Table[BitXor@@(Divisors[n]^2),{n,50}] (* Harvey P. Dale, May 03 2023 *)
  • PARI
    a(n) = my (s=0); fordiv (n, d, s=bitxor(s, d^2)); s
    
  • Python
    from functools import reduce
    from operator import xor
    from sympy import divisors
    def A331700(n): return reduce(xor,(d**2 for d in divisors(n,generator=True))) # Chai Wah Wu, Jul 01 2022

A384441 Binary XOR of n and the prime factors of n.

Original entry on oeis.org

1, 0, 0, 6, 0, 7, 0, 10, 10, 13, 0, 13, 0, 11, 9, 18, 0, 19, 0, 19, 17, 31, 0, 25, 28, 21, 24, 25, 0, 26, 0, 34, 41, 49, 33, 37, 0, 55, 41, 47, 0, 44, 0, 37, 43, 59, 0, 49, 54, 53, 33, 59, 0, 55, 57, 61, 41, 37, 0, 56, 0, 35, 59, 66, 73, 72, 0, 87, 81, 70, 0, 73, 0, 109
Offset: 1

Views

Author

Karl-Heinz Hofmann, May 30 2025

Keywords

Examples

			For n = 12 the prime factors are {2,3} -> a(12) = 12 XOR 2 XOR 3 = 13.
a(13) = 13 XOR 13 = 0.
		

Crossrefs

Programs

  • Maple
    f:= l-> `if`(l=[], 0, Bits[Xor](l[1], f(l[2..-1]))):
    a:= n-> f([n, map(i-> i[1], ifactors(n)[2])[]]):
    seq(a(n), n=1..74);  # Alois P. Heinz, May 30 2025
  • Mathematica
    a[n_] := BitXor @@ Join[{n}, FactorInteger[n][[;; , 1]]]; a[1] = 1; Array[a, 100] (* Amiram Eldar, May 30 2025 *)
  • PARI
    a(n) = my(f=factor(n)[,1]); my(b=n); for (k=1, #f, b=bitxor(b, f[k])); b; \\ Michel Marcus, May 30 2025
  • Python
    from sympy import primefactors
    def A384441(n):
        result = n
        for pf in primefactors(n): result ^= pf
        return result
    

Formula

a(n) = XOR(n,A293212(n)).
a(n) = 0 <=> n is prime.
a(2^n) = A052548(n) for n>=2.
Previous Showing 11-19 of 19 results.