login
A286541
Compound filter (the left & right summand of Hofstadter-Conway $10000 sequence): a(n) = P(A004001(A004001(n-1)), A004001(n-A004001(n-1))), where P(n,k) is sequence A000027 used as a pairing function, with a(1) = a(2) = 0.
4
0, 0, 1, 1, 2, 5, 5, 5, 8, 13, 19, 19, 25, 25, 25, 25, 32, 41, 51, 62, 62, 73, 86, 86, 99, 99, 99, 113, 113, 113, 113, 113, 128, 145, 163, 182, 202, 202, 222, 244, 267, 267, 290, 315, 315, 340, 340, 340, 366, 394, 394, 422, 422, 422, 451, 451, 451, 451, 481, 481, 481, 481, 481, 481, 512, 545, 579, 614, 650, 687, 687, 724, 763, 803, 844, 844, 885, 928, 972, 972
OFFSET
1,5
LINKS
Eric Weisstein's World of Mathematics, Pairing Function
FORMULA
a(1) = a(2) = 0, for n > 2, a(n) = (1/2)*(2 + ((A004001(A004001(n-1))+A004001(n-A004001(n-1)))^2) - A004001(A004001(n-1)) - 3*A004001(n-A004001(n-1))).
PROG
(Scheme) (define (A286541 n) (if (<= n 2) 0 (* (/ 1 2) (+ (expt (+ (A004001 (A004001 (- n 1))) (A004001 (- n (A004001 (- n 1))))) 2) (- (A004001 (A004001 (- n 1)))) (- (* 3 (A004001 (- n (A004001 (- n 1)))))) 2))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 18 2017
STATUS
approved