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.

Previous Showing 11-20 of 48 results. Next

A090024 Number of distinct lines through the origin in the n-dimensional lattice of side length 8.

Original entry on oeis.org

0, 1, 45, 571, 5841, 55651, 515025, 4702531, 42649281, 385447171, 3476958705, 31332052291, 282184860321, 2540643522691, 22870684139985, 205860600134851, 1852867557848961, 16676418630942211, 150090820212050865
Offset: 0

Views

Author

Joshua Zucker, Nov 20 2003

Keywords

Comments

Equivalently, lattice points where the gcd of all the coordinates is 1.

Examples

			a(2) = 45 because in 2D the lines have slope 0, 1/8, 3/8, 5/8, 7/8, 1/7, 2/7, 3/7, 4/7, 5/7, 6/7, 1/6, 5/6, 1/5, 2/5, 3/5, 4/5, 1/4, 3/4, 1/3, 2/3, 1/2, 1 and their reciprocals.
		

Crossrefs

a(n) = T(n, 5) from A090030. Cf. A000225, A001047, A060867, A090020, A090021, A090022, A090023 are for dimension n with side lengths 1, 2, 3, 4, 5, 6, 7 respectively. A049691, A090025, A090026, A090027, A090028, A090029 are for side length k in 2, 3, 4, 5, 6, 7 dimensions.

Programs

  • Mathematica
    Table[9^n - 5^n - 3^n - 2^n + 2, {n, 0, 20}]
  • Python
    [9**n-5**n-3**n-2**n+2 for n in range(30)] # Gennady Eremin, Mar 12 2022

Formula

a(n) = 9^n - 5^n - 3^n - 2^n + 2.
G.f.: -x*(291*x^3-189*x^2+25*x+1)/((x-1)*(2*x-1)*(3*x-1)*(5*x-1)*(9*x-1)). [Colin Barker, Sep 04 2012]

A090026 Number of distinct lines through the origin in 4-dimensional cube of side length n.

Original entry on oeis.org

0, 15, 65, 225, 529, 1185, 2065, 3745, 5841, 9105, 13025, 19105, 25521, 35361, 45825, 59905, 75425, 96865, 117841, 147505, 177041, 214961, 254401, 306321, 355249, 420929, 485489, 565265, 645377, 748081, 841841, 966881, 1086241, 1230401, 1373185, 1549825
Offset: 0

Views

Author

Joshua Zucker, Nov 25 2003

Keywords

Comments

Equivalently, number of lattice points where the GCD of all coordinates = 1.

Examples

			a(2) = 65 because the 65 points with at least one coordinate=2 all make distinct lines and the remaining 15 points and the origin are on those lines.
		

Crossrefs

Cf. A000225, A001047, A060867, A090020, A090021, A090022, A090023, A090024 are for n dimensions with side length 1, 2, 3, 4, 5, 6, 7, 8, respectively. A049691, A090025, A090026, A090027, A090028, A090029 are this sequence for 2, 3, 4, 5, 6, 7 dimensions. A090030 is the table for n dimensions, side length k.

Programs

  • Mathematica
    aux[n_, k_] := If[k == 0, 0, (k + 1)^n - k^n - Sum[aux[n, Divisors[k][[i]]], {i, 1, Length[Divisors[k]] - 1}]];lines[n_, k_] := (k + 1)^n - Sum[Floor[k/i - 1]*aux[n, i], {i, 1, Floor[k/2]}] - 1;Table[lines[4, k], {k, 0, 40}]
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A090026(n):
        if n == 0:
            return 0
        c, j = 1, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += (j2-j)*A090026(k1)
            j, k1 = j2, n//j2
        return (n+1)**4-c+15*(j-n-1) # Chai Wah Wu, Mar 30 2021

Formula

a(n) = A090030(4, n).
a(n) = (n+1)^4 - 1 - Sum_{j=2..n+1} a(floor(n/j)). - Chai Wah Wu, Mar 30 2021

A090027 Number of distinct lines through the origin in 5-dimensional cube of side length n.

Original entry on oeis.org

0, 31, 211, 961, 2851, 7471, 15541, 31471, 55651, 95821, 152041, 239791, 351331, 517831, 723241, 1007041, 1352041, 1821721, 2359051, 3082921, 3904081, 4956901, 6151651, 7677901, 9334261, 11445361, 13746181, 16566691, 19644031, 23432851, 27408331, 32333581
Offset: 0

