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 10 results.

A334866 a(0) = 1, and then after, a(2n) = a(n)^2, a(2n+1) = A334747(a(n)).

Original entry on oeis.org

1, 2, 4, 3, 16, 8, 9, 6, 256, 32, 64, 12, 81, 18, 36, 5, 65536, 512, 1024, 48, 4096, 128, 144, 24, 6561, 162, 324, 27, 1296, 72, 25, 10, 4294967296, 131072, 262144, 768, 1048576, 2048, 2304, 96, 16777216, 8192, 16384, 192, 20736, 288, 576, 20, 43046721, 13122, 26244, 243, 104976, 648, 729, 54, 1679616, 2592, 5184, 108, 625, 50, 100, 15
Offset: 0

Views

Author

Antti Karttunen, Jun 08 2020

Keywords

Comments

This irregular table can be represented as a binary tree. Each child to the left is obtained by squaring the parent, and each child to the right is obtained by applying A334747 to the parent:
1
|
...................2...................
4 3
16......../ \........8 9......../ \........6
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
256 32 64 12 81 18 36 5
65536 512 1024 48 4096 128 144 24 6561 162 324 27 1296 72 25 10
etc.
This is the mirror image of the tree in A334860.

Crossrefs

Cf. A334865 (inverse permutation), A334860 (mirror image).
Composition of permutations A005940 and A225546.
Cf. A001146 (left edge of the tree), A019565 (right edge), A334110 (the left children of the right edge).

Programs

Formula

a(0) = 1, and then after, a(2n) = a(n)^2, a(2n+1) = A334747(a(n)).
a(n) = A225546(A005940(1+n)).
For all n >= 0, A048675(a(n)) = A087808(n).

A334860 a(0) = 1, a(1) = 2, after which, a(2n) = A334747(a(n)), a(2n+1) = a(n)^2.

Original entry on oeis.org

1, 2, 3, 4, 6, 9, 8, 16, 5, 36, 18, 81, 12, 64, 32, 256, 10, 25, 72, 1296, 27, 324, 162, 6561, 24, 144, 128, 4096, 48, 1024, 512, 65536, 15, 100, 50, 625, 108, 5184, 2592, 1679616, 54, 729, 648, 104976, 243, 26244, 13122, 43046721, 20, 576, 288, 20736, 192, 16384, 8192, 16777216, 96, 2304, 2048, 1048576, 768, 262144, 131072, 4294967296, 30
Offset: 0

Views

Author

Antti Karttunen, Jun 08 2020

Keywords

Comments

This irregular table can be represented as a binary tree. Each child to the left is obtained by applying A334747 to the parent, and each child to the right is obtained by squaring the parent:
1
|
...................2...................
3 4
6......../ \........9 8......../ \........16
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
5 36 18 81 12 64 32 256
10 25 72 1296 27 324 162 6561 24 144 128 4096 48 1024 512 65536
etc.
This is the mirror image of the tree in A334866.
Fermi-Dirac primes, A050376, occur at rightward growing branches that originate from primes situated at the left edge.
The tree illustrated in A163511 is expanded as x -> 2*x for the left child and x -> A003961(x) for the right child, while this tree is expanded as x -> A225546(2*A225546(x)) for the left child, and x -> A225546(A003961(A225546(x))) for the right child.

Crossrefs

Cf. A000290, A225546, A334204, A334747, A334859 (inverse), A334866 (mirror image).
Cf. A001146 (right edge of the tree), A019565 (left edge), A334110 (the right children of the left edge).
Composition of permutations A163511 and A225546.

Programs

Formula

a(0) = 1, a(1) = 2; and for n > 0, a(2n) = A334747(a(n)), a(2n+1) = a(n)^2.
a(n) = A225546(A163511(n)).
For n >= 0, a(2^n) = A019565(1+n), a(2^((2^n)-1)) = A000040(1+n).
A334109(a(n)) = A334204(n).
It seems that for n >= 1, A048675(a(n)) = A135529(n) = A048675(A163511(n)).

A019565 The squarefree numbers ordered lexicographically by their prime factorization (with factors written in decreasing order). a(n) = Product_{k in I} prime(k+1), where I is the set of indices of nonzero binary digits in n = Sum_{k in I} 2^k.

Original entry on oeis.org

1, 2, 3, 6, 5, 10, 15, 30, 7, 14, 21, 42, 35, 70, 105, 210, 11, 22, 33, 66, 55, 110, 165, 330, 77, 154, 231, 462, 385, 770, 1155, 2310, 13, 26, 39, 78, 65, 130, 195, 390, 91, 182, 273, 546, 455, 910, 1365, 2730, 143, 286, 429, 858, 715, 1430, 2145, 4290
Offset: 0

Views

Author

Keywords

Comments

