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.
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
Antti Karttunen, Table of n, a(n) for n = 1..10000
Neil Calkin and Herbert S. Wilf, Recounting the rationals, Amer. Math. Monthly (2000) Vol. 107, No. 4, 360-363.
FORMULA
MATHEMATICA
PROG
(PARI)
A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); };
CROSSREFS
KEYWORD
nonn,easy,frac
AUTHOR
James Kirk Winkler, Aug 13 2015
EXTENSIONS
Definition simplified by Antti Karttunen, Dec 02 2025
STATUS
approved