Views

Author

Joshua Zucker, Nov 25 2003

Keywords

Comments

Equivalently, number of lattice points where the GCD of all coordinates = 1.

Examples

			a(2) = 211 because the 211 points with at least one coordinate=2 all make distinct lines and the remaining 31 points and the origin are on those lines.
		

Crossrefs

Cf. A000225, A001047, A060867, A090020, A090021, A090022, A090023, A090024 are for n dimensions with side length 1, 2, 3, 4, 5, 6, 7, 8, respectively. A049691, A090025, A090026, A090027, A090028, A090029 are this sequence for 2, 3, 4, 5, 6, 7 dimensions. A090030 is the table for n dimensions, side length k.

Programs

  • Mathematica
    aux[n_, k_] := If[k == 0, 0, (k + 1)^n - k^n - Sum[aux[n, Divisors[k][[i]]], {i, 1, Length[Divisors[k]] - 1}]];lines[n_, k_] := (k + 1)^n - Sum[Floor[k/i - 1]*aux[n, i], {i, 1, Floor[k/2]}] - 1;Table[lines[5, k], {k, 0, 40}]
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A090027(n):
        if n == 0:
            return 0
        c, j = 1, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += (j2-j)*A090027(k1)
            j, k1 = j2, n//j2
        return (n+1)**5-c+31*(j-n-1) # Chai Wah Wu, Mar 30 2021

Formula

a(n) = A090030(5, n).
a(n) = (n+1)^5 - 1 - Sum_{j=2..n+1} a(floor(n/j)). - Chai Wah Wu, Mar 30 2021

A090028 Number of distinct lines through the origin in 6-dimensional cube of side length n.

Original entry on oeis.org

0, 63, 665, 3969, 14833, 45801, 112825, 257257, 515025, 980217, 1720145, 2934505, 4693473, 7396137, 11112129, 16464385, 23555441, 33430033, 45927505, 62881561, 83865257, 111331241, 144772201, 187839225, 238778281, 303522401, 379323785
Offset: 0

Views

Author

Joshua Zucker, Nov 25 2003

Keywords

Comments

Equivalently, lattice points where the GCD of all coordinates = 1.

Examples

			a(2) = 665 because the 665 points with at least one coordinate=2 all make distinct lines and the remaining 63 points and the origin are on those lines.
		

Crossrefs

Cf. A000225, A001047, A060867, A090020, A090021, A090022, A090023, A090024 are for n dimensions with side length 1, 2, 3, 4, 5, 6, 7, 8, respectively. A049691, A090025, A090026, A090027, A090028, A090029 are this sequence for 2, 3, 4, 5, 6, 7 dimensions. A090030 is the table for n dimensions, side length k.

Programs

  • Mathematica
    aux[n_, k_] := If[k == 0, 0, (k + 1)^n - k^n - Sum[aux[n, Divisors[k][[i]]], {i, 1, Length[Divisors[k]] - 1}]];lines[n_, k_] := (k + 1)^n - Sum[Floor[k/i - 1]*aux[n, i], {i, 1, Floor[k/2]}] - 1;Table[lines[6, k], {k, 0, 40}]
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A090028(n):
        if n == 0:
            return 0
        c, j = 1, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += (j2-j)*A090028(k1)
            j, k1 = j2, n//j2
        return (n+1)**6-c+63*(j-n-1) # Chai Wah Wu, Mar 30 2021

Formula

a(n) = A090030(6, n).
a(n) = (n+1)^6 - 1 - Sum_{j=2..n+1} a(floor(n/j)). - Chai Wah Wu, Mar 30 2021

A090029 Number of distinct lines through the origin in 7-dimensional cube of side length n.

Original entry on oeis.org

0, 127, 2059, 16129, 75811, 277495, 804973, 2078455, 4702531, 9905365, 19188793, 35533303, 61846723, 104511583, 168681913, 266042113, 405259513, 607140745, 883046011, 1269174145, 1780715833, 2472697501, 3366818491, 4548464341
Offset: 0

Views

Author

Joshua Zucker, Nov 25 2003

Keywords

Comments

Equivalently, lattice points where the GCD of all coordinates = 1.

Examples

			a(2) = 2059 because the 2059 points with at least one coordinate=2 all make distinct lines and the remaining 127 points and the origin are on those lines.
		