A permutation of the squarefree numbers A005117. The missing positive numbers are in A013929. - Alois P. Heinz, Sep 06 2014
From Antti Karttunen, Apr 18 & 19 2017: (Start)
Because a(n) toggles the parity of n there are neither fixed points nor any cycles of odd length.
Conjecture: there are no finite cycles of any length. My grounds for this conjecture: any finite cycle in this sequence, if such cycles exist at all, must have at least one member that occurs somewhere in A285319, the terms that seem already to be quite rare. Moreover, any such a number n should satisfy in addition to A019565(n) < n also that A048675^{k}(n) is squarefree, not just for k=0, 1 but for all k >= 0. As there is on average a probability of only 6/(Pi^2) = 0.6079... that any further term encountered on the trajectory of A048675 is squarefree, the total chance that all of them would be squarefree (which is required from the elements of A019565-cycles) is soon minuscule, especially as A048675 is not very tightly bounded (many trajectories seem to skyrocket, at least initially). I am also assuming that usually there is no significant correlation between the binary expansions of n and A048675(n) (apart from their least significant bits), or, for that matter, between their prime factorizations.
See also the slightly stronger conjecture in A285320, which implies that there would neither be any two-way infinite cycles.
If either of the conjectures is false (there are cycles), then certainly neither sequence A285332 nor its inverse A285331 can be a permutation of natural numbers. (End)
The conjecture made in A087207 (see also A288569) implies the two conjectures mentioned above. A further constraint for cycles is that in any A019565-trajectory which starts from a squarefree number (A005117), every other term is of the form 4k+2, while every other term is of the form 6k+3. - Antti Karttunen, Jun 18 2017
The sequence satisfies the exponential function identity, a(x + y) = a(x) * a(y), whenever x and y do not have a 1-bit in the same position, i.e., when A004198(x,y) = 0. See also A283475. - Antti Karttunen, Oct 31 2019
The above identity becomes unconditional if binary exclusive OR, A003987(.,.), is substituted for addition, and A059897(.,.), a multiplicative equivalent of A003987, is substituted for multiplication. This gives us a(A003987(x,y)) = A059897(a(x), a(y)). - Peter Munn, Nov 18 2019
Also the Heinz number of the binary indices of n, where the Heinz number of a sequence (y_1,...,y_k) is prime(y_1)*...*prime(y_k), and a number's binary indices (A048793) are the positions of 1's in its reversed binary expansion. - Gus Wiseman, Dec 28 2022

Examples

			5 = 2^2+2^0, e_1 = 2, e_2 = 0, prime(2+1) = prime(3) = 5, prime(0+1) = prime(1) = 2, so a(5) = 5*2 = 10.
From _Philippe Deléham_, Jun 03 2015: (Start)
This sequence regarded as a triangle withs rows of lengths 1, 1, 2, 4, 8, 16, ...:
   1;
   2;
   3,  6;
   5, 10, 15, 30;
   7, 14, 21, 42, 35,  70, 105, 210;
  11, 22, 33, 66, 55, 110, 165, 330, 77, 154, 231, 462, 385, 770, 1155, 2310;
  ...
(End)
From _Peter Munn_, Jun 14 2020: (Start)
The initial terms are shown below, equated with the product of their prime factors to exhibit the lexicographic order. We start with 1, since 1 is factored as the empty product and the empty list is first in lexicographic order.
   n     a(n)
   0     1 = .
   1     2 = 2.
   2     3 = 3.
   3     6 = 3*2.
   4     5 = 5.
   5    10 = 5*2.
   6    15 = 5*3.
   7    30 = 5*3*2.
   8     7 = 7.
   9    14 = 7*2.
  10    21 = 7*3.
  11    42 = 7*3*2.
  12    35 = 7*5.
(End)
		

Crossrefs

Row 1 of A285321.
Equivalent sequences for k-th-power-free numbers: A101278 (k=3), A101942 (k=4), A101943 (k=5), A054842 (k=10).
Cf. A109162 (iterates).
Cf. also A048675 (a left inverse), A087207, A097248, A260443, A054841.
Cf. A285315 (numbers for which a(n) < n), A285316 (for which a(n) > n).
Cf. A276076, A276086 (analogous sequences for factorial and primorial bases), A334110 (terms squared).
For partial sums see A288570.
A003961, A003987, A004198, A059897, A089913, A331590, A334747 are used to express relationships between sequence terms.
Column 1 of A329332.
Even bisection (which contains the odd terms): A332382.
A160102 composed with A052330, and subsequence of the latter.
Related to A000079 via A225546, to A057335 via A122111, to A008578 via A336322.
Least prime index of a(n) is A001511.
Greatest prime index of a(n) is A029837 or A070939.
Taking prime indices gives A048793, reverse A272020, row sums A029931.
A112798 lists prime indices, length A001222, sum A056239.

