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.

A005940 The Doudna sequence: write n-1 in binary; power of prime(k) in a(n) is # of 1's that are followed by k-1 0's.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 8, 7, 10, 15, 12, 25, 18, 27, 16, 11, 14, 21, 20, 35, 30, 45, 24, 49, 50, 75, 36, 125, 54, 81, 32, 13, 22, 33, 28, 55, 42, 63, 40, 77, 70, 105, 60, 175, 90, 135, 48, 121, 98, 147, 100, 245, 150, 225, 72, 343, 250, 375, 108, 625, 162, 243, 64, 17, 26, 39
Offset: 1

Views

Author

Keywords

Comments

A permutation of the natural numbers. - Robert G. Wilson v, Feb 22 2005
Fixed points: A029747. - Reinhard Zumkeller, Aug 23 2006
The even bisection, when halved, gives the sequence back. - Antti Karttunen, Jun 28 2014
From Antti Karttunen, Dec 21 2014: (Start)
This irregular table can be represented as a binary tree. Each child to the left is obtained by applying A003961 to the parent, and each child to the right is obtained by doubling the parent:
1
|
...................2...................
3 4
5......../ \........6 9......../ \........8
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
7 10 15 12 25 18 27 16
11 14 21 20 35 30 45 24 49 50 75 36 125 54 81 32
etc.
Sequence A163511 is obtained by scanning the same tree level by level, from right to left. Also in binary trees A253563 and A253565 the terms on level of the tree are some permutation of the terms present on the level n of this tree. A252464(n) gives the distance of n from 1 in all these trees.
A252737(n) gives the sum and A252738(n) the product of terms on row n (where 1 is on row 0, 2 on row 1, 3 and 4 on row 2, etc.). A252745(n) gives the number of nodes on level n whose left child is larger than the right child, A252750 the difference between left and right child for each node from node 2 onward.
(End)
-A008836(a(1+n)) gives the corresponding numerator for A323505(n). - Antti Karttunen, Jan 19 2019
(a(2n+1)-1)/2 [= A244154(n)-1, for n >= 0] is a permutation of the natural numbers. - George Beck and Antti Karttunen, Dec 08 2019
From Peter Munn, Oct 04 2020: (Start)
Each term has the same even part (equivalently, the same 2-adic valuation) as its index.
Using the tree depicted in Antti Karttunen's 2014 comment:
Numbers are on the right branch (4 and descendants) if and only if divisible by the square of their largest prime factor (cf. A070003).
Numbers on the left branch, together with 2, are listed in A102750.
(End)
According to Kutz (1981), he learned of this sequence from American mathematician Byron Leon McAllister (1929-2017) who attributed the invention of the sequence to a graduate student by the name of Doudna (first name Paul?) in the mid-1950's at the University of Wisconsin. - Amiram Eldar, Jun 17 2021
From David James Sycamore, Sep 23 2022: (Start)
Alternative (recursive) definition: If n is a power of 2 then a(n)=n. Otherwise, if 2^j is the greatest power of 2 not exceeding n, and if k = n - 2^j, then a(n) is the least m*a(k) that has not occurred previously, where m is an odd prime.
Example: Use recursion with n = 77 = 2^6 + 13. a(13) = 25 and since 11 is the smallest odd prime m such that m*a(13) has not already occurred (see a(27), a(29),a(45)), then a(77) = 11*25 = 275. (End)
The odd bisection, when transformed by replacing all prime(k)^e in a(2*n - 1) with prime(k-1)^e, returns a(n), and thus gives the sequence back. - David James Sycamore, Sep 28 2022

Examples

			From _N. J. A. Sloane_, Aug 22 2022: (Start)
