cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 18 results. Next

A072346 Volume of n-dimensional sphere of radius r is V_n*r^n = Pi^(n/2)*r^n/(n/2)! = C_n*Pi^floor(n/2)*r^n; sequence gives denominator of C_n.

Original entry on oeis.org

1, 1, 1, 3, 2, 15, 6, 105, 24, 945, 120, 10395, 720, 135135, 5040, 2027025, 40320, 34459425, 362880, 654729075, 3628800, 13749310575, 39916800, 316234143225, 479001600, 7905853580625, 6227020800, 213458046676875, 87178291200, 6190283353629375, 1307674368000
Offset: 0

Views

Author

N. J. A. Sloane, Jul 31 2002

Keywords

Comments

Answer to question of how to extend the sequence 1, 2 r, Pi r^2, 4 Pi r^3 / 3, Pi^2 r^4 / 2, ...
Surface area of n-dimensional sphere of radius r is n*V_n*r^(n-1).

Examples

			Sequence of C_n's begins 1, 2, 1, 4/3, 1/2, 8/15, 1/6, 16/105, 1/24, 32/945, 1/120, 64/10395, ...
		

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 9, Eq. 17.
  • Dusko Letic, Nenad Cakic, Branko Davidovic and Ivana Berkovic, Orthogonal and diagonal dimension fluxes of hyperspherical function, Advances in Difference Equations 2012, 2012:22; http://www.advancesindifferenceequations.com/content/2012/1/22. - From N. J. A. Sloane, Sep 04 2012

Crossrefs

Cf. A072345.
Cf. A001147.

Programs

  • Mathematica
    f[n_] := Pi^(n/2 - Floor[n/2])/(n/2)!; Table[ Denominator[ f[n]], {n, 0, 30} ]

Formula

(n/2)! if n even, n!! if n odd.

A072478 Surface area of n-dimensional sphere of radius r is n*V_n*r^(n-1) = n*Pi^(n/2)*r^(n-1)/(n/2)! = S_n*Pi^floor(n/2)*r^(n-1); sequence gives numerator of S_n.

Original entry on oeis.org

0, 2, 2, 4, 2, 8, 1, 16, 1, 32, 1, 64, 1, 128, 1, 256, 1, 512, 1, 1024, 1, 2048, 1, 4096, 1, 8192, 1, 16384, 1, 32768, 1, 65536, 1, 131072, 1, 262144, 1, 524288, 1, 1048576, 1, 2097152, 1, 4194304, 1, 8388608, 1, 16777216, 1, 33554432, 1, 67108864, 1
Offset: 0

Views

Author

N. J. A. Sloane, Aug 02 2002

Keywords

Comments

Answer to question of how to extend the sequence 0, 2, 2 Pi r, 4 Pi r^2, 2 Pi^2 r^3, ...
Volume of n-dimensional sphere of radius r is V_n*r^n - see A072345/A072346.
a(2*n-1) = 2^n and for n>2 a(2*n)=1.
Denominator of the rational coefficient of integral_{x>0} exp(-x^2)*x^n. - Jean-François Alcover, Apr 23 2013
From Ilya Gutkovskiy, Aug 02 2016: (Start)
Numerator of n/Gamma(n/2+1).
More generally, the ordinary generating function for the surface area of the n-dimensional sphere of radius r is 2*x*(1 + exp(Pi*r^2*x^2)*Pi*r*x + exp(Pi*r^2*x^2)*Pi*r*erf(sqrt(Pi)*r*x)*x) = 2*x + 2*Pi*r*x^2 + 4*Pi*r^2*x^3 + 2*Pi^2*r^3*x^4 + (8*Pi^2*r^4/3)*x^5 + Pi^3*r^5*x^6 + ... (End)

Examples

			Sequence of S_n's begins 0, 2, 2, 4, 2, 8/3, 1, 16/15, 1/3, 32/105, 1/12, 64/945, ...
		

References

  • N. Cakic, D. Letic, B. Davidovic, The Hyperspherical functions of a derivative, Abstr. Appl. Anal. (2010) 364292 doi:10.1155/2010/364292
  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 10, Eq. 19.