Programs

  • Haskell
    a019565 n = product $ zipWith (^) a000040_list (a030308_row n)
    -- Reinhard Zumkeller, Apr 27 2013
    
  • Maple
    a:= proc(n) local i, m, r; m:=n; r:=1;
          for i while m>0 do if irem(m,2,'m')=1
            then r:=r*ithprime(i) fi od; r
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Sep 06 2014
  • Mathematica
    Do[m=1;o=1;k1=k;While[ k1>0, k2=Mod[k1, 2];If[k2\[Equal]1, m=m*Prime[o]];k1=(k1-k2)/ 2;o=o+1];Print[m], {k, 0, 55}] (* Lei Zhou, Feb 15 2005 *)
    Table[Times @@ Prime@ Flatten@ Position[#, 1] &@ Reverse@ IntegerDigits[n, 2], {n, 0, 55}]  (* Michael De Vlieger, Aug 27 2016 *)
    b[0] := {1}; b[n_] := Flatten[{ b[n - 1], b[n - 1] * Prime[n] }];
      a = b[6] (* Fred Daniel Kline, Jun 26 2017 *)
  • PARI
    a(n)=factorback(vecextract(primes(logint(n+!n,2)+1),n))  \\ M. F. Hasler, Mar 26 2011, updated Aug 22 2014, updated Mar 01 2018
    
  • Python
    from operator import mul
    from functools import reduce
    from sympy import prime
    def A019565(n):
        return reduce(mul,(prime(i+1) for i,v in enumerate(bin(n)[:1:-1]) if v == '1')) if n > 0 else 1
    # Chai Wah Wu, Dec 25 2014
    
  • Scheme
    (define (A019565 n) (let loop ((n n) (i 1) (p 1)) (cond ((zero? n) p) ((odd? n) (loop (/ (- n 1) 2) (+ 1 i) (* p (A000040 i)))) (else (loop (/ n 2) (+ 1 i) p))))) ;; (Requires only the implementation of A000040 for prime numbers.) - Antti Karttunen, Apr 20 2017

Formula

G.f.: Product_{k>=0} (1 + prime(k+1)*x^2^k), where prime(k)=A000040(k). - Ralf Stephan, Jun 20 2003
a(n) = f(n, 1, 1) with f(x, y, z) = if x > 0 then f(floor(x/2), y*prime(z)^(x mod 2), z+1) else y. - Reinhard Zumkeller, Mar 13 2010
For all n >= 0: A048675(a(n)) = n; A013928(a(n)) = A064273(n). - Antti Karttunen, Jul 29 2015
a(n) = a(2^x)*a(2^y)*a(2^z)*... = prime(x+1)*prime(y+1)*prime(z+1)*..., where n = 2^x + 2^y + 2^z + ... - Benedict W. J. Irwin, Jul 24 2016
From Antti Karttunen, Apr 18 2017 and Jun 18 2017: (Start)
a(n) = A097248(A260443(n)), a(A005187(n)) = A283475(n), A108951(a(n)) = A283477(n).
A055396(a(n)) = A001511(n), a(A087207(n)) = A007947(n). (End)
a(2^n - 1) = A002110(n). - Michael De Vlieger, Jul 05 2017
a(n) = A225546(A000079(n)). - Peter Munn, Oct 31 2019
From Peter Munn, Mar 04 2022: (Start)
a(2n) = A003961(a(n)); a(2n+1) = 2*a(2n).
a(x XOR y) = A059897(a(x), a(y)) = A089913(a(x), a(y)), where XOR denotes bitwise exclusive OR (A003987).
a(n+1) = A334747(a(n)).
a(x+y) = A331590(a(x), a(y)).
a(n) = A336322(A008578(n+1)).
(End)

Extensions

Definition corrected by Klaus-R. Löffler, Aug 20 2014
New name from Peter Munn, Jun 14 2020

A225546 Tek's flip: Write n as the product of distinct factors of the form prime(i)^(2^(j-1)) with i and j integers, and replace each such factor with prime(j)^(2^(i-1)).

Original entry on oeis.org

1, 2, 4, 3, 16, 8, 256, 6, 9, 32, 65536, 12, 4294967296, 512, 64, 5, 18446744073709551616, 18, 340282366920938463463374607431768211456, 48, 1024, 131072, 115792089237316195423570985008687907853269984665640564039457584007913129639936, 24, 81, 8589934592, 36, 768
Offset: 1

Views

Author

Paul Tek, May 10 2013

Keywords

Comments

This is a multiplicative self-inverse permutation of the integers.
A225547 gives the fixed points.
From Antti Karttunen and Peter Munn, Feb 02 2020: (Start)
This sequence operates on the Fermi-Dirac factors of a number. As arranged in array form, in A329050, this sequence reflects these factors about the main diagonal of the array, substituting A329050[j,i] for A329050[i,j], and this results in many relationships including significant homomorphisms.
This sequence provides a relationship between the operations of squaring and prime shift (A003961) because each successive column of the A329050 array is the square of the previous column, and each successive row is the prime shift of the previous row.
A329050 gives examples of how significant sets of numbers can be formed by choosing their factors in relation to rows and/or columns. This sequence therefore maps equivalent derived sets by exchanging rows and columns. Thus odd numbers are exchanged for squares, squarefree numbers for powers of 2 etc.
Alternative construction: For n > 1, form a vector v of length A299090(n), where each element v[i] for i=1..A299090(n) is a product of those distinct prime factors p(i) of n whose exponent e(i) has the bit (i-1) "on", or 1 (as an empty product) if no such exponents are present. a(n) is then Product_{i=1..A299090(n)} A000040(i)^A048675(v[i]). Note that because each element of vector v is squarefree, it means that each exponent A048675(v[i]) present in the product is a "submask" (not all necessarily proper) of the binary string A087207(n).
This permutation effects the following mappings:
A000035(a(n)) = A010052(n), A010052(a(n)) = A000035(n). [Odd numbers <-> Squares]
A008966(a(n)) = A209229(n), A209229(a(n)) = A008966(n). [Squarefree numbers <-> Powers of 2]
(End)
From Antti Karttunen, Jul 08 2020: (Start)
Moreover, we see also that this sequence maps between A016825 (Numbers of the form 4k+2) and A001105 (2*squares) as well as between A008586 (Multiples of 4) and A028983 (Numbers with even sum of the divisors).
(End)

Examples

			  7744  = prime(1)^2^(2-1)*prime(1)^2^(3-1)*prime(5)^2^(2-1).
a(7744) = prime(2)^2^(1-1)*prime(3)^2^(1-1)*prime(2)^2^(5-1) = 645700815.
		

Crossrefs

Cf. A225547 (fixed points) and the subsequences listed there.
Transposes A329050, A329332.
An automorphism of positive integers under the binary operations A059895, A059896, A059897, A306697, A329329.
An automorphism of A059897 subgroups: A000379, A003159, A016754, A122132.
Permutes lists where membership is determined by number of Fermi-Dirac factors: A000028, A050376, A176525, A268388.
Sequences f that satisfy f(a(n)) = f(n): A048675, A064179, A064547, A097248, A302777, A331592.
Pairs of sequences (f,g) that satisfy a(f(n)) = g(a(n)): (A000265,A008833), (A000290,A003961), (A005843,A334747), (A006519,A007913), (A008586,A334748).
Pairs of sequences (f,g) that satisfy a(f(n)) = g(n), possibly with offset change: (A000040,A001146), (A000079,A019565).
Pairs of sequences (f,g) that satisfy f(a(n)) = g(n), possibly with offset change: (A000035, A010052), (A008966, A209229), (A007814, A248663), (A061395, A299090), (A087207, A267116), (A225569, A227291).
Cf. A331287 [= gcd(a(n),n)].
Cf. A331288 [= min(a(n),n)], see also A331301.
Cf. A331309 [= A000005(a(n)), number of divisors].
Cf. A331590 [= a(a(n)*a(n))].
Cf. A331591 [= A001221(a(n)), number of distinct prime factors], see also A331593.
Cf. A331740 [= A001222(a(n)), number of prime factors with multiplicity].
Cf. A331733 [= A000203(a(n)), sum of divisors].
Cf. A331734 [= A033879(a(n)), deficiency].
Cf. A331735 [= A009194(a(n))].
Cf. A331736 [= A000265(a(n)) = a(A008833(n)), largest odd divisor].
Cf. A335914 [= A038040(a(n))].
A self-inverse isomorphism between pairs of A059897 subgroups: (A000079,A005117), (A000244,A062503), (A000290\{0},A005408), (A000302,A056911), (A000351,A113849 U {1}), (A000400,A062838), (A001651,A252895), (A003586,A046100), (A007310,A000583), (A011557,A113850 U {1}), (A028982,A042968), (A053165,A065331), (A262675,A268390).
A bijection between pairs of sets: (A001248,A011764), (A007283,A133466), (A016825, A001105), (A008586, A028983).
Cf. also A336321, A336322 (compositions with another involution, A122111).

Programs

  • Mathematica
    Array[If[# == 1, 1, Times @@ Flatten@ Map[Function[{p, e}, Map[Prime[Log2@ # + 1]^(2^(PrimePi@ p - 1)) &, DeleteCases[NumberExpand[e, 2], 0]]] @@ # &, FactorInteger[#]]] &, 28] (* Michael De Vlieger, Jan 21 2020 *)
  • PARI
    A019565(n) = factorback(vecextract(primes(logint(n+!n, 2)+1), n));
    a(n) = {my(f=factor(n)); for (i=1, #f~, my(p=f[i,1]); f[i,1] = A019565(f[i,2]); f[i,2] = 2^(primepi(p)-1);); factorback(f);} \\ Michel Marcus, Nov 29 2019
    
  • PARI
    A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; };
    A225546(n) = if(1==n,1,my(f=factor(n),u=#binary(vecmax(f[, 2])),prods=vector(u,x,1),m=1,e); for(i=1,u,for(k=1,#f~, if(bitand(f[k,2],m),prods[i] *= f[k,1])); m<<=1); prod(i=1,u,prime(i)^A048675(prods[i]))); \\ Antti Karttunen, Feb 02 2020
    
  • Python
    from math import prod
    from sympy import prime, primepi, factorint
    def A225546(n): return prod(prod(prime(i) for i, v in enumerate(bin(e)[:1:-1],1) if v == '1')**(1<Chai Wah Wu, Mar 17 2023

Formula

Multiplicative, with a(prime(i)^j) = A019565(j)^A000079(i-1).
a(prime(i)) = 2^(2^(i-1)).
From Antti Karttunen and Peter Munn, Feb 06 2020: (Start)
a(A329050(n,k)) = A329050(k,n).
a(A329332(n,k)) = A329332(k,n).
Equivalently, a(A019565(n)^k) = A019565(k)^n. If n = 1, this gives a(2^k) = A019565(k).
a(A059897(n,k)) = A059897(a(n), a(k)).
The previous formula implies a(n*k) = a(n) * a(k) if A059895(n,k) = 1.
a(A000040(n)) = A001146(n-1); a(A001146(n)) = A000040(n+1).
a(A000290(a(n))) = A003961(n); a(A003961(a(n))) = A000290(n) = n^2.
a(A000265(a(n))) = A008833(n); a(A008833(a(n))) = A000265(n).
a(A006519(a(n))) = A007913(n); a(A007913(a(n))) = A006519(n).
A007814(a(n)) = A248663(n); A248663(a(n)) = A007814(n).
A048675(a(n)) = A048675(n) and A048675(a(2^k * n)) = A048675(2^k * a(n)) = k + A048675(a(n)).
(End)
From Antti Karttunen and Peter Munn, Jul 08 2020: (Start)
For all n >= 1, a(2n) = A334747(a(n)).
In particular, for n = A003159(m), m >= 1, a(2n) = 2*a(n). [Note that A003159 includes all odd numbers]
(End)

Extensions

Name edited by Peter Munn, Feb 14 2020
"Tek's flip" prepended to the name by Antti Karttunen, Jul 08 2020

A248663 Binary encoding of the prime factors of the squarefree part of n.

Original entry on oeis.org

0, 1, 2, 0, 4, 3, 8, 1, 0, 5, 16, 2, 32, 9, 6, 0, 64, 1, 128, 4, 10, 17, 256, 3, 0, 33, 2, 8, 512, 7, 1024, 1, 18, 65, 12, 0, 2048, 129, 34, 5, 4096, 11, 8192, 16, 4, 257, 16384, 2, 0, 1, 66, 32, 32768, 3, 20, 9, 130, 513, 65536, 6, 131072, 1025, 8, 0, 36, 19
Offset: 1

Views

Author

Peter Kagey, Jan 11 2015

Keywords

Comments

The binary digits of a(n) encode the prime factorization of A007913(n), where the i-th digit from the right is 1 if and only if prime(i) divides A007913(n), otherwise 0. - Robert Israel, Jan 12 2015
Old name: a(1) = 0; a(A000040(n)) = 2^(n-1), and a(n*m) = a(n) XOR a(m).
XOR is the bitwise exclusive or operation (A003987).
a(k^2) = 0 for a natural number k.
Equivalently, the i-th binary digit from the right is 1 iff prime(i) divides n an odd number of times, otherwise zero. - Ethan Beihl, Oct 15 2016
When a polynomial with nonnegative integer coefficients is encoded with the prime factorization of n (e.g., as in A206296, A260443, with scheme explained in A206284), then A048675(n) gives the evaluation of that polynomial at x=2. This sequence is otherwise similar, except the polynomial is evaluated over the field GF(2), which implies also that all its coefficients are essentially reduced modulo 2. - Antti Karttunen, Dec 11 2015
Squarefree numbers (A005117) give the positions k where a(k) = A048675(k). - Antti Karttunen, Oct 29 2016
From Peter Munn, Jun 07 2021: (Start)
When we encode polynomials with nonnegative integer coefficients as described by Antti Karttunen above, polynomial addition is represented by integer multiplication, multiplication is represented by A297845(.,.), and this sequence represents a surjective semiring homomorphism to polynomials in GF(2)[x] (encoded as described in A048720). The mapping of addition operations by this homomorphism is part of the sequence definition: "a(n*m) = a(n) XOR a(m)". The mapping of multiplication is given by a(A297845(n, k)) = A048720(a(n), a(k)).
In a related way, A329329 defines a representation of a different set of polynomials as positive integers, namely polynomials in GF(2)[x,y].
Let P_n(x,y) denote the polynomial represented, as in A329329, by n >= 1. If 0 is substituted for y in P_n(x,y), we get a polynomial P'_n(x,y) (in which y does not appear, of course) that is equivalent to a polynomial P'_n(x) in GF(2)[x]. a(n) is the integer encoding of P'_n(x) (described in A048720).
Viewed as above, this sequence represents another surjective homomorphism, a homomorphism between polynomial rings, with A329329(.,.)/A059897(.,.) and A048720(.,.)/A003987(.,.) as the respective ring operations.
a(n) can be composed as a(n) = A048675(A007913(n)) and the effect of the A007913(.) component corresponds to different operations on the respective polynomial domains of the two homomorphisms described above. In the first homomorphism, coefficients are reduced modulo 2; in the second, 0 is substituted for y. This is illustrated in the examples.
(End)

Examples

			a(3500) = a(2^2 * 5^3 * 7) = a(2) XOR a(2) XOR a(5) XOR a(5) XOR a(5) XOR a(7) = 1 XOR 1 XOR 4 XOR 4 XOR 4 XOR 8 = 0b0100 XOR 0b1000 = 0b1100 = 12.
From _Peter Munn_, Jun 07 2021: (Start)
The examples in the table below illustrate the homomorphisms (between polynomial structures) represented by this sequence.
The staggering of the rows is to show how the mapping n -> A007913(n) -> A048675(A007913(n)) = a(n) relates to the encoded polynomials, as not all encodings are relevant at each stage.
For an explanation of each polynomial encoding, see the sequence referenced in the relevant column heading. (Note also that A007913 generates squarefree numbers, and with these encodings, all squarefree numbers represent equivalent polynomials in N[x] and GF(2)[x,y].)
                     |<-----    encoded polynomials    ----->|
  n  A007913(n) a(n) |         N[x]    GF(2)[x,y]    GF(2)[x]|
                     |Cf.:  A206284       A329329     A048720|
--------------------------------------------------------------
  24                            x+3         x+y+1
          6                     x+1           x+1
                  3                                       x+1
--------------------------------------------------------------
  36                           2x+2          xy+y
          1                       0             0
                  0                                         0
--------------------------------------------------------------
  60                        x^2+x+2       x^2+x+y
         15                   x^2+x         x^2+x
                  6                                     x^2+x
--------------------------------------------------------------
  90                       x^2+2x+1      x^2+xy+1
         10                   x^2+1         x^2+1
                  5                                     x^2+1
--------------------------------------------------------------
This sequence is a left inverse of A019565. A019565(.) maps a(n) to A007913(n) for all n, effectively reversing the second stage of the mapping from n to a(n) shown above. So, with the encodings used here, A019565(.) represents each of two injective homomorphisms that map polynomials in GF(2)[x] to equivalent polynomials in N[x] and GF(2)[x,y] respectively.
(End)
		

Crossrefs

A048675 composed with A007913. A007814 composed with A225546.
A left inverse of A019565.
Other sequences used to express relationship between terms of this sequence: A003961, A007913, A331590, A334747.
Cf. also A099884, A277330.
A087207 is the analogous sequence with OR.
A277417 gives the positions where coincides with A277333.
A000290 gives the positions of zeros.

Programs

  • Haskell
    import Data.Bits (xor)
    a248663 = foldr (xor) 0 . map (\i -> 2^(i - 1)) . a112798_row
    -- Peter Kagey, Sep 16 2016
    
  • Maple
    f:= proc(n)
    local F,f;
    F:= select(t -> t[2]::odd, ifactors(n)[2]);
    add(2^(numtheory:-pi(f[1])-1), f = F)
    end proc:
    seq(f(i),i=1..100); # Robert Israel, Jan 12 2015
  • Mathematica
    a[1] = 0; a[n_] := a[n] = If[PrimeQ@ n, 2^(PrimePi@ n - 1), BitXor[a[#], a[n/#]] &@ FactorInteger[n][[1, 1]]]; Array[a, 66] (* Michael De Vlieger, Sep 16 2016 *)
  • PARI
    A248663(n) = vecsum(apply(p -> 2^(primepi(p)-1),factor(core(n))[,1])); \\ Antti Karttunen, Feb 15 2021
    
  • Python
    from sympy import factorint, primepi
    from sympy.ntheory.factor_ import core
    def a048675(n):
        f=factorint(n)
        return 0 if n==1 else sum([f[i]*2**(primepi(i) - 1) for i in f])
    def a(n): return a048675(core(n))
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 21 2017
  • Ruby
    require 'prime'
    def f(n)
      a = 0
      reverse_primes = Prime.each(n).to_a.reverse
      reverse_primes.each do |prime|
        a <<= 1
        while n % prime == 0
          n /= prime
          a ^= 1
        end
      end
      a
    end
    (Scheme, with memoizing-macro definec)
    (definec (A248663 n) (cond ((= 1 n) 0) ((= 1 (A010051 n)) (A000079 (- (A000720 n) 1))) (else (A003987bi (A248663 (A020639 n)) (A248663 (A032742 n)))))) ;; Where A003987bi computes bitwise-XOR as in A003987.
    ;; Alternatively:
    (definec (A248663 n) (cond ((= 1 n) 0) (else (A003987bi (A000079 (- (A055396 n) 1)) (A248663 (A032742 n))))))
    ;; Antti Karttunen, Dec 11 2015
    

Formula

a(1) = 0; for n > 1, if n is a prime, a(n) = 2^(A000720(n)-1), otherwise a(A020639(n)) XOR a(A032742(n)). [After the definition.] - Antti Karttunen, Dec 11 2015
For n > 1, this simplifies to: a(n) = 2^(A055396(n)-1) XOR a(A032742(n)). [Where A055396(n) gives the index of the smallest prime dividing n and A032742(n) gives the largest proper divisor of n. Cf. a similar formula for A048675.]
Other identities and observations. For all n >= 0:
a(n) = A048672(A100112(A007913(n))). - Peter Kagey, Dec 10 2015
From Antti Karttunen, Dec 11 2015, Sep 19 & Oct 27 2016, Feb 15 2021: (Start)
a(n) = a(A007913(n)). [The result depends only on the squarefree part of n.]
a(n) = A048675(A007913(n)).
a(A206296(n)) = A168081(n).
a(A260443(n)) = A264977(n).
a(A265408(n)) = A265407(n).
a(A275734(n)) = A275808(n).
a(A276076(n)) = A276074(n).
a(A283477(n)) = A006068(n).
(End)
From Peter Munn, Jan 09 2021 and Apr 20 2021: (Start)
a(n) = A007814(A225546(n)).
a(A019565(n)) = n; A019565(a(n)) = A007913(n).
a(A003961(n)) = 2 * a(n).
a(A297845(n, k)) = A048720(a(n), a(k)).
a(A329329(n, k)) = A048720(a(n), a(k)).
a(A059897(n, k)) = A003987(a(n), a(k)).
a(A331590(n, k)) = a(n) + a(k).
a(A334747(n)) = a(n) + 1.
(End)

Extensions

New name from Peter Munn, Nov 01 2023

A293442 Multiplicative with a(p^e) = A019565(e).

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 6, 3, 4, 2, 6, 2, 4, 4, 5, 2, 6, 2, 6, 4, 4, 2, 12, 3, 4, 6, 6, 2, 8, 2, 10, 4, 4, 4, 9, 2, 4, 4, 12, 2, 8, 2, 6, 6, 4, 2, 10, 3, 6, 4, 6, 2, 12, 4, 12, 4, 4, 2, 12, 2, 4, 6, 15, 4, 8, 2, 6, 4, 8, 2, 18, 2, 4, 6, 6, 4, 8, 2, 10, 5, 4, 2, 12, 4, 4, 4, 12, 2, 12, 4, 6, 4, 4, 4, 20, 2, 6, 6, 9, 2, 8, 2, 12, 8
Offset: 1

Views

Author

Antti Karttunen, Oct 31 2017

Keywords

Comments

From Peter Munn, Apr 06 2021: (Start)
a(n) is determined by the prime signature of n.
Compare with the multiplicative, self-inverse A225546, which also maps 2^e to the squarefree number A019565(e). However, this sequence maps p^e to the same squarefree number for every prime p, whereas A225546 maps the e-th power of progressively larger primes to progressively greater powers of A019565(e).
Both sequences map powers of squarefree numbers to powers of squarefree numbers.
(End)

Crossrefs

Sequences used in a definition of this sequence: A000188, A003961, A019565, A028234, A059895, A067029, A162642.
Sequences with related definitions: A225546, A293443, A293444.
Cf. also A293214.
Sequences used to express relationship between terms of this sequence: A006519, A007913, A008833, A064989, A334747.
Sequences related via this sequence: (A001222, A048675, A064547), (A007814, A162642), (A087207, A267116), (A248663, A268387).

Programs

  • Mathematica
    f[n_] := If[n == 1, 1, Apply[Times, Prime@ Flatten@ Position[Reverse@ IntegerDigits[Last@ #, 2], 1]] * f[n/Apply[Power, #]] &@ FactorInteger[n][[1]]]; Array[f, 105] (* Michael De Vlieger, Oct 31 2017 *)

Formula

a(1) = 1; for n > 1, a(n) = A019565(A067029(n)) * a(A028234(n)).
Other identities. For all n >= 1:
a(a(n)) = A293444(n).
A048675(a(n)) = A001222(n).
A001222(a(n)) = A064547(n) = A048675(A293444(n)).
A007814(a(n)) = A162642(n).
A087207(a(n)) = A267116(n).
A248663(a(n)) = A268387(n).
From Peter Munn, Mar 14 2021: (Start)
Alternative definition: a(1) = 1; a(2) = 2; a(n^2) = A003961(a(n)); a(A003961(n)) = a(n); if A059895(n, k) = 1, a(n*k) = a(n) * a(k).
For n >= 3, a(n) < n.
a(2n) = A334747(a(A006519(n))) * a(n/A006519(n)), where A006519(n) is the largest power of 2 dividing n.
a(2n+1) = a(A064989(2n+1)).
a(n) = a(A007913(n)) * a(A008833(n)) = 2^A162642(n) * A003961(a(A000188(n))).
(End)

A036668 Hati numbers: of form 2^i*3^j*k, i+j even, (k,6)=1.

Original entry on oeis.org

1, 4, 5, 6, 7, 9, 11, 13, 16, 17, 19, 20, 23, 24, 25, 28, 29, 30, 31, 35, 36, 37, 41, 42, 43, 44, 45, 47, 49, 52, 53, 54, 55, 59, 61, 63, 64, 65, 66, 67, 68, 71, 73, 76, 77, 78, 79, 80, 81, 83, 85, 89, 91, 92, 95, 96, 97, 99, 100, 101, 102, 103, 107
Offset: 1

Views

Author

N. J. A. Sloane, Antreas P. Hatzipolakis (xpolakis(AT)hol.gr)

Keywords

Comments

If n appears then 2n and 3n do not. - Benoit Cloitre, Jun 13 2002
Closed under multiplication. Each term is a product of a unique subset of {6} U A050376 \ {2,3}. - Peter Munn, Sep 14 2019

Crossrefs

Cf. A003159, A007310, A014601, A036667, A050376, A052330, A325424 (complement), A325498 (first differences), A373136 (characteristic function).
Positions of 0's in A182582.
Subsequences: A084087, A339690, A352272, A352273.

Programs

  • Maple
    N:= 1000: # to get all terms up to N
    A:= {seq(2^i,i=0..ilog2(N))}:
    Ae,Ao:= selectremove(issqr,A):
    Be:= map(t -> seq(t*9^j, j=0 .. floor(log[9](N/t))),Ae):
    Bo:= map(t -> seq(t*3*9^j,j=0..floor(log[9](N/(3*t)))),Ao):
    B:= Be union Bo:
    C1:= map(t -> seq(t*(6*i+1),i=0..floor((N/t -1)/6)),B):
    C2:= map(t -> seq(t*(6*i+5),i=0..floor((N/t - 5)/6)),B):
    A036668:= C1 union C2; # Robert Israel, May 09 2014
  • Mathematica
    a = {1}; Do[AppendTo[a, NestWhile[# + 1 &, Last[a] + 1,
    Apply[Or, Map[MemberQ[a, #] &, Select[Flatten[{#/3, #/2}],
    IntegerQ]]] &]], {150}]; a  (* A036668 *)
    (* Peter J. C. Moses, Apr 23 2019 *)
  • PARI
    twos(n) = {local(r,m);r=0;m=n;while(m%2==0,m=m/2;r++);r}
    threes(n) = {local(r,m);r=0;m=n;while(m%3==0,m=m/3;r++);r}
    isA036668(n) = (twos(n)+threes(n))%2==0 \\ Michael B. Porter, Mar 16 2010
    
  • PARI
    is(n)=(valuation(n,2)+valuation(n,3))%2==0 \\ Charles R Greathouse IV, Sep 10 2015
    
  • PARI
    list(lim)=my(v=List(),N);for(n=0,logint(lim\=1,3),N=if(n%2,2*3^n,3^n); while(N<=lim, forstep(k=N,lim,[4*N,2*N], listput(v,k)); N<<=2)); Set(v) \\ Charles R Greathouse IV, Sep 10 2015
    
  • Python
    from itertools import count
    def A036668(n):
        def f(x):
            c = n+x
            for i in range(x.bit_length()+1):
                i2 = 1<x:
                        break
                    m = x//k
                    c -= (m-1)//6+(m-5)//6+2
            return c
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Jan 28 2025

Formula

a(n) = 12/7 * n + O(log^2 n). - Charles R Greathouse IV, Sep 10 2015
{a(n)} = A052330({A014601(n)}), where {a(n)} denotes the set of integers in the sequence. - Peter Munn, Sep 14 2019

Extensions

Offset changed by Chai Wah Wu, Jan 28 2025

A334870 If n is a square, a(n) = A000196(n), and for nonsquare n, let p be the smallest prime dividing the squarefree part of n. Divide n by p and multiply by the product of all smaller primes.

Original entry on oeis.org

1, 1, 2, 2, 6, 3, 30, 4, 3, 5, 210, 8, 2310, 7, 10, 4, 30030, 9, 510510, 24, 14, 11, 9699690, 12, 5, 13, 18, 120, 223092870, 15, 6469693230, 16, 22, 17, 42, 6, 200560490130, 19, 26, 20, 7420738134810, 21, 304250263527210, 840, 54, 23, 13082761331670030, 32, 7, 25, 34, 9240, 614889782588491410, 27, 66, 28, 38, 29
Offset: 1

Author

Antti Karttunen, Jun 08 2020

Keywords

Comments

Each natural numbers occurs exactly twice in this sequence.
In binary trees like A334860 and A334866, for n > 2, a(n) gives the parent node of node n.
For nonsquare numbers, n, with squarefree part A019565(k) and square part m, a(n) is the number with squarefree part A019565(k-1) and square part m. - Peter Munn, Jul 14 2020

Crossrefs

Programs

  • Mathematica
    Array[If[IntegerQ[#2], #2, #1/#2*Product[Prime@i, {i, PrimePi@#2 - 1}] & @@ {#1, FactorInteger[#2 /. (c_ : 1)*a_^(b_ : 0) :> (c*a^b)^2][[1, 1]]}] & @@ {#, Sqrt[#]} &, 58] (* Michael De Vlieger, Jun 26 2020 *)
  • PARI
    A334870(n) = if(issquare(n),sqrtint(n),my(c=core(n), m=n); forprime(p=2, , if(!(c % p), m/=p; break, m*=p)); (m));

Formula

a(A334747(n)) = n.
a(A000040(n)) = A002110(n-1).
a(n^2) = n.
a(n) = A225546(A252463(A225546(n))). - Peter Munn, Jun 08 2020

A336321 a(n) = A122111(A225546(n)).

Original entry on oeis.org

1, 2, 3, 4, 7, 5, 19, 6, 9, 11, 53, 10, 131, 23, 13, 8, 311, 15, 719, 22, 29, 59, 1619, 14, 49, 137, 21, 46, 3671, 17, 8161, 12, 61, 313, 37, 25, 17863, 727, 139, 26, 38873, 31, 84017, 118, 39, 1621, 180503, 20, 361, 77, 317, 274, 386093, 33, 71, 58, 733, 3673, 821641, 34, 1742537, 8167, 87, 18, 151, 67, 3681131, 626, 1627, 41, 7754077, 35, 16290047
Offset: 1

Author

Antti Karttunen and Peter Munn, Jul 17 2020

Keywords

Comments

A122111 and A225546 are both self-inverse permutations of the positive integers based on prime factorizations, and they share further common properties. For instance, they map the prime numbers to powers of 2: A122111 maps the k-th prime to 2^k, whereas A225546 maps it to 2^2^(k-1).
In composing these permutations, this sequence maps the squarefree numbers, as listed in A019565, to the prime numbers in increasing order; and the list of powers of 2 to the "normal" numbers (A055932), as listed in A057335.

Examples

			From _Peter Munn_, Jan 04 2021: (Start)
In this set of examples we consider [a(n)] as a function a(.) with an inverse, a^-1(.).
First, a table showing mapping of the powers of 2:
  n     a^-1(2^n) =    2^n =        a(2^n) =
        A001146(n-1)   A000079(n)   A057335(n)
  0             (1)         1            1
  1               2         2            2
  2               4         4            4
  3              16         8            6
  4             256        16            8
  5           65536        32           12
  6      4294967296        64           18
  ...
Next, a table showing mapping of the squarefree numbers, as listed in A019565 (a lexicographic ordering by prime factors):
  n   a^-1(A019565(n))   A019565(n)      a(A019565(n))   a^2(A019565(n))
      Cf. {A337533}      Cf. {A005117}   = prime(n)      = A033844(n-1)
  0              1               1             (1)               (1)
  1              2               2               2                 2
  2              3               3               3                 3
  3              8               6               5                 7
  4              6               5               7                19
  5             12              10              11                53
  6             18              15              13               131
  7            128              30              17               311
  8              5               7              19               719
  9             24              14              23              1619
  ...
As sets, the above columns are A337533, A005117, A008578, {1} U A033844.
Similarly, we get bijections between sets A000290\{0} -> {1} U A070003; and {1} U A335740 -> A005408 -> A066207.
(End)
		

Crossrefs

A122111 composed with A225546.
Cf. A336322 (inverse permutation).
Other sequences used in a definition of this sequence: A000040, A000188, A019565, A248663, A253550, A253560.
Sequences used to express relationship between terms of this sequence: A003159, A003961, A297002, A334747.
Cf. A057335.
A mapping between the binary tree sequences A334866 and A253563.
Lists of sets (S_1, S_2, ... S_j) related by the bijection defined by the sequence: (A000290\{0}, {1} U A070003), ({1} U A001146, A000079, A055932), ({1} U A335740, A005408, A066207), (A337533, A005117, A008578, {1} U A033844).

Formula

a(n) = A122111(A225546(n)).
Alternative definition: (Start)
Write n = m^2 * A019565(j), where m = A000188(n), j = A248663(n).
a(1) = 1; otherwise for m = 1, a(n) = A000040(j), for m > 1, a(n) = A253550^j(A253560(a(m))).
(End)
a(A000040(m)) = A033844(m-1).
a(A001146(m)) = 2^(m+1).
a(2^n) = A057335(n).
a(n^2) = A253560(a(n)).
For n in A003159, a(2n) = b(a(n)), where b(1) = 2, b(n) = A253550(n), n >= 2.
More generally, a(A334747(n)) = b(a(n)).
a(A003961(n)) = A297002(a(n)).
a(A334866(m)) = A253563(m).

A334748 Let p be the smallest odd prime not dividing the squarefree part of n. Multiply n by p and divide by the product of all smaller odd primes.

Original entry on oeis.org

3, 6, 5, 12, 15, 10, 21, 24, 27, 30, 33, 20, 39, 42, 7, 48, 51, 54, 57, 60, 35, 66, 69, 40, 75, 78, 45, 84, 87, 14, 93, 96, 55, 102, 105, 108, 111, 114, 65, 120, 123, 70, 129, 132, 135, 138, 141, 80, 147, 150, 85, 156, 159, 90, 165, 168, 95, 174, 177, 28, 183, 186, 189
Offset: 1

Author

Peter Munn, May 09 2020

Keywords

Comments

A permutation of A028983.
A007417 (which has asymptotic density 3/4) lists index n such that a(n) = 3n. The sequence maps the terms of A007417 1:1 onto A145204\{0}, defining a bijection between them.
Similarly, bijections are defined from the odd numbers (A005408) to the nonsquare odd numbers (A088828), from the positive even numbers (A299174) to A088829, from A003159 to the nonsquares in A003159, and from A325424 to the nonsquares in A036668. The latter two bijections are between sets where membership depends on whether a number's squarefree part divides by 2 and/or 3.

Examples

			84 = 21*4 has squarefree part 21 (and square part 4). The smallest odd prime absent from 21 = 3*7 is 5 and the product of all smaller odd primes is 3. So a(84) = 84*5/3 = 140.
		

Crossrefs

Permutation of A028983.
Row 3, and therefore column 3, of A331590. Cf. A334747 (row 2).
A007913, A034386, A225546, A284723 are used in formulas defining the sequence.
The formula section details how the sequence maps the terms of A003961, A019565, A070826; and how f(a(n)) relates to f(n) for f = A008833, A048675, A267116; making use of A003986.
Subsequences: A016051, A145204\{0}, A329575.
Bijections are defined that relate to A003159, A005408, A007417, A036668, A088828, A088829, A299174, A325424.

Programs

  • PARI
    a(n) = {my(c=core(n), m=n); forprime(p=3, , if(c % p, m*=p; break, m/=p)); m;} \\ Michel Marcus, May 22 2020

Formula

a(n) = n * p / (A034386(p-1)/2), where p = A284723(A007913(n)).
a(n) = A334747(A334747(n)).
a(n) = A331590(3, n) = A225546(4 * A225546(n)).
a(2*n) = 2 * a(n).
a(A019565(n)) = A019565(n+2).
a(k * m^2) = a(k) * m^2.
a(A003961(n)) = A003961(A334747(n)).
a(A070826(n)) = prime(n+1).
A048675(a(n)) = A048675(n) + 2.
A008833(a(n)) = A008833(n).
A267116(a(n)) = A267116(n) OR 1, where OR denotes the bitwise operation A003986.
a(A007417(n)) = A145204(n+1) = 3 * A007417(n).
Showing 1-10 of 10 results.