Crossrefs

Cf. A000225, A001047, A060867, A090020, A090021, A090022, A090023, A090024 are for n dimensions with side length 1, 2, 3, 4, 5, 6, 7, 8, respectively. A049691, A090025, A090026, A090027, A090028, A090029 are this sequence for 2, 3, 4, 5, 6, 7 dimensions. A090030 is the table for n dimensions, side length k.

Programs

  • Mathematica
    aux[n_, k_] := If[k == 0, 0, (k + 1)^n - k^n - Sum[aux[n, Divisors[k][[i]]], {i, 1, Length[Divisors[k]] - 1}]];lines[n_, k_] := (k + 1)^n - Sum[Floor[k/i - 1]*aux[n, i], {i, 1, Floor[k/2]}] - 1;Table[lines[7, k], {k, 0, 40}]
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A090029(n):
        if n == 0:
            return 0
        c, j = 1, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += (j2-j)*A090029(k1)
            j, k1 = j2, n//j2
        return (n+1)**7-c+127*(j-n-1) # Chai Wah Wu, Mar 30 2021

Formula

a(n) = A090030(7, n).
a(n) = (n+1)^7 - 1 - Sum_{j=2..n+1} a(floor(n/j)). - Chai Wah Wu, Mar 30 2021

A090030 Triangle read by rows: T(n,k) = number of distinct lines through the origin in the n-dimensional cubic lattice of side length k with one corner at the origin.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 1, 3, 0, 0, 1, 5, 7, 0, 0, 1, 9, 19, 15, 0, 0, 1, 13, 49, 65, 31, 0, 0, 1, 21, 91, 225, 211, 63, 0, 0, 1, 25, 175, 529, 961, 665, 127, 0, 0, 1, 37, 253, 1185, 2851, 3969, 2059, 255, 0, 0, 1, 45, 415, 2065, 7471, 14833, 16129, 6305, 511, 0, 0, 1, 57, 571, 3745, 15541, 45801, 75811, 65025, 19171, 1023, 0
Offset: 0

Views

Author

Joshua Zucker, Nov 24 2003

Keywords

Comments

Equivalently, number of lattice points where the GCD of all coordinates = 1.

Examples

			T(n,1) = 2^n-1 because there are 2^n-1 lattice points other than the corner, all of which make distinct lines. T(n,2) = 3^n - 2^n because if the given corner is the origin, all the points with coordinates in {0,1} make lines that are redundant with a point containing a coordinate 2.
Triangle T(n,k) begins:
  0;
  0, 0;
  0, 1,  0;
  0, 1,  3,   0;
  0, 1,  5,   7,    0;
  0, 1,  9,  19,   15,    0;
  0, 1, 13,  49,   65,   31,     0;
  0, 1, 21,  91,  225,  211,    63,     0;
  0, 1, 25, 175,  529,  961,   665,   127,    0;
  0, 1, 37, 253, 1185, 2851,  3969,  2059,  255,   0;
  0, 1, 45, 415, 2065, 7471, 14833, 16129, 6305, 511, 0;
  ...
		

Crossrefs

Cf. A000225, A001047, A060867, A090020, A090021, A090022, A090023, A090024 give T(n, k) for k = 1, 2, 3, 4, 5, 6, 7, 8, respectively. A049691, A090025, A090026, A090027, A090028, A090029 give T(n, k) for n=2, 3, 4, 5, 6, 7 respectively. A090225 counts only points with at least one coordinate = k.
T(n,n) gives A081474.
Cf. A008683.

Programs

  • Mathematica
    aux[n_, k_] := If[k==0, 0, (k+1)^n-k^n-Sum[aux[n, Divisors[k][[i]]], {i, 1, Length[Divisors[k]]-1}]];lines[n_, k_] := (k+1)^n-Sum[Floor[k/i-1]*aux[n, i], {i, 1, Floor[k/2]}]-1;lines[n, k]

Formula

With A(n, k) = A090225(n, k), T(n, k) =(k+1)^n - 1 - the sum for 0 < i < k of Floor[k/i-1]*A(n, i)
T(n,k) = Sum_{i=1..n-k} moebius(i)*((floor((n-k)/i)+1)^k-1). - Vladeta Jovovic, Dec 03 2004