Crossrefs

Cf. A072479. A072478(n)/A072479(n) = n*A072345(n)/A072346(n).

Programs

  • Mathematica
    f[n_] := Pi^(n/2 - Floor[n/2])*n/(n/2)!; Table[ Numerator[ f[n]], {n, 0, 52}]
    CoefficientList[Series[x (2 + 2 x - 2 x^2 - 4 x^3 - x^5 + 2 x^7)/(1 - 3 x^2 + 2 x^4), {x, 0, 52}], x] (* Michael De Vlieger, Aug 01 2016 *)
    LinearRecurrence[{0,3,0,-2},{0,2,2,4,2,8,1,16,1},60] (* Harvey P. Dale, May 30 2018 *)
  • PARI
    concat(0, Vec(x*(2+2*x-2*x^2-4*x^3-x^5+2*x^7)/(1-3*x^2+2*x^4) + O(x^100))) \\ Colin Barker, Aug 01 2016

Formula

From Colin Barker, Sep 04 2012: (Start)
a(n) = 3*a(n-2)-2*a(n-4) for n>4.
G.f.: x*(2+2*x-2*x^2-4*x^3-x^5+2*x^7) / (1-3*x^2+2*x^4).
(End)
From Colin Barker, Aug 01 2016: (Start)
a(n) = (1+(-1)^n-2^((1+n)/2)*(-1+(-1)^n))/2 for n>4.
a(n) = 1 for n>4 and even.
a(n) = 2^((n+1)/2) for n>4 and odd.
(End)

Extensions

More terms from Robert G. Wilson v, Aug 18 2002

A072479 Surface area of n-dimensional sphere of radius r is n*V_n*r^(n-1) = n*Pi^(n/2)*r^(n-1)/(n/2)! = S_n*Pi^floor(n/2)*r^(n-1); sequence gives denominator of S_n.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 15, 3, 105, 12, 945, 60, 10395, 360, 135135, 2520, 2027025, 20160, 34459425, 181440, 654729075, 1814400, 13749310575, 19958400, 316234143225, 239500800, 7905853580625, 3113510400, 213458046676875, 43589145600
Offset: 0

Views

Author

N. J. A. Sloane, Aug 02 2002

Keywords

Comments

Answer to question of how to extend the sequence 0, 2, 2 Pi r, 4 Pi r^2, 2 Pi^2 r^3, ...
Volume of n-dimensional sphere of radius r is V_n*r^n - see A072345/A072346.
Numerator of the rational coefficient of integral_{x>0} exp(-x^2)*x^n. [Jean-François Alcover, Apr 23 2013]

Examples

			Sequence of S_n's begins 0, 2, 2, 4, 2, 8/3, 1, 16/15, 1/3, 32/105, 1/12, 64/945, ...
		

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 10, Eq. 19.
  • Dusko Letic, Nenad Cakic, Branko Davidovic and Ivana Berkovic, Orthogonal and diagonal dimension fluxes of hyperspherical function, Advances in Difference Equations 2012, 2012:22; http://www.advancesindifferenceequations.com/content/2012/1/22 - From N. J. A. Sloane, Sep 04 2012

Crossrefs

Cf. A072478. A072478(n)/A072479(n) = n*A072345(n)/A072346(n).

Programs

  • Mathematica
    f[n_] := Pi^(n/2 - Floor[n/2])*n/(n/2)!; Table[ Denominator[ f[n]], {n, 0, 30} ]

Extensions

More terms from Robert G. Wilson v, Aug 18 2002

A074455 Consider the volume of unit sphere as a function of the dimension d; maximize this as a function of d (considered as a continuous variable); sequence gives decimal expansion of the best d.

Original entry on oeis.org

5, 2, 5, 6, 9, 4, 6, 4, 0, 4, 8, 6, 0, 5, 7, 6, 7, 8, 0, 1, 3, 2, 8, 3, 8, 3, 8, 8, 6, 9, 0, 7, 6, 9, 2, 3, 6, 6, 1, 9, 0, 1, 7, 2, 3, 7, 1, 8, 3, 2, 1, 4, 8, 5, 7, 5, 0, 9, 8, 7, 9, 6, 7, 8, 7, 7, 7, 1, 0, 9, 3, 4, 6, 7, 3, 6, 8, 2, 0, 2, 7, 2, 8, 1, 7, 7, 2, 0, 2, 3, 8, 4, 8, 9, 7, 9, 2, 4, 6, 9, 2, 6
Offset: 1

