login
A261179
a(n) is the prime(n)-th term of Stern-Brocot sequence, A002487.
8
1, 2, 3, 3, 5, 5, 5, 7, 7, 7, 5, 11, 11, 13, 9, 13, 11, 9, 11, 13, 15, 13, 19, 17, 11, 19, 17, 21, 19, 13, 7, 13, 19, 23, 29, 25, 23, 25, 27, 31, 29, 31, 13, 13, 25, 23, 31, 17, 23, 27, 25, 19, 17, 17, 9, 19, 27, 21, 37, 31, 35, 41, 41, 37, 33, 29, 49, 37, 49, 41, 27, 41, 33, 41, 31, 15, 31, 39, 33, 41, 41, 49, 37, 35, 41, 39, 19, 37, 41, 31, 43, 23, 31, 37, 27, 23, 15, 27
OFFSET
1,2
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) = numerator of R(prime(n)). - The original name of this 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 numerator of R(prime(n)) reduces to just A002487(prime(n)). - Antti Karttunen, Dec 02 2025]
Apart from a(2) = A002487(A000040(2)) = A002487(3) = 2, all other terms are odd because A002487(n) is even if and only if n is a multiple of 3. - 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(A000040(n)) = A001222(A277316(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]]] (* 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); };
A261179(n) = A002487(prime(n)); \\ Antti Karttunen, Dec 02 2025
CROSSREFS
Cf. A000040, A001222, A002487, A261273 (denominators), A277316.
Sequence in context: A256405 A130149 A053046 * A066658 A005145 A280740
KEYWORD
nonn,easy,frac
AUTHOR
James Kirk Winkler, Aug 10 2015
EXTENSIONS
Definition simplified by Antti Karttunen, Dec 02 2025
STATUS
approved