Let c_i = number of 1's in binary expansion of n-1 that have i 0's to their right, and let p(j) = j-th prime.  Then a(n) = Product_i p(i+1)^c_i.
If n=9, n-1 is 1000, c_3 = 1, a(9) = p(4)^1 = 7.
If n=10, n-1 = 1001, c_0 = 1, c_2 = 1, a(10) = p(1)*p(3) = 2*5 = 10.
If n=11, n-1 = 1010, c_1 = 1, c_2 = 1, a(11) = p(2)*p(3) = 15. (End)
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A103969. Inverse is A005941 (A156552).
Cf. A125106. [From Franklin T. Adams-Watters, Mar 06 2010]
Cf. A252737 (gives row sums), A252738 (row products), A332979 (largest on row).
Related permutations of positive integers: A163511 (via A054429), A243353 (via A006068), A244154, A253563 (via A122111), A253565, A332977, A334866 (via A225546).
A000120, A003602, A003961, A006519, A053645, A070939, A246278, A250246, A252753, A253552 are used in a formula defining this sequence.
Formulas for f(a(n)) are given for f = A000265, A003963, A007949, A055396, A056239.
Numbers that occur at notable sets of positions in the binary tree representation of the sequence: A000040, A000079, A002110, A070003, A070826, A102750.
Cf. A106737, A290077, A323915, A324052, A324054, A324055, A324056, A324057, A324058, A324114, A324335, A324340, A324348, A324349 for various number-theoretical sequences applied to (i.e., permuted by) this sequence.
k-adic valuation: A007814 (k=2), A337821 (k=3).
Positions of multiples of 3: A091067.
Primorial deflation: A337376 / A337377.
Sum of prime indices of a(n) is A161511, reverse version A359043.
A048793 lists binary indices, ranked by A019565.
A066099 lists standard comps, partial sums A358134 (ranked by A358170).

Programs

  • Haskell
    a005940 n = f (n - 1) 1 1 where
       f 0 y _          = y
       f x y i | m == 0 = f x' y (i + 1)
               | m == 1 = f x' (y * a000040 i) i
               where (x',m) = divMod x 2
    -- Reinhard Zumkeller, Oct 03 2012
    (Scheme, with memoization-macro definec from Antti Karttunen's IntSeq-library)
    (define (A005940 n) (A005940off0 (- n 1))) ;; The off=1 version, utilizing any one of three different offset-0 implementations:
    (definec (A005940off0 n) (cond ((< n 2) (+ 1 n)) (else (* (A000040 (- (A070939 n) (- (A000120 n) 1))) (A005940off0 (A053645 n))))))
    (definec (A005940off0 n) (cond ((<= n 2) (+ 1 n)) ((even? n) (A003961 (A005940off0 (/ n 2)))) (else (* 2 (A005940off0 (/ (- n 1) 2))))))
    (define (A005940off0 n) (let loop ((n n) (i 1) (x 1)) (cond ((zero? n) x) ((even? n) (loop (/ n 2) (+ i 1) x)) (else (loop (/ (- n 1) 2) i (* x (A000040 i)))))))
    ;; Antti Karttunen, Jun 26 2014
    
  • Maple
    f := proc(n,i,x) option remember ; if n = 0 then x; elif type(n,'even') then procname(n/2,i+1,x) ; else procname((n-1)/2,i,x*ithprime(i)) ; end if; end proc:
    A005940 := proc(n) f(n-1,1,1) ; end proc: # R. J. Mathar, Mar 06 2010
  • Mathematica
    f[n_] := Block[{p = Partition[ Split[ Join[ IntegerDigits[n - 1, 2], {2}]], 2]}, Times @@ Flatten[ Table[q = Take[p, -i]; Prime[ Count[ Flatten[q], 0] + 1]^q[[1, 1]], {i, Length[p]}] ]]; Table[ f[n], {n, 67}] (* Robert G. Wilson v, Feb 22 2005 *)
    Table[Times@@Prime/@(Join@@Position[Reverse[IntegerDigits[n,2]],1]-Range[DigitCount[n,2,1]]+1),{n,0,100}] (* Gus Wiseman, Dec 28 2022 *)
  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, n%2 && (t*=p) || p=nextprime(p+1)); t } \\ M. F. Hasler, Mar 07 2010; update Aug 29 2014
    
  • PARI
    a(n)=my(p=2, t=1); for(i=0,exponent(n), if(bittest(n,i), t*=p, p=nextprime(p+1))); t \\ Charles R Greathouse IV, Nov 11 2021
    
  • Python
    from sympy import prime
    import math
    def A(n): return n - 2**int(math.floor(math.log(n, 2)))
    def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n))
    print([b(n - 1) for n in range(1, 101)]) # Indranil Ghosh, Apr 10 2017
    
  • Python
    from math import prod
    from itertools import accumulate
    from collections import Counter
    from sympy import prime
    def A005940(n): return prod(prime(len(a)+1)**b for a, b in Counter(accumulate(bin(n-1)[2:].split('1')[:0:-1])).items()) # Chai Wah Wu, Mar 10 2023