Views

Author

Robert G. Wilson v, Aug 22 2002

Keywords

Comments

From David W. Wilson, Jul 12 2007: (Start)
For an integer d, the volume of a d-dimensional unit ball is v(d) = Pi^(d/2)/(d/2)! and its surface area is area(d) = d*Pi^(d/2)/(d/2)! = d*v(d). If we interpolate n! = gamma(n+1) we can define v(d) and area(d) as continuous functions for (at least) d >= 0.
A074457 purports to minimize area(d). Since area(d+2) = 2*Pi*v(d), area() is minimized at y = x+2; therefore A074457 coincides with the current sequence except at the first term. (End)

Examples

			5.256946404860576780132838388690769236619017237183214857509879678777109...
		

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 9.
  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, 2003, Section 1.5.4, p. 34.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 67.

Crossrefs

Cf. A074457.
The volume is given by A074454. Cf. A072345 & A072346.

Programs

  • Mathematica
    x /. FindRoot[ PolyGamma[1 + x/2] == Log[Pi], {x, 5}, WorkingPrecision -> 105] // RealDigits // First (* Jean-François Alcover, Mar 28 2013 *)
  • PARI
    hyperspheresurface(d)=2*Pi^(d/2)/gamma(d/2)
    hyperspherevolume(d)=hyperspheresurface(d)/d
    FindMax(fn_x,lo,hi)=
    {
    local(oldprecision, x, y, z);
    oldprecision = default(realprecision);
    default(realprecision, oldprecision+10);
    while (hi-lo > 10^-oldprecision,
    while (1,
    z = vector(2, i, lo*(3-i)/3 + hi*i/3);
    y = vector(2, i, eval(Str("x = z[" i "]; " fn_x)));
    if (abs(y[1]-y[2]) > 10^(5-default(realprecision)), break);
    default(realprecision, default(realprecision)+10);
    );
    if (y[1] < y[2], lo = z[1], hi = z[2]);
    );
    default(realprecision, oldprecision);
    (lo + hi) / 2.
    }
    default(realprecision, 105);
    A074455=FindMax("hyperspherevolume(x)", 1, 9)
    A074457=FindMax("hyperspheresurface(x)", 1, 9)
    A074454=hyperspherevolume(A074455)
    A074456=hyperspheresurface(A074457)
    /* David W. Cantrell */
    
  • PARI
    2 * (solve(x=3, 4, psi(x) - log(Pi)) - 1) \\ Jianing Song, May 12 2025

Formula

d = root of Psi((1/2)*d + 1) = log(Pi).
d is 2 less than the number with decimal digits A074457 (the hypersphere dimension that maximizes hypersurface area). - Eric W. Weisstein, Dec 02 2014

Extensions

Corrected by Eric W. Weisstein, Aug 31 2003
Corrected by Martin Fuller, Jul 12 2007

A347045 Smallest divisor of n with exactly half as many prime factors (counting multiplicity) as n, or 1 if there are none.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 1, 3, 2, 1, 1, 1, 2, 3, 4, 1, 1, 1, 1, 3, 2, 1, 4, 5, 2, 1, 1, 1, 1, 1, 1, 3, 2, 5, 4, 1, 2, 3, 4, 1, 1, 1, 1, 1, 2, 1, 1, 7, 1, 3, 1, 1, 6, 5, 4, 3, 2, 1, 4, 1, 2, 1, 8, 5, 1, 1, 1, 3, 1, 1, 1, 1, 2, 1, 1, 7, 1, 1, 1, 9, 2, 1, 4, 5, 2, 3
Offset: 1

Views

Author

Gus Wiseman, Aug 16 2021

Keywords

Examples

			The divisors of 90 with half bigomega are: 6, 9, 10, 15, so a(90) = 6.
		

Crossrefs