A065443 Decimal expansion of Sum_{k=1..inf} 1/(2^k-1)^2.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Nov 18 2001

Keywords

Examples

			1.1373387363441965966969133683013475838308493098...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 354-361.

Crossrefs

Programs

  • Mathematica
    RealDigits[NSum[1/(2^k - 1)^2, {k, 1, Infinity}, PrecisionGoal -> 40, AccuracyGoal -> 40, WorkingPrecision -> 500, NSumTerms -> 50, NSumExtraTerms -> 50]][[1]] (* Peter Bertok (peter(AT)bertok.com), Dec 04 2001 *)
    RealDigits[(Log[2] QPolyGamma[0, 1, 1/2] + QPolyGamma[1, 1, 1/2])/Log[2]^2 - 1, 10, 20][[1]] (* Eric W. Weisstein, Jun 02 2025 *)
  • PARI
    { default(realprecision, 2080); x=suminf(k=1, 1/(2^k - 1)^2); for (n=1, 2000, d=floor(x); x=(x-d)*10; write("b065443.txt", n, " ", d)) } \\ Harry J. Smith, Oct 19 2009

Formula

Equals Sum_{n>=1} 1/A060867(n).
From Amiram Eldar, Oct 16 2022: (Start)
Equals Sum_{k>=1} k/(2^(k+1)-1).
Equals A066766 - A065442. (End)
Equals Sum_{n >= 1} q^(n^2)*( (n - 1) + q^n - (n - 1)*q^(2*n) )/(1 - q^n)^2 evaluated at q = 1/2 (see A065608). - Peter Bala, Oct 16 2022

Extensions

More terms from Peter Bertok (peter(AT)bertok.com), Dec 04 2001

A090021 Number of distinct lines through the origin in the n-dimensional lattice of side length 5.

Original entry on oeis.org

0, 1, 21, 175, 1185, 7471, 45801, 277495, 1672545, 10056991, 60405081, 362615815, 2176242705, 13059083311, 78359348361, 470170570135, 2821066729665, 16926530042431, 101559568723641, 609358576700455, 3656154951181425
Offset: 0

Views

Author

Joshua Zucker, Nov 19 2003

Keywords

Comments

Equivalently, lattice points where the gcd of all the coordinates is 1.

Examples

			a(2) = 21 because in 2D the lines have slope 0, 1/5, 2/5, 3/5, 4/5, 1/4, 3/4, 1/3, 2/3, 1/2, 1 and their reciprocals.
		

Crossrefs

a(n) = T(n, 5) from A090030. Cf. A000225, A001047, A060867, A090020, A090022, A090023, A090024 are for dimension n with side lengths 1, 2, 3, 4, 6, 7, 8 respectively. A049691, A090025, A090026, A090027, A090028, A090029 are for side length k in 2, 3, 4, 5, 6, 7 dimensions.

Programs

  • Mathematica
    Table[6^n - 3^n - 2*2^n + 2, {n, 0, 25}]
    LinearRecurrence[{12,-47,72,-36},{0,1,21,175},30] (* Harvey P. Dale, Jul 18 2016 *)

Formula

a(n) = 6^n - 3^n - 2*2^n + 2.
G.f.: -x*(30*x^2-9*x-1)/((x-1)*(2*x-1)*(3*x-1)*(6*x-1)). [Colin Barker, Sep 04 2012]

A090023 Number of distinct lines through the origin in the n-dimensional lattice of side length 7.

Original entry on oeis.org

0, 1, 37, 415, 3745, 31471, 257257, 2078455, 16704865, 133935391, 1072633177, 8585561095, 68702163985, 549687102511, 4397773276297, 35183283965335, 281470638631105, 2251782504544831, 18014329402322617, 144114912035163175, 1152920401607386225
Offset: 0

Views

Author

Joshua Zucker, Nov 20 2003

Keywords

Comments

Equivalently, lattice points where the gcd of all the coordinates is 1.

Examples

			a(2) = 37 because in 2D the lines have slope 0, 1/7, 2/7, 3/7, 4/7, 5/7, 6/7, 1/6, 5/6, 1/5, 2/5, 3/5, 4/5, 1/4, 3/4, 1/3, 2/3, 1/2, 1 and their reciprocals.
		

Crossrefs

