login
A261273
a(n) is the (prime(n)+1)-th term of Stern-Brocot sequence, A002487.
2
2, 1, 2, 1, 2, 3, 4, 3, 2, 4, 1, 7, 8, 5, 2, 8, 4, 5, 5, 4, 11, 3, 8, 12, 9, 12, 5, 8, 11, 10, 1, 6, 14, 9, 18, 7, 13, 11, 8, 18, 12, 19, 2, 11, 16, 7, 13, 3, 10, 17, 18, 4, 13, 6, 8, 6, 16, 5, 23, 22, 13, 26, 17, 10, 23, 16, 19, 29, 18, 23, 22, 12, 7, 25, 11, 2, 20, 23, 26, 29, 18, 31, 8, 27, 11, 14, 16, 27, 24
OFFSET
1,1
COMMENTS
Take the list of positive rationals {R(n): n>=1} in the order defined by Calkin and Wilf (Recounting the Rationals, 1999); a(n) = denominator of R(prime(n)). - The original definition of the sequence.
The list of rationals {R(n)} is essentially given by A002487(n)/A002487(n+1).
As two adjacent terms of A002487 are always relatively prime, the denominator of R(prime(n)) reduces to A002487(1+prime(n)). - Antti Karttunen, Dec 02 2025
LINKS
Neil Calkin and Herbert S. Wilf, Recounting the rationals, Amer. Math. Monthly (2000) Vol. 107, No. 4, 360-363.
FORMULA
a(n) = A002487(A008864(n)) = A002487(1+prime(n)). - Antti Karttunen, Dec 02 2025
MATHEMATICA
A002487[n_] := A002487[n] = Which[n <= 1, n, OddQ[n], A002487[(n-1)/2] + A002487[(n+1)/2], True, A002487[n/2]];
Map[A002487, Prime[Range[100]] + 1] (* Paolo Xausa, Dec 03 2025 *)
PROG
(PARI)
A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); };
A261273(n) = A002487(1+prime(n)); \\ Antti Karttunen, Dec 02 2025
CROSSREFS
Cf. A002487, A008864, A261179 (numerators).
Sequence in context: A303780 A234022 A389352 * A097454 A139803 A058746
KEYWORD
nonn,easy,frac
AUTHOR
James Kirk Winkler, Aug 13 2015
EXTENSIONS
Definition simplified by Antti Karttunen, Dec 02 2025
STATUS
approved