Formula

From Reinhard Zumkeller, Aug 23 2006, R. J. Mathar, Mar 06 2010: (Start)
a(n) = f(n-1, 1, 1)
where f(n, i, x) = x if n = 0,
= f(n/2, i+1, x) if n > 0 is even
= f((n-1)/2, i, x*prime(i)) otherwise. (End)
From Antti Karttunen, Jun 26 2014: (Start)
Define a starting-offset 0 version of this sequence as:
b(0)=1, b(1)=2, [base cases]
and then compute the rest either with recurrence:
b(n) = A000040(1+(A070939(n)-A000120(n))) * b(A053645(n)).
or
b(2n) = A003961(b(n)), b(2n+1) = 2 * b(n). [Compare this to the similar recurrence given for A163511.]
Then define a(n) = b(n-1), where a(n) gives this sequence A005940 with the starting offset 1.
Can be also defined as a composition of related permutations:
a(n+1) = A243353(A006068(n)).
a(n+1) = A163511(A054429(n)). [Compare the scatter plots of this sequence and A163511 to each other.]
This permutation also maps between the partitions as enumerated in the lists A125106 and A112798, providing identities between:
A161511(n) = A056239(a(n+1)). [The corresponding sums ...]
A243499(n) = A003963(a(n+1)). [... and the products of parts of those partitions.]
(End)
From Antti Karttunen, Dec 21 2014 - Jan 04 2015: (Start)
A002110(n) = a(1+A002450(n)). [Primorials occur at (4^n - 1)/3 in the offset-0 version of the sequence.]
a(n) = A250246(A252753(n-1)).
a(n) = A122111(A253563(n-1)).
For n >= 1, A055396(a(n+1)) = A001511(n).
For n >= 2, a(n) = A246278(1+A253552(n)).
(End)
From Peter Munn, Oct 04 2020: (Start)
A000265(a(n)) = a(A000265(n)) = A003961(a(A003602(n))).
A006519(a(n)) = a(A006519(n)) = A006519(n).
a(n) = A003961(a(A003602(n))) * A006519(n).
A007814(a(n)) = A007814(n).
A007949(a(n)) = A337821(n) = A007814(A003602(n)).
a(n) = A225546(A334866(n-1)).
(End)
a(2n) = 2*a(n), or generally a(2^k*n) = 2^k*a(n). - Amiram Eldar, Oct 03 2022
If n-1 = Sum_{i} 2^(q_i-1), then a(n) = Product_{i} prime(q_i-i+1). These are the Heinz numbers of the rows of A125106. If the offset is changed to 0, the inverse is A156552. - Gus Wiseman, Dec 28 2022

Extensions

More terms from Robert G. Wilson v, Feb 22 2005
Sign in a formula switched and Maple program added by R. J. Mathar, Mar 06 2010
Binary tree illustration and keyword tabf added by Antti Karttunen, Dec 21 2014

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

Original entry on oeis.org