Equals A090030(n+7,n).
Cf. A000225, A001047, A060867, A090020, A090021, A090022, A090024 are for dimension n with side lengths 1, 2, 3, 4, 5, 6, 8 respectively. A049691, A090025, A090026, A090027, A090028, A090029 are for side length k in 2, 3, 4, 5, 6, 7 dimensions.

Programs

  • Mathematica
    Table[8^n - 4^n - 3^n - 2^n + 2, {n, 0, 20}]
  • Python
    [8**n-4**n-3**n-2**n+2 for n in range(25)] # Gennady Eremin, Mar 09 2022

Formula

a(n) = 8^n - 4^n - 3^n - 2^n + 2.
G.f.: -x*(200*x^3-136*x^2+19*x+1)/((x-1)*(2*x-1)*(3*x-1)*(4*x-1)*(8*x-1)). - Colin Barker, Sep 04 2012

A007179 Dual pairs of integrals arising from reflection coefficients.

Original entry on oeis.org

0, 1, 1, 4, 6, 16, 28, 64, 120, 256, 496, 1024, 2016, 4096, 8128, 16384, 32640, 65536, 130816, 262144, 523776, 1048576, 2096128, 4194304, 8386560, 16777216, 33550336, 67108864, 134209536, 268435456, 536854528, 1073741824, 2147450880, 4294967296, 8589869056
Offset: 0

Views

Author

Keywords

Examples

			From _Gus Wiseman_, Feb 26 2022: (Start)
Also the number of integer compositions of n with at least one odd part. For example, the a(1) = 1 through a(5) = 16 compositions are:
  (1)  (1,1)  (3)      (1,3)      (5)
              (1,2)    (3,1)      (1,4)
              (2,1)    (1,1,2)    (2,3)
              (1,1,1)  (1,2,1)    (3,2)
                       (2,1,1)    (4,1)
                       (1,1,1,1)  (1,1,3)
                                  (1,2,2)
                                  (1,3,1)
                                  (2,1,2)
                                  (2,2,1)
                                  (3,1,1)
                                  (1,1,1,2)
                                  (1,1,2,1)
                                  (1,2,1,1)
                                  (2,1,1,1)
                                  (1,1,1,1,1)
(End)
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column k=2 of A309748.
Odd bisection is A000302.
Even bisection is A006516 = 2^(n-1)*(2^n - 1).
The complement is counted by A077957, internal version A027383.
The internal case is A274230, even bisection A134057.
A000045(n-1) counts compositions without odd parts, non-singleton A077896.
A003242 counts Carlitz compositions.
A011782 counts compositions.
A034871, A097805, and A345197 count compositions by alternating sum.
A052952 (or A074331) counts non-singleton compositions without even parts.

Programs

  • Magma
    [Floor(2^n/2-2^(n/2)*(1+(-1)^n)/4): n in [0..40]]; // Vincenzo Librandi, Aug 20 2011
    
  • Maple
    f := n-> if n mod 2 = 0 then 2^(n-1)-2^((n-2)/2) else 2^(n-1); fi;
  • Mathematica
    LinearRecurrence[{2,2,-4},{0,1,1},30] (* Harvey P. Dale, Nov 30 2015 *)
    Table[2^(n-1)-If[EvenQ[n],2^(n/2-1),0],{n,0,15}] (* Gus Wiseman, Feb 26 2022 *)
  • PARI
    Vec(x*(1-x)/((1-2*x)*(1-2*x^2)) + O(x^50)) \\ Michel Marcus, Jan 28 2016

Formula

From Paul Barry, Apr 28 2004: (Start)
Binomial transform is (A000244(n)+A001333(n))/2.
G.f.: x*(1-x)/((1-2*x)*(1-2*x^2)).
a(n) = 2*a(n-1)+2*a(n-2)-4*a(n-3).
a(n) = 2^n/2-2^(n/2)*(1+(-1)^n)/4. (End)
G.f.: (1+x*Q(0))*x/(1-x), where Q(k)= 1 - 1/(2^k - 2*x*2^(2*k)/(2*x*2^k - 1/(1 + 1/(2*2^k - 8*x*2^(2*k)/(4*x*2^k + 1/Q(k+1)))))); (continued fraction). - Sergei N. Gladkovskii, May 22 2013
a(n) = A011782(n+2) - A077957(n) - Gus Wiseman, Feb 26 2022
Previous Showing 11-20 of 48 results. Next