login
Search: a241909 -id:a241909
     Sort: relevance | references | number | modified | created      Format: long | short | data
Permutation of natural numbers, the odd bisection of A241909 halved; equally, a composition of A064216 and A241909: a(n) = A241909(A064216(n)).
+20
18
1, 2, 4, 8, 3, 16, 32, 9, 64, 128, 27, 256, 6, 5, 512, 1024, 81, 18, 2048, 243, 4096, 8192, 25, 16384, 12, 729, 32768, 54, 2187, 65536, 131072, 125, 162, 262144, 6561, 524288, 1048576, 15, 36, 2097152, 7, 4194304, 486, 19683, 8388608, 108, 59049, 1458, 16777216, 625, 33554432, 67108864, 75
OFFSET
1,2
COMMENTS
Are there any other fixed points than 1, 2, 18 and 72?
FORMULA
a(1) = 1, and for n>=2, a(n) = A241909(2n-1)/2. Equally, a(n) = ceiling(A241909(2n-1)/2) for all n.
As a composition of related permutations:
a(n) = A241909(A064216(n)).
a(n) = A241909(A243061(A241909(n))).
For all n, a(A006254(n)) = 2^n.
PROG
(Scheme) (define (A243065 n) (A241909 (A064216 n)))
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 01 2014
STATUS
approved
Permutation of natural numbers, the even bisection of A241909 incremented by one and halved; equally, a composition of A241909 and A048673: a(n) = A048673(A241909(n)).
+20
18
1, 2, 5, 3, 14, 13, 41, 4, 8, 63, 122, 25, 365, 313, 38, 6, 1094, 18, 3281, 172, 188, 1563, 9842, 61, 23, 7813, 11, 1201, 29525, 123, 88574, 7, 938, 39063, 113, 39, 265721, 195313, 4688, 666, 797162, 858, 2391485, 8404, 74, 976563, 7174454, 85, 68, 88, 23438, 58825, 21523361, 28
OFFSET
1,2
COMMENTS
For n > 1, 2n is found in A241909 from the position (2*a(n))-1. I.e., A241909((2*a(n))-1) = 2n for all n >= 2.
Or in other words, a(n) gives the position in the odd bisection of A241909 where 2n is located at.
Are there any other fixed points than 1, 2, 18 and 72?
FORMULA
a(1) = 1, a(n) = (A241909(2*n)+1)/2.
As a composition of related permutations:
a(n) = A048673(A241909(n)).
a(n) = A241909(A243062(A241909(n))).
For all n>=1, a(2^n) = A006254(n).
PROG
(Scheme, two alternatives)
(define (A243066 n) (if (= n 1) 1 (/ (+ 1 (A241909 (* 2 n))) 2)))
(define (A243066 n) (A048673 (A241909 n)))
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 01 2014
STATUS
approved
Integer sequence induced by Bulgarian solitaire operation on partition list A241918: a(n) = A241909(A242424(A241909(n))).
+20
9
1, 2, 4, 3, 8, 25, 16, 9, 9, 343, 32, 10, 64, 14641, 125, 27, 128, 15, 256, 98, 2401, 371293, 512, 30, 27, 24137569, 6, 2662, 1024, 147, 2048, 81, 161051, 893871739, 625, 50, 4096, 78310985281, 4826809, 28, 8192, 3993, 16384, 57122, 50, 14507145975869, 32768, 90, 81
OFFSET
1,2
COMMENTS
In "Bulgarian solitaire" a deck of cards or another finite set of objects is divided into one or more piles, and the "Bulgarian operation" is performed by taking one card from each pile, and making a new pile of them, which is added to the remaining set of piles. Essentially, this operation is a function whose domain and range are unordered integer partitions (cf. A000041) and which preserves the total size of a partition (the sum of its parts). This sequence is induced when the operation is implemented on the partitions as ordered by the list A241918.
REFERENCES
Martin Gardner, Colossal Book of Mathematics, Chapter 34, Bulgarian Solitaire and Other Seemingly Endless Tasks, pp. 455-467, W. W. Norton & Company, 2001.
LINKS
Ethan Akin and Morton Davis, "Bulgarian solitaire", American Mathematical Monthly 92 (4): 237-250. (1985).
FORMULA
a(n) = A241909(A242424(A241909(n))).
a(n) = 1 + A075157(A226062(A075158(n-1))).
A243503(a(n)) = A243503(n) for all n. [Because Bulgarian operation doesn't change the total sum of the partition].
EXAMPLE
For n = 10, we see that as 10 = 2*5 = p_1^1 * p_2^0 * p_3^1, it encodes a partition [2,2,2]. Applying one step of Bulgarian solitaire (subtract one from each part, and add a new part as large as there were parts in the old partition) to this partition results a new partition [1,1,1,3], which is encoded in the prime factorization of p_1^0 * p_2^0 * p_3^0 * p_4^3 = 7^3 = 343. Thus a(10) = 343.
For n = 46, we see that as 46 = 2*23 = p_1 * p_9 = p_1^1 * p_2^0 * p_3^0 * ... * p_9^1, it encodes a partition [2,2,2,2,2,2,2,2,2]. Applying one step of Bulgarian solitaire to this partition results a new partition [1,1,1,1,1,1,1,1,1,9], which is encoded in the prime factorization of p_1^0 * p_2^0 * ... * p_9^0 * p_10^9 = 29^9 = 14507145975869. Thus a(46) = 14507145975869.
For n = 1875, we see that as 1875 = p_1^0 * p_2^1 * p_3^4, it encodes a partition [1,2,5]. Applying Bulgarian Solitaire, we get a new partition [1,3,4]. This in turn is encoded by p_1^0 * p_2^2 * p_3^2 = 3^2 * 5^2 = 225. Thus a(1875)=225.
PROG
(Scheme, three different implementations)
(define (A243051 n) (A241909 (A242424 (A241909 n))))
(define (A243051 n) (1+ (A075157 (A226062 (A075158 (- n 1))))))
;; The following requires Aubrey Jaffer's SLIB Scheme library:
(require 'factor)
(define (A243051 n) (explist->n (ascpart_to_prime-exps (bulgarian-operation (prime-exps_to_ascpart (primefacs->explist n))))))
(define (bulgarian-operation ascpart) (let loop ((newpartition (list (length ascpart))) (ascpart ascpart)) (cond ((null? ascpart) (sort newpartition <)) (else (loop (if (= 1 (car ascpart)) newpartition (cons (- (car ascpart) 1) newpartition)) (cdr ascpart))))))
(define (primefacs->explist n) (reverse! (primefactorization->explist n)))
(define (primefactorization->explist n) (if (= 1 n) (list) (let loop ((factors (sort (factor n) <)) (pf 1) (el (list))) (cond ((null? factors) el) ((= (car factors) pf) (set-car! el (1+ (car el))) (loop (cdr factors) (car factors) el)) (else (loop (cdr factors) (car factors) (cons 1 (cons-n-times (-1+ (- (A049084 (car factors)) (A049084 pf))) 0 el))))))))
(define (prime-exps_to_ascpart explist) (if (null? explist) explist (sub1from_the_last (partsums (cons (+ (car explist) 1) (cdr explist))))))
(define (partsums a) (cdr (reverse! (fold-left (lambda (psums n) (cons (+ n (car psums)) psums)) (list 0) a))))
(define (sub1from_the_last lista) (let ((rev (reverse lista))) (reverse! (cons (- (car rev) 1) (cdr rev)))))
(define (ascpart_to_prime-exps partlist) (if (null? partlist) partlist (add1to_the_last (cons (- (car partlist) 1) (diff partlist)))))
(define (add1to_the_last lista) (let ((rev (reverse lista))) (reverse! (cons (+ 1 (car rev)) (cdr rev)))))
(define (diff a) (map - (cdr a) (reverse! (cdr (reverse a)))))
(define (explist->n explist) (if (null? explist) 1 (mul (lambda (i) (expt (A000040 i) (list-ref explist (-1+ i)))) 1 (length explist))))
CROSSREFS
Row 1 of A243060 (table which gives successive "recursive iterates" of this sequence and converges towards A122111).
Fixed points: A243054.
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 29 2014
STATUS
approved
Permutation of natural numbers, a composition of A048673 and A241909: a(n) = A241909(A048673(n)).
+20
7
1, 2, 4, 8, 3, 5, 9, 81, 64, 32, 16, 512, 6, 128, 15, 8192, 27, 6561, 25, 11, 625, 125, 18, 78125, 12, 729, 250, 45, 7, 65536, 256, 387420489, 162, 1024, 486, 1073741824, 54, 36, 16384, 2916, 243, 8388608, 49, 131072, 16807, 3125, 10, 17496, 262144, 531441, 121, 72, 75
OFFSET
1,2
COMMENTS
This is A241909-conjugate of A243066. Please see the comments at the latter sequence.
FORMULA
a(n) = A241909(A048673(n)).
a(n) = A241909(A243066(A241909(n))).
PROG
(Scheme) (define (A243062 n) (A241909 (A048673 n)))
CROSSREFS
Inverse permutation: A243061.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 02 2014
STATUS
approved
Filtering sequence (related to prime factorization): a(n) = A046523(A241909(n)).
+20
7
1, 2, 4, 2, 8, 4, 16, 2, 6, 8, 32, 4, 64, 16, 12, 2, 128, 6, 256, 8, 24, 32, 512, 4, 12, 64, 6, 16, 1024, 12, 2048, 2, 48, 128, 36, 6, 4096, 256, 96, 8, 8192, 24, 16384, 32, 12, 512, 32768, 4, 24, 12, 192, 64, 65536, 6, 72, 16, 384, 1024, 131072, 12, 262144, 2048, 24, 2, 144, 48, 524288, 128, 768, 36, 1048576, 6, 2097152, 4096, 30, 256, 72, 96, 4194304, 8, 6, 8192
OFFSET
1,2
LINKS
FORMULA
a(n) = A046523(A241909(n)).
a(n) = A278219(A075158(n-1)).
PROG
(Scheme) (define (A278220 n) (A046523 (A241909 n)))
CROSSREFS
Cf. also A278219, A278221.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 16 2016
STATUS
approved
a(n) = gcd(A122111(n), A241909(n)).
+20
7
1, 2, 4, 3, 8, 3, 16, 5, 3, 3, 32, 5, 64, 3, 18, 7, 128, 15, 256, 5, 18, 3, 512, 7, 3, 3, 5, 5, 1024, 15, 2048, 11, 18, 3, 18, 7, 4096, 3, 18, 7, 8192, 15, 16384, 5, 50, 3, 32768, 11, 3, 45, 18, 5, 65536, 7, 108, 7, 18, 3, 131072, 7, 262144, 3, 50, 13, 108, 15, 524288, 5, 18, 45, 1048576, 11, 2097152, 3, 15, 5, 18, 15, 4194304, 11, 7, 3
OFFSET
1,2
FORMULA
a(n) = gcd(A122111(n), A241909(n)).
a(A241916(n)) = a(n).
MATHEMATICA
Array[If[# == 1, 1, GCD @@ {Block[{k = #, m = 0}, Times @@ Power @@@ Table[k -= m; k = DeleteCases[k, 0]; {Prime@ Length@ k, m = Min@ k}, Length@ Union@ k]] &@ Catenate[ConstantArray[PrimePi[#1], #2] & @@@ #], Function[t, Times @@ Prime@ Accumulate[If[Length@ t < 2, {0}, Join[{1}, ConstantArray[0, Length@ t - 2], {-1}]] + ReplacePart[t, Map[#1 -> #2 & @@ # &, #]]]]@ ConstantArray[0, Transpose[#][[1, -1]]] &[# /. {p_, e_} /; p > 0 :> {PrimePi@ p, e}]} &@ FactorInteger[#]] &, 82] (* Michael De Vlieger, Jan 24 2020, after JungHwan Min at A122111 *)
PROG
(PARI)
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
A122111(n) = if(1==n, n, prime(bigomega(n))*A122111(A064989(n)));
A241909(n) = if(1==n||isprime(n), 2^primepi(n), my(f=factor(n), h=1, i, m=1, p=1, k=1); while(k<=#f~, p = nextprime(1+p); i = primepi(f[k, 1]); m *= p^(i-h); h = i; if(f[k, 2]>1, f[k, 2]--, k++)); (p*m));
A331595(n) = gcd(A122111(n), A241909(n));
CROSSREFS
Cf. A122111, A241909, A241916, A331596 (number of distinct prime factors), A331597, A331598, A331599, A331600.
Cf. also A280489, A280491.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 22 2020
STATUS
approved
Integer sequence induced by second order Bulgarian solitaire operation on partition list A241918: a(n) = A241909(A243072(A241909(n))).
+20
6
1, 2, 4, 3, 8, 6, 16, 5, 9, 12, 32, 35, 64, 24, 18, 25, 128, 15, 256, 539, 36, 48, 512, 14, 27, 96, 25, 17303, 1024, 175, 2048, 125, 72, 192, 54, 21, 4096, 384, 144, 154, 8192, 3773, 16384, 485537, 245, 768, 32768, 70, 81, 45, 288, 26977283, 65536, 10, 108, 3146, 576, 1536, 131072
OFFSET
1,2
COMMENTS
The usual Bulgarian Solitaire operation (the "first order" version, cf. A243051) applied to an unordered integer partition means: subtract one from each part, and add a new part as large as there were parts in the old partition.
The "Second Order Bulgarian Solitaire" operation means that after subtracting one from each part of the old partition (and discarding the parts that diminished to zero), we apply the (first order) Bulgarian operation to the remaining partition before adding a new part as large as there were parts in the original partition.
How the partitions are encoded in this case, please see A241918.
LINKS
FORMULA
a(n) = A241909(A243072(A241909(n))).
PROG
(Scheme)
(define (A243052 n) (explist->n (ascpart_to_prime-exps (bulgarian-operation-n-th-order (prime-exps_to_ascpart (primefacs->explist n)) 2))))
(define (bulgarian-operation-n-th-order ascpart n) (if (or (zero? n) (null? ascpart)) ascpart (let ((newpart (length ascpart))) (let loop ((newpartition (list)) (ascpart ascpart)) (cond ((null? ascpart) (sort (cons newpart (bulgarian-operation-n-th-order newpartition (- n 1))) <)) (else (loop (if (= 1 (car ascpart)) newpartition (cons (- (car ascpart) 1) newpartition)) (cdr ascpart))))))))
;; Other required functions and libraries, please see A243051.
CROSSREFS
Second row of A243060.
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 29 2014
STATUS
approved
Integer sequence induced by third-order Bulgarian solitaire operation on partition list A241918: a(n) = A241909(A243073(A241909(n))).
+20
6
1, 2, 4, 3, 8, 6, 16, 5, 9, 12, 32, 10, 64, 24, 18, 7, 128, 15, 256, 20, 36, 48, 512, 55, 27, 96, 25, 40, 1024, 30, 2048, 49, 72, 192, 54, 21, 4096, 384, 144, 637, 8192, 60, 16384, 80, 50, 768, 32768, 22, 81, 45, 288, 160, 65536, 35, 108, 22627, 576, 1536, 131072
OFFSET
1,2
COMMENTS
The usual (first-order) Bulgarian Solitaire operation (cf. A243051) applied to an unordered integer partition means: subtract one from each part, and add a new part as large as there were parts in the old partition.
The "Second-Order Bulgarian Operation" means that after subtracting one from each part of the old partition (and discarding the parts that diminished to zero), we apply the (first-order) Bulgarian operation to the remaining partition before adding a new part as large as there were parts in the original partition.
Similarly, in "Third-Order Bulgarian Solitaire Operation", we apply the Second-Order Bulgarian operation to the remaining partition (after we have subtracted one from each part) before adding a new part as large as there were parts in the original partition.
How the partitions are encoded in this case, see A241918.
LINKS
FORMULA
a(n) = A241909(A243073(A241909(n))).
PROG
(Scheme)
(define (A243053 n) (explist->n (ascpart_to_prime-exps (bulgarian-operation-n-th-order (prime-exps_to_ascpart (primefacs->explist n)) 3))))
(define (bulgarian-operation-n-th-order ascpart n) (if (or (zero? n) (null? ascpart)) ascpart (let ((newpart (length ascpart))) (let loop ((newpartition (list)) (ascpart ascpart)) (cond ((null? ascpart) (sort (cons newpart (bulgarian-operation-n-th-order newpartition (- n 1))) <)) (else (loop (if (= 1 (car ascpart)) newpartition (cons (- (car ascpart) 1) newpartition)) (cdr ascpart))))))))
;; Other required functions and libraries, please see A243051.
CROSSREFS
Third row of A243060.
Differs from A122111 for the first time at n=24, where a(24) = 55, while A122111(24) = 14.
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 29 2014
STATUS
approved
a(n) = min(n, A241909(n)).
+20
5
1, 2, 3, 3, 5, 6, 7, 5, 6, 10, 11, 12, 13, 14, 15, 7, 17, 15, 19, 20, 21, 22, 23, 24, 12, 26, 10, 28, 29, 30, 31, 11, 33, 34, 35, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 24, 45, 51, 52, 53, 21, 55, 56, 57, 58, 59, 60, 61, 62, 63, 13, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 30, 76, 72, 78, 79, 80, 14, 82
OFFSET
1,2
FORMULA
a(n) = min(n, A241909(n)).
PROG
(PARI)
A241909(n) = if(1==n||isprime(n), 2^primepi(n), my(f=factor(n), h=1, i, m=1, p=1, k=1); while(k<=#f~, p = nextprime(1+p); i = primepi(f[k, 1]); m *= p^(i-h); h = i; if(f[k, 2]>1, f[k, 2]--, k++)); (p*m));
A331299(n) = min(n, A241909(n));
CROSSREFS
Cf. A241909.
Cf. also A331170, A331280.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 17 2020
STATUS
approved
Permutation of natural numbers, a composition of A241909 and A064216: a(n) = A064216(A241909(n)).
+20
4
1, 2, 5, 3, 6, 13, 29, 4, 7, 47, 20, 25, 113, 95, 15, 11, 78, 23, 355, 158, 103, 267, 406, 89, 19, 1247, 17, 1237, 1577, 139, 660, 10, 221, 4363, 67, 38, 8179, 13109, 967, 393, 9266, 515, 21605, 4162, 28, 23601, 19578, 239, 43, 83, 987, 31247
OFFSET
1,2
COMMENTS
This is A241909-conjugate of A243065. Please see the comments at the latter sequence.
FORMULA
a(n) = A064216(A241909(n)).
a(n) = A241909(A243065(A241909(n))).
PROG
(Scheme) (define (A243061 n) (A064216 (A241909 n)))
(PARI)
A064216(n) = A064989(n+n-1);
A064989(n) = { my(f = factor(n)); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f) };
A241909(n) = if(1==n||isprime(n), 2^primepi(n), my(f=factor(n), h=1, i, m=1, p=1, k=1); while(k<=#f~, p = nextprime(1+p); i = primepi(f[k, 1]); m *= p^(i-h); h = i; if(f[k, 2]>1, f[k, 2]--, k++)); (p*m));
A243061(n) = A064216(A241909(n)); \\ Antti Karttunen, Dec 10 2021
CROSSREFS
Inverse permutation: A243062.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 02 2014
STATUS
approved

Search completed in 0.037 seconds