2, 3, 6, 8, 10, 5, 14, 12, 18, 15, 22, 24, 26, 21, 30, 32, 34, 27, 38, 40, 42, 33, 46, 20, 50, 39, 54, 56, 58, 7, 62, 48, 66, 51, 70, 72, 74, 57, 78, 60, 82, 35, 86, 88, 90, 69, 94, 96, 98, 75, 102, 104, 106, 45, 110, 84, 114, 87, 118, 120, 122, 93, 126, 128, 130, 55
Offset: 1

Views

Author

Peter Munn, May 09 2020

Keywords

Comments

A bijection from the positive integers to the nonsquares, A000037.
A003159 (which has asymptotic density 2/3) lists index n such that a(n) = 2n. The sequence maps the terms of A003159 1:1 onto A036554, defining a bijection between them.
Similarly, bijections are defined from A007417 to A325424, from A325424 to A145204\{0}, and from the first in each of the following pairs to the nonsquare integers in the second: (A145204\{0}, A036668), (A036668, A007417), (A036554, A003159), (A332820, A332821), (A332821, A332822), (A332822, A332820). Note that many of these are between sets where membership depends on whether a number's squarefree part divides by 2 and/or 3.
Starting from 1, and iterating the sequence as a(1) = 2, a(2) = 3, a(3) = 6, a(6) = 5, a(5) = 10, etc., runs through the squarefree numbers in the order they appear in A019565. - Antti Karttunen, Jun 08 2020

Examples

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

Crossrefs

Permutation of A000037.
Row 2, and therefore column 2, of A331590. Cf. A334748 (row 3).
A007913, A034386, A053669, A225546 are used in formulas defining the sequence.
The formula section details how the sequence maps the terms of A002110, A003961, A019565; and how f(a(n)) relates to f(n) for f = A008833, A048675, A267116; making use of A003986.
Subsequences: A016825 (odd bisection), A036554, A329575.
Bijections are defined that relate to A003159, A007417, A036668, A145204, A325424, A332820, A332821, A332822.
Cf. also binary trees A334860, A334866 and A334870 (a left inverse).

Programs

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

Formula

a(n) = n * m / A034386(m-1), where m = A053669(A007913(n)).
a(n) = A331590(2, n) = A225546(2 * A225546(n)).
a(A019565(n)) = A019565(n+1).
a(k * m^2) = a(k) * m^2.
a(A003961(n)) = 2 * A003961(n).
a(2 * A003961(n)) = A003961(a(n)).
a(A002110(n)) = prime(n+1).
A048675(a(n)) = A048675(n) + 1.
A008833(a(n)) = A008833(n).
A267116(a(n)) = A267116(n) OR 1, where OR denotes the bitwise operation A003986.
a(A003159(n)) = A036554(n) = 2 * A003159(n).
A334870(a(n)) = n. - Antti Karttunen, Jun 08 2020

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)).

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

Views

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

A334110 The squares of squarefree numbers (A062503), ordered lexicographically according to their prime factors. a(n) = Product_{k in I} prime(k+1)^2, where I are the indices of nonzero binary digits in n = Sum_{k in I} 2^k.

Original entry on oeis.org

1, 4, 9, 36, 25, 100, 225, 900, 49, 196, 441, 1764, 1225, 4900, 11025, 44100, 121, 484, 1089, 4356, 3025, 12100, 27225, 108900, 5929, 23716, 53361, 213444, 148225, 592900, 1334025, 5336100, 169, 676, 1521, 6084, 4225, 16900, 38025, 152100, 8281, 33124, 74529, 298116, 207025, 828100, 1863225, 7452900, 20449, 81796, 184041
Offset: 0

Views

Author

Antti Karttunen and Peter Munn, May 01 2020

Keywords

Comments

For the lexicographic ordering, the prime factors must be written in nonincreasing order. If we write the factors in nondecreasing order, we get a lexicographically ordered set with an order type that is greater than a natural number index - the resulting sequence does not include all qualifying numbers. (Note also that the symbols used for the lexicographic order are the prime numbers, not their digits.)
a(n) is the n-th power of 4 in the monoid defined in A331590.
Conjecture: a(n) is the position of the first occurrence of n in A334109.