The smallest divisor without the condition is A020639 (greatest: A006530).
Positions of 1's are A026424.
Positions of even terms are A063745 = 2*A026424.
The case of powers of 2 is A072345.
Positions of 2's are A100484.
Divisors of this type are counted by A345957 (rounded: A096825).
The rounded version is A347043.
The greatest divisor of this type is A347046 (rounded: A347044).
A000005 counts divisors.
A001221 counts distinct prime factors.
A001222 counts all prime factors (also called bigomega).
A056239 adds up prime indices, row sums of A112798.
A207375 lists central divisors (min: A033676, max: A033677).
A340387 lists numbers whose sum of prime indices is twice bigomega.
A340609 lists numbers whose maximum prime index divides bigomega.
A340610 lists numbers whose maximum prime index is divisible by bigomega.
A347042 counts divisors d|n such that bigomega(d) divides bigomega(n).

Programs

  • Mathematica
    Table[If[#=={},1,Min[#]]&@Select[Divisors[n], PrimeOmega[#]==PrimeOmega[n]/2&],{n,100}]
    a[n_] := Module[{p = Flatten[Table[#[[1]], {#[[2]]}] & /@ FactorInteger[n]], np}, np = Length[p]; If[OddQ[np], 1, Times @@ p[[1 ;; np/2]]]]; Array[a, 100] (* Amiram Eldar, Nov 02 2024 *)
  • Python
    from sympy import divisors, factorint
    def a(n):
        npf = len(factorint(n, multiple=True))
        for d in divisors(n)[1:-1]:
            if 2*len(factorint(d, multiple=True)) == npf: return d
        return 1
    print([a(n) for n in range(1, 88)]) # Michael S. Branicky, Aug 18 2021
    
  • Python
    from math import prod
    from sympy import factorint
    def A347045(n):
        fs = factorint(n,multiple=True)
        q, r = divmod(len(fs),2)
        return 1 if r else prod(fs[:q]) # Chai Wah Wu, Aug 20 2021

Formula

a(n) = Product_{k=1..A001222(n)/2} A027746(n,k) if A001222(n) is even, and 1 otherwise. - Amiram Eldar, Nov 02 2024

A347046 Greatest divisor of n with exactly half as many prime factors (counting multiplicity) as n, or 1 if there are none.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 1, 3, 5, 1, 1, 1, 7, 5, 4, 1, 1, 1, 1, 7, 11, 1, 6, 5, 13, 1, 1, 1, 1, 1, 1, 11, 17, 7, 9, 1, 19, 13, 10, 1, 1, 1, 1, 1, 23, 1, 1, 7, 1, 17, 1, 1, 9, 11, 14, 19, 29, 1, 15, 1, 31, 1, 8, 13, 1, 1, 1, 23, 1, 1, 1, 1, 37, 1, 1, 11, 1, 1, 1, 9
Offset: 1

Views

Author

Gus Wiseman, Aug 16 2021

Keywords

Comments

Problem: What are the positions of last appearances > 1?

Examples

			The divisors of 90 with half bigomega are: 6, 9, 10, 15, so a(90) = 15.
		

Crossrefs

The greatest divisor without the condition is A006530 (smallest: A020639).
Positions of 1's are A026424.
The case of powers of 2 is A072345.
Positions of first appearances are A123667 (sorted: A123666).
Divisors of this type are counted by A345957 (rounded: A096825).
The rounded version is A347044.
The smallest divisor of this is A347045 (rounded: A347043).
A000005 counts divisors.
A001221 counts distinct prime factors.
A001222 counts all prime factors (also called bigomega).
A056239 adds up prime indices, row sums of A112798.
A207375 lists central divisors (min: A033676, max: A033677).
A340387 lists numbers whose sum of prime indices is twice bigomega.
A340609 lists numbers whose maximum prime index divides bigomega.
A340610 lists numbers whose maximum prime index is divisible by bigomega.
A347042 counts divisors d|n such that bigomega(d) divides bigomega(n).

Programs

  • Mathematica
    Table[If[#=={},1,Max[#]]&@Select[Divisors[n], PrimeOmega[#]==PrimeOmega[n]/2&],{n,100}]
    a[n_] := Module[{p = Flatten[Table[#[[1]], {#[[2]]}] & /@ FactorInteger[n]], np}, np = Length[p]; If[OddQ[np], 1, Times @@ p[[np/2+1 ;; np]]]]; Array[a, 100] (* Amiram Eldar, Nov 02 2024 *)
  • Python
    from sympy import divisors, factorint
    def a(n):
        npf = len(factorint(n, multiple=True))
        for d in divisors(n)[-1:0:-1]:
            if 2*len(factorint(d, multiple=True)) == npf: return d
        return 1
    print([a(n) for n in range(1, 82)]) # Michael S. Branicky, Aug 18 2021
    
  • Python
    from math import prod
    from sympy import factorint
    def A347046(n):
        fs = factorint(n,multiple=True)
        q, r = divmod(len(fs),2)
        return 1 if r else prod(fs[q:]) # Chai Wah Wu, Aug 20 2021

Formula

a(n) = Product_{k=A001222(n)/2+1..A001222(n)} A027746(n,k) if A001222(n) is even, and 1 otherwise. - Amiram Eldar, Nov 02 2024

A087299 Ratio of volume of n-dimensional ball to circumscribing n-cube is Pi^floor(n/2) divided by a(n).

Original entry on oeis.org

1, 1, 4, 6, 32, 60, 384, 840, 6144, 15120, 122880, 332640, 2949120, 8648640, 82575360, 259459200, 2642411520, 8821612800, 95126814720, 335221286400, 3805072588800, 14079294028800, 167423193907200, 647647525324800
Offset: 0

Views

Author

Eric W. Weisstein, Aug 31 2003

Keywords

Examples

			The volume of sphere (3-ball) is 4/3*Pi*r^3 and circumscribing 3-cube is 2^3*r^3 so ratio is Pi/6 and a(3)=6.
G.f. =  1 + x + 4*x^2 + 6*x^3 + 32*x^4 + 60*x^5 + 384*x^6 + 840*x^7 + ...
		

References

  • N. Cakic, D. Letic, B. Davidovic, The Hyperspherical functions of a derivative, Abstr. Appl. Anal. (2010) 364292 doi:10.1155/2010/364292

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 0, 0, With[ {m = n + 1}, m! SeriesCoefficient[ Exp[x^2] (1 + Sqrt[Pi] Erf[x]), {x, 0, m}] / 2]]; (* Michael Somos, Jan 24 2014 *)
    Table[2^n*Gamma[n/2 + 1]*Pi^Floor[n/2]/Pi^(n/2), {n,0,50}] (* G. C. Greubel, Jan 28 2017 *)
  • PARI
    {a(n) = my(A); if( n<0, 0, n++; A = exp(x^2 + x * O(x^n)); n! * polcoeff( A * (1 + 2 * intformal( 1/A )), n) / 2)}; /* Michael Somos, May 25 2004 */
    
  • PARI
    {a(n) = if( n<2, n>-1, 2*n * a(n-2))}; /* Michael Somos, Jan 24 2014 */
    
  • PARI
    {a(n) = if( n<0, 0, if( n%2, n! / (n\2)!, 2^n * (n\2)!))}; /* Michael Somos, Jan 03 2015 */

Formula

a(n) = 2^n*gamma(n/2+1)*Pi^floor(n/2)/Pi^(n/2), n >= 0. - Wolfdieter Lang, Jul 17 2013
0 = a(n)*( 2*a(n+1) - a(n+3) ) + a(n+1)*a(n+2) if n>=0. - Michael Somos, Jan 24 2014
a(n) = 2*n * a(n-2) if n>=2. - Michael Somos, Jan 24 2014
a(2*n) = A047053(n). a(2*n + 1) = A000407(n). - Michael Somos, Jan 03 2015

A164103 Decimal expansion of 8*Pi^2/15.

Original entry on oeis.org

5, 2, 6, 3, 7, 8, 9, 0, 1, 3, 9, 1, 4, 3, 2, 4, 5, 9, 6, 7, 1, 1, 7, 2, 8, 5, 3, 3, 2, 6, 7, 2, 8, 0, 6, 0, 5, 5, 0, 0, 6, 3, 9, 6, 8, 3, 8, 6, 1, 7, 5, 5, 0, 0, 0, 7, 5, 3, 7, 8, 6, 3, 3, 3, 9, 8, 4, 0, 2, 3, 9, 0, 5, 2, 9, 0, 2, 4, 2, 7, 9, 6, 2, 6, 7, 6, 1, 2, 4, 8, 1, 9, 8, 3, 2, 2, 7, 8, 5, 6, 9, 7, 2, 8, 1
Offset: 1

Views

Author

R. J. Mathar, Aug 10 2009

Keywords

Comments

Volume of the 5-dimensional unit sphere.
For all nonnegative integers n, let V_n be the volume of the n-dimensional unit sphere. If n != 5, then V_n < V_5, this constant (see A072345). - Rick L. Shepherd, Feb 23 2014

Examples

			Equals 5.2637890139143245967117285332672806...
		

References

  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 67.

Programs

Formula

Equals A164104/5 = 4*A164102/15.

A351705 For any nonnegative number n with binary expansion Sum_{k >= 0} b_k * 2^k, a(n) is the numerator of d(n) = Sum_{k >= 0} b_k * 2^A130472(k). See A351706 for the denominators.

Original entry on oeis.org

0, 1, 1, 3, 2, 3, 5, 7, 1, 5, 3, 7, 9, 13, 11, 15, 4, 5, 9, 11, 6, 7, 13, 15, 17, 21, 19, 23, 25, 29, 27, 31, 1, 9, 5, 13, 17, 25, 21, 29, 3, 11, 7, 15, 19, 27, 23, 31, 33, 41, 37, 45, 49, 57, 53, 61, 35, 43, 39, 47, 51, 59, 55, 63, 8, 9, 17, 19, 10, 11, 21
Offset: 0

Views

Author

Rémy Sigrist, Feb 16 2022

Keywords

Comments

The function d is a bijection from the nonnegative integers to the nonnegative dyadic rationals satisfying d(A000695(n)) = n for any n >= 0.

Examples

			For n = 13:
- 13 = 2^0 + 2^2 + 2^3,
- A130472(0) = 0, A130472(2) = 1, A130472(3) = -2,
- d(13) = 2^0 + 2^1 + 2^-2 = 13/4,
- so a(13) = 13.
		

Crossrefs

Programs

  • PARI
    a(n) = { my (d=0, k); while (n, n-=2^k=valuation(n,2); d+=2^((-1)^k*(k+1)\2)); numerator(d) }

Formula

a(A000695(n)) = n.
a(2^k) = A072345(k-1) for any k > 0.
a(2^k-1) = 2^k-1 for any k >= 0.
A000120(a(n)) = A000120(n).

A351706 For any nonnegative number n with binary expansion Sum_{k >= 0} b_k * 2^k, a(n) is the denominator of d(n) = Sum_{k >= 0} b_k * 2^A130472(k). See A351705 for the numerators.

Original entry on oeis.org

1, 1, 2, 2, 1, 1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 2, 2, 1, 1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 1, 2, 2, 1, 1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 2, 2, 1, 1, 2
Offset: 0

Views

Author

Rémy Sigrist, Feb 16 2022

Keywords

Comments

The function d is a bijection from the nonnegative integers to the nonnegative dyadic rationals satisfying d(A000695(n)) = n for any n >= 0.

Examples

			For n = 13:
- 13 = 2^0 + 2^2 + 2^3,
- A130472(0) = 0, A130472(2) = 1, A130472(3) = -2,
- d(13) = 2^0 + 2^1 + 2^-2 = 13/4,
- so a(13) = 4.
		

Crossrefs

Programs

  • PARI
    a(n) = { my (d=0, k); while (n, n-=2^k=valuation(n,2); d+=2^((-1)^k*(k+1)\2)); denominator(d) }

Formula

a(A000695(n)) = 1.
a(2^k) = A072345(k) for any k >= 0.
a(2^k-1) = A016116(k) for any k >= 0.
Showing 1-10 of 18 results. Next