login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A225653
Numbers n such that A225634(n) = A225644(n).
5
0, 1, 21, 30, 33, 35, 36, 40, 42, 44, 48, 51, 52, 56, 57, 58, 60, 62, 63, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 84, 85, 88, 91, 92, 96
OFFSET
0,3
COMMENTS
Positions of zeros in A225654.
PROG
(Scheme with Antti Karttunen's IntSeq-library):
(define A225653 (MATCHING-POS 0 0 inA225653?))
(define (inA225653? n) (or (zero? n) (let ((fun1 (lambda (seed) (let ((max1 (list 0))) (fold_over_partitions_of n 1 lcm (lambda (p) (set-car! max1 (max (car max1) (lcm seed p))))) (car max1)))) (fun2 (lambda (seed) (let ((max2 (list 0))) (fold_over_partitions_of n n lcm (lambda (p) (set-car! max2 (max (car max2) (lcm seed p))))) (car max2))))) (equal-steps-to-convergence-nondecreasing? fun1 fun2 1 n))))
(define (equal-steps-to-convergence-nondecreasing? fun1 fun2 initval1 initval2) (let loop ((steps 0) (a1 initval1) (a2 initval2)) (cond ((equal? a1 a2) (zero? steps)) ((< a1 a2) (loop (+ steps 1) (fun1 a1) a2)) (else (loop (- steps 1) a1 (fun2 a2))))))
(define (fold_over_partitions_of m initval addpartfun colfun) (let recurse ((m m) (b m) (n 0) (partition initval)) (cond ((zero? m) (colfun partition)) (else (let loop ((i 1)) (recurse (- m i) i (+ 1 n) (addpartfun i partition)) (if (< i (min b m)) (loop (+ 1 i))))))))
;; Alternatively, but somewhat slower, as:
(define A225653v2 (MATCHING-POS 0 0 (lambda (i) (= (A225634 i) (A225644 i)))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 16 2013
STATUS
approved