Examples

			The initial terms are shown below, equated with the product of their prime factors to exhibit the lexicographic ordering. The list starts with 1, since 1 is factored as the empty product and the empty list is first in lexicographic order.
    1 = .
    4 = 2*2.
    9 = 3*3.
   36 = 3*3*2*2.
   25 = 5*5.
  100 = 5*5*2*2.
  225 = 5*5*3*3.
  900 = 5*5*3*3*2*2.
   49 = 7*7.
  196 = 7*7*2*2.
  441 = 7*7*3*3.
		

Crossrefs

Cf. A000079, A019565 (square roots), A048675, A097248, A225546, A267116, A332382, A334109 (a left inverse).
Column 2 of A329332. Permutation of A062503.
After 1, the right children of the leftmost edge of A334860, or respectively, the left children of the rightmost edge of A334866.
Subsequences: A001248, A061742, A166329.
Subsequence of A052330.
A003961, A003987, A059897, A331590 are used to express relationship between terms of this sequence.

Programs

  • Mathematica
    Array[If[# == 0, 1, Times @@ Flatten@ Map[Function[{p, e}, Map[Prime[Log2@ # + 1]^(2^(PrimePi@ p - 1)) &, DeleteCases[NumberExpand[e, 2], 0]]] @@ # &, FactorInteger[3^#]]] &, 51, 0] (* Michael De Vlieger, May 26 2020 *)
  • PARI
    A334110(n) = { my(p=2,m=1); while(n, if(n%2, m *= p^2); n >>= 1; p = nextprime(1+p)); (m); };

Formula

a(n) = A019565(n)^2.
For n >= 1, a(A000079(n-1)) = A001248(n).
For all n >= 0, A334109(a(n)) = n.
a(n+k) = A331590(a(n), a(k)).
a(n XOR k) = A059897(a(n), a(k)), where XOR denotes bitwise exclusive-or, A003987.
a(n) = A225546(3^n).
a(2n) = A003961(a(n)).
a(2n+1) = 4 * a(2n).
a(2^k-1) = A061742(k).
A267116(a(n)) = 2.
A048675(a(n)) = 2n.
A097248(a(n)) = A332382(n) = A019565(2n).

A334871 Number of steps needed to reach 1 when starting from n and iterating with A334870.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 08 2020

Keywords

Comments

Distance of n from the root (1) in binary trees like A334860 and A334866.
Each n > 0 occurs 2^(n-1) times.
a(n) is the size of the inner lining of the integer partition with Heinz number A225546(n), which is also the size of the largest hook of the same partition. (After Gus Wiseman's Apr 02 2019 comment in A252464).

Crossrefs

Programs

  • 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));
    A334871(n) = { my(s=0); while(n>1,s++; n = A334870(n)); (s); };
    
  • PARI
    \\ Much faster:
    A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; };
    A334871(n) = { my(s=0); while(n>1, if(issquare(n), s++; n = sqrtint(n), s += A048675(core(n)); n /= core(n))); (s); };

Formula

a(1) = 0; for n > 1, a(n) = 1 + a(A334870(n)).
a(n) = A252464(A225546(n)).
a(n) = A048675(A007913(n)) + a(A008833(n)).
For n > 1, a(n) = 1 + A048675(A007913(n)) + a(A000188(n)).
For n > 1, a(n) = A070939(A334859(n)) = A070939(A334865(n)).
For all n >= 1, a(n) >= A299090(n).
For all n >= 1, a(n) >= A334872(n).

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

Views

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).

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

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 5, 16, 9, 12, 10, 32, 15, 24, 18, 256, 30, 64, 7, 48, 27, 20, 14, 512, 36, 40, 81, 96, 21, 128, 42, 65536, 54, 60, 72, 1024, 35, 120, 45, 768, 70, 192, 105, 80, 162, 28, 210, 131072, 25, 144, 90, 160, 11, 4096, 108, 1536, 135, 56, 22, 2048, 33, 84, 243, 4294967296, 216, 384, 66, 240, 270, 288, 55, 262144, 110, 168, 324, 480, 50
Offset: 1

