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

A059897 Symmetric square array read by antidiagonals: A(n,k) is the product of all factors that occur in one, but not both, of the Fermi-Dirac factorizations of n and k.

Original entry on oeis.org

1, 2, 2, 3, 1, 3, 4, 6, 6, 4, 5, 8, 1, 8, 5, 6, 10, 12, 12, 10, 6, 7, 3, 15, 1, 15, 3, 7, 8, 14, 2, 20, 20, 2, 14, 8, 9, 4, 21, 24, 1, 24, 21, 4, 9, 10, 18, 24, 28, 30, 30, 28, 24, 18, 10, 11, 5, 27, 2, 35, 1, 35, 2, 27, 5, 11, 12, 22, 30, 36, 40, 42, 42, 40, 36, 30, 22, 12, 13, 24, 33
Offset: 1

Views

Author

Marc LeBrun, Feb 06 2001

Keywords

Comments

Old name: Square array read by antidiagonals: T(i,j) = product prime(k)^(Ei(k) XOR Ej(k)) where Ei and Ej are the vectors of exponents in the prime factorizations of i and j; XOR is the bitwise operation on binary representation of the exponents.
Analogous to multiplication, with XOR replacing +.
From Peter Munn, Apr 01 2019: (Start)
(1) Defines an abelian group whose underlying set is the positive integers. (2) Every element is self-inverse. (3) For all n and k, A(n,k) is a divisor of n*k. (4) The terms of A050376, sometimes called Fermi-Dirac primes, form a minimal set of generators. In ordered form, it is the lexicographically earliest such set.
The unique factorization of positive integers into products of distinct terms of the group's lexicographically earliest minimal set of generators seems to follow from (1) (2) and (3).
From (1) and (2), every row and every column of the table is a self-inverse permutation of the positive integers. Rows/columns numbered by nonmembers of A050376 are compositions of earlier rows/columns.
It is a subgroup of the equivalent group over the nonzero integers, which has -1 as an additional generator.
As generated by A050376, the subgroup of even length words is A000379. The complementary set of odd length words is A000028.
The subgroup generated by A000040 (the primes) is A005117 (the squarefree numbers).
(End)
Considered as a binary operation, the result is (the squarefree part of the product of its operands) times the square of (the operation's result when applied to the square roots of the square parts of its operands). - Peter Munn, Mar 21 2022

Examples

			A(864,1944) = A(2^5*3^3,2^3*3^5) = 2^(5 XOR 3) * 3^(3 XOR 5) = 2^6 * 3^6 = 46656.
The top left 12 X 12 corner of the array:
   1,  2,  3,  4,  5,  6,  7,  8,   9,  10,  11,  12
   2,  1,  6,  8, 10,  3, 14,  4,  18,   5,  22,  24
   3,  6,  1, 12, 15,  2, 21, 24,  27,  30,  33,   4
   4,  8, 12,  1, 20, 24, 28,  2,  36,  40,  44,   3
   5, 10, 15, 20,  1, 30, 35, 40,  45,   2,  55,  60
   6,  3,  2, 24, 30,  1, 42, 12,  54,  15,  66,   8
   7, 14, 21, 28, 35, 42,  1, 56,  63,  70,  77,  84
   8,  4, 24,  2, 40, 12, 56,  1,  72,  20,  88,   6
   9, 18, 27, 36, 45, 54, 63, 72,   1,  90,  99, 108
  10,  5, 30, 40,  2, 15, 70, 20,  90,   1, 110, 120
  11, 22, 33, 44, 55, 66, 77, 88,  99, 110,   1, 132
  12, 24,  4,  3, 60,  8, 84,  6, 108, 120, 132,   1
From _Peter Munn_, Apr 04 2019: (Start)
The subgroup generated by {6,8,10}, the first three integers > 1 not in A050376, has the following table:
    1     6     8    10    12    15    20   120
    6     1    12    15     8    10   120    20
    8    12     1    20     6   120    10    15
   10    15    20     1   120     6     8    12
   12     8     6   120     1    20    15    10
   15    10   120     6    20     1    12     8
   20   120    10     8    15    12     1     6
  120    20    15    12    10     8     6     1
(End)
		

Crossrefs

Cf. A284567 (A000142 or A003418-analog for this operation).
Rows/columns: A073675 (2), A120229 (3), A120230 (4), A307151 (5), A307150 (6), A307266 (8), A307267 (24).
Particularly significant subgroups or cosets: A000028, A000379, A003159, A005117, A030229, A252895. See also the lists in A329050, A352273.
Sequences that relate this sequence to multiplication: A000188, A007913, A059895.

Programs

  • Mathematica
    a[i_, i_] = 1;
    a[i_, j_] := Module[{f1 = FactorInteger[i], f2 = FactorInteger[j], e1, e2}, e1[] = 0; Scan[(e1[#[[1]]] = #[[2]])&, f1]; e2[] = 0; Scan[(e2[#[[1]]] = #[[2]])&, f2]; Times @@ (#^BitXor[e1[#], e2[#]]& /@ Union[f1[[All, 1]], f2[[All, 1]]])];
    Table[a[i - j + 1, j], {i, 1, 15}, {j, 1, i}] // Flatten (* Jean-François Alcover, Jun 19 2018 *)
  • PARI
    T(n,k) = {if (n==1, return (k)); if (k==1, return (n)); my(fn=factor(n), fk=factor(k)); vp = setunion(fn[,1]~, fk[,1]~); prod(i=1, #vp, vp[i]^(bitxor(valuation(n, vp[i]), valuation(k, vp[i]))));} \\ Michel Marcus, Apr 03 2019
    
  • PARI
    T(i, j) = {if(gcd(i, j) == 1, return(i * j)); if(i == j, return(1)); my(f = vecsort(concat(factor(i)~, factor(j)~)), t = 1, res = 1); while(t + 1 <= #f, if(f[1, t] == f[1, t+1], res *= f[1, t] ^ bitxor(f[2, t] , f[2, t+1]); t+=2; , res*= f[1, t]^f[2, t]; t++; ) ); if(t == #f, res *= f[1, #f] ^ f[2, #f]); res } \\ David A. Corneth, Apr 03 2019
    
  • PARI
    A059897(n,k) = if(n==k, 1, core(n*k) * A059897(core(n,1)[2],core(k,1)[2])^2) \\ Peter Munn, Mar 21 2022
  • Scheme
    (define (A059897 n) (A059897bi (A002260 n) (A004736 n)))
    (define (A059897bi a b) (let loop ((a a) (b b) (m 1)) (cond ((= 1 a) (* m b)) ((= 1 b) (* m a)) ((equal? (A020639 a) (A020639 b)) (loop (A028234 a) (A028234 b) (* m (expt (A020639 a) (A003987bi (A067029 a) (A067029 b)))))) ((< (A020639 a) (A020639 b)) (loop (/ a (A028233 a)) b (* m (A028233 a)))) (else (loop a (/ b (A028233 b)) (* m (A028233 b)))))))
    ;; Antti Karttunen, Apr 11 2017
    

Formula

For all x, y >= 1, A(x,y) * A059895(x,y)^2 = x*y. - Antti Karttunen, Apr 11 2017
From Peter Munn, Apr 01 2019: (Start)
A(n,1) = A(1,n) = n
A(n, A(m,k)) = A(A(n,m), k)
A(n,n) = 1
A(n,k) = A(k,n)
if i_1 <> i_2 then A(A050376(i_1), A050376(i_2)) = A050376(i_1) * A050376(i_2)
if A(n,k_1) = n * k_1 and A(n,k_2) = n * k_2 then A(n, A(k_1,k_2)) = n * A(k_1,k_2)
(End)
T(k, m) = k*m for coprime k and m. - David A. Corneth, Apr 03 2019
if A(n*m,m) = n, A(n*m,k) = A(n,k) * A(m,k) / k. - Peter Munn, Apr 04 2019
A(n,k) = A007913(n*k) * A(A000188(n), A000188(k))^2. - Peter Munn, Mar 21 2022

Extensions

New name from Peter Munn, Mar 21 2022

A035263 Trajectory of 1 under the morphism 0 -> 11, 1 -> 10; parity of 2-adic valuation of 2n: a(n) = A000035(A001511(n)).

Original entry on oeis.org

1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1
Offset: 1

Views

Author

Keywords

Comments

First Feigenbaum symbolic (or period-doubling) sequence, corresponding to the accumulation point of the 2^{k} cycles through successive bifurcations.
To construct the sequence: start with 1 and concatenate: 1,1, then change the last term (1->0; 0->1) gives: 1,0. Concatenate those 2 terms: 1,0,1,0, change the last term: 1,0,1,1. Concatenate those 4 terms: 1,0,1,1,1,0,1,1 change the last term: 1,0,1,1,1,0,1,0, etc. - Benoit Cloitre, Dec 17 2002
Let T denote the present sequence. Here is another way to construct T. Start with the sequence S = 1,0,1,,1,0,1,,1,0,1,,1,0,1,,... and fill in the successive holes with the successive terms of the sequence T (from paper by Allouche et al.). - Emeric Deutsch, Jan 08 2003 [Note that if we fill in the holes with the terms of S itself, we get A141260. - N. J. A. Sloane, Jan 14 2009]
From N. J. A. Sloane, Feb 27 2009: (Start)
In more detail: define S to be 1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1,0,1___...
If we fill the holes with S we get A141260:
1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0,
........1.........0.........1.........1.........0.......1.........1.........0...
- the result is
1..0..1.1.1..0..1.0.1..0..1.1.1..0..1.1.1..0..1.0.1.... = A141260.
But instead, if we define T recursively by filling the holes in S with the terms of T itself, we get A035263:
1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0, 1___1, 0,
........1.........0.........1.........1.........1.......0.........1.........0...
- the result is
1..0..1.1.1..0..1.0.1..0..1.1.1..0..1.1.1..0..1.1.1.0.1.0.1..0..1.1.1..0..1.0.1.. = A035263. (End)
Characteristic function of A003159, i.e., A035263(n)=1 if n is in A003159 and A035263(n)=0 otherwise (from paper by Allouche et al.). - Emeric Deutsch, Jan 15 2003
This is the sequence of R (=1), L (=0) moves in the Towers of Hanoi puzzle: R, L, R, R, R, L, R, L, R, L, R, R, R, ... - Gary W. Adamson, Sep 21 2003
Manfred Schroeder, p. 279 states, "... the kneading sequences for unimodal maps in the binary notation, 0, 1, 0, 1, 1, 1, 0, 1..., are obtained from the Morse-Thue sequence by taking sums mod 2 of adjacent elements." On p. 278, in the chapter "Self-Similarity in the Logistic Parabola", he writes, "Is there a closer connection between the Morse-Thue sequence and the symbolic dynamics of the superstable orbits? There is indeed. To see this, let us replace R by 1 and C and L by 0." - Gary W. Adamson, Sep 21 2003
Partial sums modulo 2 of the sequence 1, a(1), a(1), a(2), a(2), a(3), a(3), a(4), a(4), a(5), a(5), a(6), a(6), ... . - Philippe Deléham, Jan 02 2004
Parity of A007913, A065882 and A065883. - Philippe Deléham, Mar 28 2004
The length of n-th run of 1's in this sequence is A080426(n). - Philippe Deléham, Apr 19 2004
Also parity of A005043, A005773, A026378, A104455, A117641. - Philippe Deléham, Apr 28 2007
Equals parity of the Towers of Hanoi, or ruler sequence (A001511), where the Towers of Hanoi sequence (1, 2, 1, 3, 1, 2, 1, 4, ...) denotes the disc moved, labeled (1, 2, 3, ...) starting from the top; and the parity of (1, 2, 1, 3, ...) denotes the direction of the move, CW or CCW. The frequency of CW moves converges to 2/3. - Gary W. Adamson, May 11 2007
A conjectured identity relating to the partition sequence, A000041: p(x) = A(x) * A(x^2) when A(x) = the Euler transform of A035263 = polcoeff A174065: (1 + x + x^2 + 2x^3 + 3x^4 + 4x^5 + ...). - Gary W. Adamson, Mar 21 2010
a(n) is 1 if the number of trailing zeros in the binary representation of n is even. - Ralf Stephan, Aug 22 2013
From Gary W. Adamson, Mar 25 2015: (Start)
A conjectured identity relating to the partition sequence, A000041 as polcoeff p(x); A003159, and its characteristic function A035263: (1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, ...); and A036554 indicating n-th terms with zeros in A035263: (2, 6, 8, 10, 14, 18, 22, ...).
The conjecture states that p(x) = A(x) = A(x^2) when A(x) = polcoeffA174065 = the Euler transform of A035263 = 1/(1-x)*(1-x^3)*(1-x^4)*(1-x^5)*... = (1 + x + x^2 + 2x^3 + 3x^4 + 4x^5 + ...) and the aerated variant = the Euler transform of the complement of A035263: 1/(1-x^2)*(1-x^6)*(1-x^8)*... = (1 + x^2 + x^4 + 2x^6 + 3x^8 + 4x^10 + ...).
(End)
The conjecture above was proved by Jean-Paul Allouche on Dec 21 2013.
Regarded as a column vector, this sequence is the product of A047999 (Sierpinski's gasket) regarded as an infinite lower triangular matrix and A036497 (the Fredholm-Rueppel sequence) where the 1's have alternating signs, 1, -1, 0, 1, 0, 0, 0, -1, .... - Gary W. Adamson, Jun 02 2021
The numbers of 1's through n (A050292) can be determined by starting with the binary (say for 19 = 1 0 0 1 1) and writing: next term is twice current term if 0, otherwise twice plus 1. The result is 1, 2, 4, 9, 19. Take the difference row, = 1, 1, 2, 5, 10; and add the odd-indexed terms from the right: 5, 4, 3, 2, 1 = 10 + 2 + 1 = 13. The algorithm is the basis for determining the disc configurations in the tower of Hanoi game, as shown in the Jul 24 2021 comment of A060572. - Gary W. Adamson, Jul 28 2021

References

  • Karamanos, Kostas. "From symbolic dynamics to a digital approach." International Journal of Bifurcation and Chaos 11.06 (2001): 1683-1694. (Full version. See p. 1685)
  • Karamanos, K. (2000). From symbolic dynamics to a digital approach: chaos and transcendence. In Michel Planat (Ed.), Noise, Oscillators and Algebraic Randomness (Lecture Notes in Physics, pp. 357-371). Springer, Berlin, Heidelberg. (Short version. See p. 359)
  • Manfred R. Schroeder, "Fractals, Chaos, Power Laws", W. H. Freeman, 1991
  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 892, column 2, Note on p. 84, part (a).

Crossrefs

Parity of A001511. Anti-parity of A007814.
Absolute values of first differences of A010060. Apart from signs, same as A029883. Essentially the same as A056832.
Swapping 0 and 1 gives A096268.
Cf. A033485, A050292 (partial sums), A089608, A088172, A019300, A039982, A073675, A121701, A141260, A000041, A174065, A220466, A154269 (Mobius transform).
Limit of A317957(n) for large n.

Programs

  • Haskell
    import Data.Bits (xor)
    a035263 n = a035263_list !! (n-1)
    a035263_list = zipWith xor a010060_list $ tail a010060_list
    -- Reinhard Zumkeller, Mar 01 2012
    
  • Maple
    nmax:=105: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 1 to ceil(nmax/(p+2)) do a((2*n-1)*2^p) := (p+1) mod 2 od: od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Feb 07 2013
    A035263 := n -> 1 - padic[ordp](n, 2) mod 2:
    seq(A035263(n), n=1..105); # Peter Luschny, Oct 02 2018
  • Mathematica
    a[n_] := a[n] = If[ EvenQ[n], 1 - a[n/2], 1]; Table[ a[n], {n, 1, 105}] (* Or *)
    Rest[ CoefficientList[ Series[ Sum[ x^(2^k)/(1 + (-1)^k*x^(2^k)), {k, 0, 20}], {x, 0, 105}], x]]
    f[1] := True; f[x_] := Xor[f[x - 1], f[Floor[x/2]]]; a[x_] := Boole[f[x]] (* Ben Branman, Oct 04 2010 *)
    a[n_] := If[n == 0, 0, 1 - Mod[ IntegerExponent[n, 2], 2]]; (* Jean-François Alcover, Jul 19 2013, after Michael Somos *)
    Nest[ Flatten[# /. {0 -> {1, 1}, 1 -> {1, 0}}] &, {0}, 7] (* Robert G. Wilson v, Jul 23 2014 *)
    SubstitutionSystem[{0->{1,1},1->{1,0}},1,{7}][[1]] (* Harvey P. Dale, Jun 06 2022 *)
  • PARI
    {a(n) = if( n==0, 0, 1 - valuation(n, 2)%2)}; /* Michael Somos, Sep 04 2006 */
    
  • PARI
    {a(n) = if( n==0, 0, n = abs(n); subst( Pol(binary(n)) - Pol(binary(n-1)), x, 1)%2)}; /* Michael Somos, Sep 04 2006 */
    
  • PARI
    {a(n) = if( n==0, 0, n = abs(n); direuler(p=2, n, 1 / (1 - X^((p<3) + 1)))[n])}; /* Michael Somos, Sep 04 2006 */
    
  • Python
    def A035263(n): return (n&-n).bit_length()&1 # Chai Wah Wu, Jan 09 2023
  • Scheme
    (define (A035263 n) (let loop ((n n) (i 1)) (cond ((odd? n) (modulo i 2)) (else (loop (/ n 2) (+ 1 i)))))) ;; (Use mod instead of modulo in R6RS) Antti Karttunen, Sep 11 2017
    

Formula

Absolute values of first differences (A029883) of Thue-Morse sequence (A001285 or A010060). Self-similar under 10->1 and 11->0.
Series expansion: (1/x) * Sum_{i>=0} (-1)^(i+1)*x^(2^i)/(x^(2^i)-1). - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Feb 17 2003
a(n) = Sum_{k>=0} (-1)^k*(floor((n+1)/2^k)-floor(n/2^k)). - Benoit Cloitre, Jun 03 2003
Another g.f.: Sum_{k>=0} x^(2^k)/(1+(-1)^k*x^(2^k)). - Ralf Stephan, Jun 13 2003
a(2*n) = 1-a(n), a(2*n+1) = 1. - Ralf Stephan, Jun 13 2003
a(n) = parity of A033485(n). - Philippe Deléham, Aug 13 2003
Equals A088172 mod 2, where A088172 = 1, 2, 3, 7, 13, 26, 53, 106, 211, 422, 845, ... (first differences of A019300). - Gary W. Adamson, Sep 21 2003
a(n) = a(n-1) - (-1)^n*a(floor(n/2)). - Benoit Cloitre, Dec 02 2003
a(1) = 1 and a(n) = abs(a(n-1) - a(floor(n/2))). - Benoit Cloitre, Dec 02 2003
a(n) = 1 - A096268(n+1); A050292 gives partial sums. - Reinhard Zumkeller, Aug 16 2006
Multiplicative with a(2^k) = 1 - (k mod 2), a(p^k) = 1, p > 2. Dirichlet g.f.: Product_{n = 4 or an odd prime} (1/(1-1/n^s)). - Christian G. Bower, May 18 2005
a(-n) = a(n). a(0)=0. - Michael Somos, Sep 04 2006
Dirichlet g.f.: zeta(s)*2^s/(2^s+1). - Ralf Stephan, Jun 17 2007
a(n+1) = a(n) XOR a(ceiling(n/2)), a(1) = 1. - Reinhard Zumkeller, Jun 11 2009
Let D(x) be the generating function, then D(x) + D(x^2) == x/(1-x). - Joerg Arndt, May 11 2010
a(n) = A010060(n) XOR A010060(n+1); a(A079523(n)) = 0; a(A121539(n)) = 1. - Reinhard Zumkeller, Mar 01 2012
a((2*n-1)*2^p) = (p+1) mod 2, p >= 0 and n >= 1. - Johannes W. Meijer, Feb 07 2013
a(n) = A000035(A001511(n)). - Omar E. Pol, Oct 29 2013
a(n) = 2-A056832(n) = (5-A089608(n))/4. - Antti Karttunen, Sep 11 2017, after Benoit Cloitre
For n >= 0, a(n+1) = M(2n) mod 2 where M(n) is the Motzkin number A001006 (see Deutsch and Sagan 2006 link). - David Callan, Oct 02 2018
a(n) = A038712(n) mod 3. - Kevin Ryde, Jul 11 2019
Given any n in the form (k * 2^m, k odd), extract k and m. Categorize the results into two outcomes of (k, m, even or odd). If (k, m) is (odd, even) substitute 1. If (odd, odd), denote the result 0. Example: 5 = (5 * 2^0), (odd, even, = 1). (6 = 3 * 2^1), (odd, odd, = 0). - Gary W. Adamson, Jun 23 2021

Extensions

Alternative description added to the name by Antti Karttunen, Sep 11 2017

A120229 Split-floor-multiplier sequence (SFMS) using multipliers 1/3 and 3. The SFMS using multipliers r and s is here introduced: for every positive integer n and positive real number r, let [rn] abbreviate floor(rn). Then SFMS(r, s), where max {r, s} > 1, is the sequence a defined by a(n)=[rn] if [rn] > 0 and is not already in a and a(n) = [sn] otherwise.

Original entry on oeis.org

3, 6, 1, 12, 15, 2, 21, 24, 27, 30, 33, 4, 39, 42, 5, 48, 51, 54, 57, 60, 7, 66, 69, 8, 75, 78, 9, 84, 87, 10, 93, 96, 11, 102, 105, 108, 111, 114, 13, 120, 123, 14, 129, 132, 135, 138, 141, 16, 147, 150, 17, 156, 159, 18, 165, 168, 19, 174, 177, 20, 183, 186, 189, 192, 195
Offset: 1

Views

Author

Clark Kimberling, Jun 11 2006

Keywords

Comments

Self-inverse permutation of the natural numbers.

Examples

			a(1) = 1*3 because [1/3] is not positive.
a(2) = 2*3 because [2/3] is not positive.
a(3) = 1 = [3*(1/3)].
a(4) = 4*3 because [4/3] = a(3), not new.
		

References

  • Responses to message "Murthy's sequence A073675" to the seqfan mailing list. The message and responses are dated Feb 02 2006 and relate to generalizations and properties of sequence A073675, which is SFMS(1/2,2).

Crossrefs

Row 3 and column 3 of A059897.

Formula

a(n) = [n/3] if this is positive and new, otherwise a(n)=3n.

A120230 Split-floor-multiplier sequence (SFMS) using multipliers 1/4 and 4. (SFMS is defined at A120229.)

Original entry on oeis.org

4, 8, 12, 1, 20, 24, 28, 2, 36, 40, 44, 3, 52, 56, 60, 64, 68, 72, 76, 5, 84, 88, 92, 6, 100, 104, 108, 7, 116, 120, 124, 128, 132, 136, 140, 9, 148, 152, 156, 10, 164, 168, 172, 11, 180, 184, 188, 192, 196, 200, 204, 13, 212, 216, 220, 14, 228, 232, 236, 15, 244, 248
Offset: 1

Views

Author

Clark Kimberling, Jun 11 2006

Keywords

Comments

Self-inverse permutation of the natural numbers.

Examples

			a(1)=1*4 because [1/4] is not positive.
a(2)=2*4 because [2/4] is not positive.
a(3)=3*4 because [3/4] is not positive.
a(4)=1=[4*(1/4)].
a(5)=5*4 because [5/4]=a(4), not new.
		

Crossrefs

Row 4 and column 4 of A059897.

Formula

a(n)=[n/4] if this is positive and new, else a(n)=4n.

A307150 Row 6 of array in A059897.

Original entry on oeis.org

6, 3, 2, 24, 30, 1, 42, 12, 54, 15, 66, 8, 78, 21, 10, 96, 102, 27, 114, 120, 14, 33, 138, 4, 150, 39, 18, 168, 174, 5, 186, 48, 22, 51, 210, 216, 222, 57, 26, 60, 246, 7, 258, 264, 270, 69, 282, 32, 294, 75, 34, 312, 318, 9, 330, 84, 38, 87, 354, 40, 366, 93
Offset: 1

Views

Author

N. J. A. Sloane, Mar 29 2019

Keywords

Comments

From Peter Munn, Apr 02 2019: (Start)
Also column 6 of A059897.
A self-inverse permutation of the positive integers with no fixed points; A073675 composed with A120229.
The permutation swaps pairs of integers whose ratio is 1:6 or 2:3, these ratios corresponding to the factorizations 1*6 = 2*3 = 6. Row 6 is the first row of A059897 to exhibit more than 1 such ratio.
(End)
The integers in the pairs with ratio 1:6 are listed in A036668, the integers in the pairs with ratio 2:3 are listed in A325424. - Peter Munn, Mar 05 2020

Crossrefs

Formula

From Peter Munn, Apr 02 2019: (Start)
a(n) = A059897(6,n) = A059897(n,6).
a(n) = A073675(A120229(n)) = A120229(A073675(n)) = A073675(n) * A120229(n) / n.
(End)

Extensions

More terms from Alois P. Heinz, Mar 31 2019

A319241 Heinz numbers of strict integer partitions of even numbers. Squarefree numbers whose prime indices sum to an even number.

Original entry on oeis.org

1, 3, 7, 10, 13, 19, 21, 22, 29, 30, 34, 37, 39, 43, 46, 53, 55, 57, 61, 62, 66, 70, 71, 79, 82, 85, 87, 89, 91, 94, 101, 102, 107, 111, 113, 115, 118, 129, 130, 131, 133, 134, 138, 139, 146, 151, 154, 155, 159, 163, 165, 166, 173, 181, 183, 186, 187, 190, 193
Offset: 1

Views

Author

Gus Wiseman, Sep 15 2018

Keywords

Comments

The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).
From Peter Munn, Feb 04 2022: (Start)
For every odd squarefree number, s, exactly one of s and 2s is a term.
Closed under the commutative operation A350066(.,.).
Closed under the commutative operation A059897(.,.) forming a subgroup of the positive integers considered as a group under A059897. As subgroups, this sequence and A028982 are each a transversal of the other.
(End)

Examples

			30 is the Heinz number of (3,2,1), which is strict and has even weight, so 30 belongs to the sequence.
The sequence of all even-weight strict partitions begins: (), (2), (4), (3,1), (6), (8), (4,2), (5,1), (10), (3,2,1), (7,1), (12), (6,2), (14), (9,1), (16), (5,3), (8,2), (18), (11,1), (5,2,1), (4,3,1).
		

Crossrefs

Complement of the union of A319242 and A013929.
Intersection of A005117 and A300061.

Programs

  • Mathematica
    Select[Range[100],And[SquareFreeQ[#],EvenQ[Total[Cases[FactorInteger[#],{p_,k_}:>k*PrimePi[p]]]]]&]
  • PARI
    isok(m) = issquarefree(m) && !(vecsum(apply(primepi, factor(m)[,1])) % 2); \\ Michel Marcus, Feb 08 2022

Formula

{a(n) : n >= 1} = {A019565(A158704(n)) : n >= 1} = {A073675(A319242(n)) : n >= 1}. - Peter Munn, Feb 04 2022

A366389 Variant of bijective bit-reverse of n (A057889) for which it holds that a(n) == n (mod 3).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 26, 12, 22, 14, 15, 16, 17, 18, 25, 20, 21, 13, 29, 24, 19, 11, 27, 28, 23, 30, 31, 32, 33, 34, 98, 36, 82, 50, 57, 40, 74, 42, 106, 104, 45, 58, 122, 48, 70, 38, 51, 88, 86, 54, 118, 56, 39, 46, 110, 60, 94, 62, 63, 64, 65, 66, 97, 68, 81, 49, 113, 72, 73, 41, 105, 100, 89, 114, 121
Offset: 0

Views

Author

Antti Karttunen, Oct 22 2023

Keywords

Comments

Like A057889, also this is a self-inverse permutation of nonnegative integers.

Crossrefs

Cf. A010872, A030101, A057889, A073675, A366378, A366379, A366390 (Dirichlet inverse), A366392.
Cf. also A118967.

Programs

Formula

If A057889(n) == n mod 3, then a(n) = A057889(n), otherwise a(n) = A073675(A057889(n)) = A057889(A073675(n)).
For all n >= 0, A010872(a(n)) = A010872(n).

A214682 Remove 2's that do not contribute to a factor of 4 from the prime factorization of n.

Original entry on oeis.org

1, 1, 3, 4, 5, 3, 7, 4, 9, 5, 11, 12, 13, 7, 15, 16, 17, 9, 19, 20, 21, 11, 23, 12, 25, 13, 27, 28, 29, 15, 31, 16, 33, 17, 35, 36, 37, 19, 39, 20, 41, 21, 43, 44, 45, 23, 47, 48, 49, 25, 51, 52, 53, 27, 55, 28, 57, 29
Offset: 1

Views

Author

Tyler Ball, Jul 25 2012

Keywords

Comments

In this sequence, the number 4 exhibits some characteristics of a prime number since all extraneous 2's have been removed from the prime factorizations of all other numbers.

Examples

			For n=8, v_4(8)=1, v_2(8)=3, so a(8)=(8*4^1)/(2^3)=4.
For n=12, v_4(12)=1, v_2(12)=2, so a(12)=(12*4^1)/(2^2)=12.
		

Crossrefs

Range of values: A003159.
Missing values: A036554.
A056832, A059895, A073675 are used in a formula defining this sequence.
A059897 is used to express relationship between terms of this sequence.
Cf. A007814 (v_2(n)), A235127 (v_4(n)).

Programs

  • Mathematica
    a[n_] := n/(2^Mod[IntegerExponent[n, 2], 2]); Array[a, 100] (* Amiram Eldar, Dec 09 2020 *)
  • PARI
    a(n)=n>>(valuation(n,2)%2) \\ Charles R Greathouse IV, Jul 26 2012
    
  • Python
    def A214682(n): return n>>1 if (~n&n-1).bit_length()&1 else n # Chai Wah Wu, Jan 09 2023
  • SageMath
    C = []
    for i in [1..n]:
        C.append(i*4^(Integer(i).valuation(4))/2^(Integer(i).valuation(2)))
    

Formula

a(n) = (n*4^(v_4(n)))/(2^(v_2(n))) where v_k(n) is the k-adic valuation of n. That is, v_k(n) is the largest power of k, a, such that k^a divides n.
For n odd, a(n)=n since n has no factors of 2 (or 4).
From Peter Munn, Nov 29 2020: (Start)
a(A003159(n)) = n.
a(A036554(n)) = n/2.
a(n) = n/A056832(n) = n/A059895(n, 2) = min(n, A073675(n)).
a(A059897(n, k)) = A059897(a(n), a(k)). (End)
Multiplicative with a(2^e) = 2^(2*floor(e/2)), and a(p^e) = p^e for odd primes p. - Amiram Eldar, Dec 09 2020
Sum_{k=1..n} a(k) ~ (5/12) * n^2. - Amiram Eldar, Nov 10 2022
Dirichlet g.f.: zeta(s-1)*(2^s+1)/(2^s+2). - Amiram Eldar, Dec 30 2022

A382357 Lexicographically earliest sequence of distinct positive integers such that the 2-adic valuations of adjacent terms differ exactly by one.

Original entry on oeis.org

1, 2, 3, 6, 4, 8, 12, 10, 5, 14, 7, 18, 9, 22, 11, 26, 13, 30, 15, 34, 17, 38, 19, 42, 20, 24, 16, 32, 48, 40, 28, 46, 21, 50, 23, 54, 25, 58, 27, 62, 29, 66, 31, 70, 33, 74, 35, 78, 36, 56, 44, 72, 52, 82, 37, 86, 39, 90, 41, 94, 43, 98, 45, 102, 47, 106, 49
Offset: 1

Views

Author

Rémy Sigrist, Mar 22 2025

Keywords

Comments

The first term with a given 2-adic valuation, say k, is necessarily 2^k.
Empirically, powers of two appear as pairs of consecutive terms.
We cannot have three consecutive powers of 2: if a(n) = 2^k and a(n+1) = 2^(k+1) then a(n+2) <= 3*2^k < 2^(k+2).
All powers of two appear in the sequence:
- by contradiction: if 2^m is missing, then the 2-adic valuation of the terms of the sequence is bounded by m,
- by necessity, we have some k < m such that all the integers with 2-adic valuation k appear in the sequence,
- hence all integers with 2-adic valuation k+1 (and k-1 provided k > 0) will appear in the sequence,
- gradually, all integers with 2-adic valuation k+2, k+3, etc. and eventually 2^m, will appear, a contradiction.
Conjecture: this sequence is a permutation of the positive integers.
The fact that A007814 contains every positive integer infinitely many times is not sufficient to guarantee that the present sequence is a permutation of the positive integers (the variant based on A003602 instead of A007814 contains only finitely many even numbers, and so is not a permutation of the positive integers, although A003602 contains every positive integer infinitely many times).

Examples

			The initial terms are:
  n   a(n)  A007814(a(n))
  --  ----  -------------
   1     1              0
   2     2              1
   3     3              0
   4     6              1
   5     4              2
   6     8              3
   7    12              2
   8    10              1
   9     5              0
  10    14              1
  11     7              0
  12    18              1
  13     9              0
  14    22              1
  15    11              0
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

A118967 If n doesn't occur among the first (n-1) terms of the sequence, then a(n) = 2n. If n occurs among the first (n-1) terms of the sequence, then a(n) = n/2.

Original entry on oeis.org

1, 4, 6, 2, 10, 3, 14, 16, 18, 5, 22, 24, 26, 7, 30, 8, 34, 9, 38, 40, 42, 11, 46, 12, 50, 13, 54, 56, 58, 15, 62, 64, 66, 17, 70, 72, 74, 19, 78, 20, 82, 21, 86, 88, 90, 23, 94, 96, 98, 25, 102, 104, 106, 27, 110, 28, 114, 29, 118, 120, 122, 31, 126, 32, 130, 33, 134, 136
Offset: 1

Views

Author

Leroy Quet, May 07 2006

Keywords

Comments

Sequence is a permutation of the positive integers. It also is its own inverse (i.e. a(a(n)) = n).
From Carl R. White, Aug 23 2010: (Start)
Powers of two with even exponent exchange places with the next lowest power of two with odd exponent and vice versa, i.e., 4 swaps with 2, 256 with 128, etc.
For other numbers where n > 1, the even component (the power of two in n's prime factorization) is exchanged the opposite way: A power of two with odd component is exchanged for the next lowest (even exponent) power of two and vice versa. (End)

Examples

			a(6) = 2^1*3 -> 2^0*3 = 3; a(12) = 2^2*3 -> 2^3*3 = 24; a(25)=2^0*25 -> 2^1*25 = 50; a(1024) = 2^10 -> 2^9 = 512; a(5120) = 2^10*5 -> 2^11*5 = 10240. - _Carl R. White_, Aug 23 2010
		

Crossrefs

Cf. A118966.
Matches A073675 for all non-powers-of-two. - Carl R. White, Aug 23 2010

Programs

  • Mathematica
    f[s_] := Block[{n = Length@s}, Append[s, If[ MemberQ[s, n], n/2, 2n]]]; Drop[ Nest[f, {1}, 70], {2}] (* Robert G. Wilson v, May 16 2006 *)
  • bc
    /* GNU bc */ scale=0;1;for(n=2;n<=100;n++){m=0;for(k=n;!k%2;m++)k/=2;if(k==1){2^(m-(-1)^m)}else{k*2^(m+(-1)^m)}} /* Carl R. White, Aug 23 2010 */

Formula

From Carl R. White, Aug 23 2010: (Start)
a(1) = 1;
a(2^m) = 2^(m-(-1)^m), m > 0;
a(k*2^m) = k*2^(m+(-1)^m), m > 0, odd k > 1. (End)

Extensions

More terms from Robert G. Wilson v, May 16 2006
Showing 1-10 of 18 results. Next