A090025
Number of distinct lines through the origin in 3-dimensional cube of side length n.
Original entry on oeis.org
0, 7, 19, 49, 91, 175, 253, 415, 571, 805, 1033, 1423, 1723, 2263, 2713, 3313, 3913, 4825, 5491, 6625, 7513, 8701, 9811, 11461, 12637, 14497, 16045, 18043, 19807, 22411, 24163, 27133, 29485, 32425, 35065, 38593, 41221, 45433, 48727, 52831
Offset: 0
a(2) = 19 because the 19 points with at least one coordinate=2 all make distinct lines and the remaining 7 points and the origin are on those lines.
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.
-
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[3, k], {k, 0, 40}]
a[n_] := Sum[MoebiusMu[k]*((Floor[n/k]+1)^3-1), {k, 1, n}]; Table[a[n], {n, 0, 39}] (* Jean-François Alcover, Nov 28 2013, after Vladeta Jovovic *)
-
a(n)=(n+1)^3-sum(j=2,n+1,a(floor(n/j)))
-
from functools import lru_cache
@lru_cache(maxsize=None)
def A090025(n):
if n == 0:
return 0
c, j = 1, 2
k1 = n//j
while k1 > 1:
j2 = n//k1 + 1
c += (j2-j)*A090025(k1)
j, k1 = j2, n//j2
return (n+1)**3-c+7*(j-n-1) # Chai Wah Wu, Mar 30 2021
A090020
Number of distinct lines through the origin in the n-dimensional lattice of side length 4.
Original entry on oeis.org
0, 1, 13, 91, 529, 2851, 14833, 75811, 383809, 1932931, 9705553, 48648931, 243605089, 1219100611, 6098716273, 30503196451, 152544778369, 762810181891, 3814309582993, 19072323542371, 95363943807649, 476826695752771
Offset: 0
a(2) = 13 because in 2D the lines have slope 0, 1/4, 1/3, 1/2, 2/3, 3/4, 1, 4/3, 3/2, 2, 3, 4 and infinity.
a(n) = T(n,4) from
A090030. Cf.
A000225,
A001047,
A060867,
A090021,
A090022,
A090023,
A090024 are for dimension n with side lengths 1, 2, 3, 5, 6, 7, 8 respectively.
A049691,
A090025,
A090026,
A090027,
A090028,
A090029 are for side length k in 2, 3, 4, 5, 6, 7 dimensions.
-
Table[5^n - 3^n - 2^n + 1, {n, 0, 25}]
LinearRecurrence[{11,-41,61,-30},{0,1,13,91},30] (* Indranil Ghosh, Feb 21 2017 *)
-
def A090020(n): return 5**n-3**n-2**n+1 # Indranil Ghosh, Feb 21 2017
A090022
Number of distinct lines through the origin in the n-dimensional lattice of side length 6.
Original entry on oeis.org
0, 1, 25, 253, 2065, 15541, 112825, 804973, 5692705, 40071781, 281367625, 1972955293, 13823978545, 96820307221, 677949854425, 4746473419213, 33228592555585, 232613204977861, 1628344491013225, 11398619145204733
Offset: 0
a(2) = 25 because in 2D the lines have slope 0, 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.
a(n) = T(n, 5) from
A090030. Cf.
A000225,
A001047,
A060867,
A090020,
A090021,
A090023,
A090024 are for dimension n with side lengths 1, 2, 3, 4, 5, 7, 8 respectively.
A049691,
A090025,
A090026,
A090027,
A090028,
A090029 are for side length k in 2, 3, 4, 5, 6, 7 dimensions.
-
[7^n-4^n-3^n+1: n in [0..20]]; // Wesley Ivan Hurt, Mar 06 2022
-
Table[7^n - 4^n - 3^n + 1, {n, 0, 25}]
-
[7**n-4**n-3**n+1 for n in range(20)] # Gennady Eremin, Mar 06 2022
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
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.
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.
-
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}]
-
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
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
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.
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.
-
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}]
-
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
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
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.
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.
-
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}]
-
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
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
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.
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.
-
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}]
-
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
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
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;
...
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.
-
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]
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
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.
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.
-
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 *)
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
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.
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.
-
Table[8^n - 4^n - 3^n - 2^n + 2, {n, 0, 20}]
-
[8**n-4**n-3**n-2**n+2 for n in range(25)] # Gennady Eremin, Mar 09 2022
Showing 1-10 of 11 results.
Comments