Views

Author

Antti Karttunen and Peter Munn, Jul 17 2020

Keywords

Comments

A225546 and A122111 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: A225546 maps the k-th prime to 2^2^(k-1), whereas A122111 maps it to 2^k.
In composing these permutations, this sequence maps the list of prime numbers to the squarefree numbers, as listed in A019565; and the "normal" numbers (A055932), as listed in A057335, to ascending powers of 2.

Crossrefs

A225546 composed with A122111.
Sorted even bisection: A335738.
Sorted odd bisection (excluding 1): A335740.
Sequences used to express relationship between terms of this sequence: A001222, A003961, A253560, A331590, A350066.
Sequences of sequences (S_1, S_2, ... S_j) with the property a(S_i) = S_{i+1}, or essentially so: (A033844, A000040, A019565), (A057335, A000079, A001146), (A000244, A011764), (A001248, A334110), (A253563, A334866).
The inverse permutation, A336321, lists sequences where the property is weaker (between the sets of terms).

Formula

a(A033844(m)) = A000040(m+1). [Offset corrected Peter Munn, Feb 14 2022]
a(A000040(m)) = A019565(m).
a(A057335(m)) = 2^m.
For m >= 1, a(2^m) = A001146(m-1).
a(A253563(m)) = A334866(m).
From Peter Munn, Feb 14 2022: (Start)
a(A253560(n)) = a(n)^2.
For n >= 2, a(A003961(n)) = A331590(a(n), 2^2^(A001222(n)-1)).
a(A350066(n, k)) = A331590(a(n), a(k)).
(End)

A334865 a(n) = A156552(A225546(n)).

Original entry on oeis.org

0, 1, 3, 2, 15, 7, 255, 5, 6, 31, 65535, 11, 4294967295, 511, 63, 4, 18446744073709551615, 13, 340282366920938463463374607431768211455, 47, 1023, 131071, 115792089237316195423570985008687907853269984665640564039457584007913129639935, 23, 30, 8589934591, 27, 767
Offset: 1

Views

Author

Antti Karttunen, Jun 08 2020

Keywords

Crossrefs

Inverse permutation of A334866. Composition of permutations A156552 and A225546, and also of A054429 and A334859.
Cf. A334871.

Formula

a(n) = A156552(A225546(n)).
a(n) = A054429(A334859(n)).
For n > 1, A070939(a(n)) = A334871(n).

A335428 Prime exponent of the first Fermi-Dirac factor (number of form p^(2^k), A050376) reached, when starting from n and iterating with A334870, with a(1) = 0.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 4, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 4, 4, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 4, 1, 2, 2, 1, 1, 1, 1, 2, 1
Offset: 1

Views

Author

Antti Karttunen, Jun 26 2020

Keywords

Examples

			For n=27, when iterating with A334870, we obtain the path 27 -> 18 -> 9, with that 9 being the first prime power encountered that has an exponent of the form 2^k, as 9 = 3^2, thus a(27) = 2. See the binary tree A334860 or A334866 for how such paths go.
For n=900, when iterating with A334870 we obtain the path 900 -> 30 -> 15 -> 10 -> 5, and 5^1 is finally a prime power with an exponent that is two's power, thus a(900) = 1. Note that 900 is the first such position of 1 in this sequence that is not listed in A333634.
		

Crossrefs

Programs

  • PARI
    A209229(n) = (n && !bitand(n,n-1));
    A302777(n) = A209229(isprimepower(n));
    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));
    A335428(n) = { while(n>1 && !A302777(n), n = A334870(n)); isprimepower(n); };
    
  • PARI
    \\ Faster, A209229 and A302777 like in above:
    A335428(n) = if(1==n,0, while(!A302777(n), if(issquarefree(n), return(1)); if(issquare(n), n = sqrtint(n), n /= core(n))); isprimepower(n));
Showing 1-10 of 10 results.