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.

User: Clive Tooth

Clive Tooth's wiki page.

Clive Tooth has authored 10 sequences.

A382485 a(n) = ceiling(n/d^2) where d is the largest divisor of n which is not greater than the square root of n.

Original entry on oeis.org

1, 2, 3, 1, 5, 2, 7, 2, 1, 3, 11, 2, 13, 4, 2, 1, 17, 2, 19, 2, 3, 6, 23, 2, 1, 7, 3, 2, 29, 2, 31, 2, 4, 9, 2, 1, 37, 10, 5, 2, 41, 2, 43, 3, 2, 12, 47, 2, 1, 2, 6, 4, 53, 2, 3, 2, 7, 15, 59, 2, 61, 16, 2, 1, 3, 2, 67, 5, 8, 2, 71, 2, 73, 19, 3, 5, 2, 3, 79, 2, 1, 21, 83, 2, 4, 22, 10, 2, 89
Offset: 1

Author

Clive Tooth, Mar 30 2025

Keywords

Comments

Conjecture: There exists some constant, k, approximately equal to 1.2, such that a(n) is of average order k*n/log(n). See Tooth Link for evidence.

Examples

			a(12)=2 because the largest factor of 12, which is not greater than sqrt(12), is 3; and ceiling(12/3^2)=2.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local d;
         d:= max(select(t -> t^2 <= n, numtheory:-divisors(n)));
         ceil(n/d^2)
    end proc:
    map(f, [$1..100]); # Robert Israel, Apr 30 2025
  • Mathematica
    a[n_]:=Ceiling[n/(Select[Divisors[n],#<=Sqrt[n]&][[-1]])^2];Array[a,89] (* James C. McMahon, Apr 07 2025 *)
  • PARI
    a(n) = my(d=divisors(n)); ceil(n/d[(length(d)+1)\2]^2); \\ Michel Marcus, Apr 07 2025

Formula

a(n) = ceiling(A033677(n)/A033676(n)).
a(n) = 1 iff n is a square.
a(n) = n iff n is prime, or 1.

A375774 The number of n-digit integers that can be written as the product of n single-digit integers. The single-digit integers need not be distinct.

Original entry on oeis.org

10, 27, 55, 85, 108, 119, 118, 108, 94, 78, 60, 46, 35, 27, 19, 14, 10, 7, 4, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Author

Clive Tooth, Aug 27 2024

Keywords

Comments

a(21)=1 (9^21 has 21 digits). For all n>21, a(n)=0.

Examples

			a(2) is 27 because 27 2-digit integers can be written as the product of 2 single-digit integers. Those 27 integers are: 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, 28, 30, 32, 35, 36, 40, 42, 45, 48, 49, 54, 56, 63, 64, 72 and 81. Note that each of the 2-digit integers 12, 16, 18, 24 and 36 can be expressed as a product of 2 single-digit integers in more than 1 way. However, each of those 2-digit integers is only counted once.
		

Crossrefs

Cf. A366181.

Programs

  • Python
    from math import prod
    from itertools import combinations_with_replacement as cwr
    def a(n):
        if n > 21: return 0
        L, U = (n>1)*10**(n-1)-1, 10**n
        return len(set(p for mc in cwr(range(10), n) if L < (p:=prod(mc)) < U))
    print([a(n) for n in range(1, 22)]) # Michael S. Branicky, Aug 27 2024

A366181 The number of 2n-digit integers that can be written as the product of two n-digit integers.

Original entry on oeis.org

27, 2205, 194700, 17874052, 1678273759, 159696501022, 15330248094326, 1480695423269672
Offset: 1

Author

Clive Tooth, Oct 03 2023

Keywords

Examples

			a(1)=27. That is, when the integers are expressed in decimal, the number of 2-digit integers that can be written as the product of 2 single-digit integers is 27: 10=2*5, 12=2*6=3*4, 14=2*7, 15=3*5, 16=2*8=4*4, 18=2*9=3*6, 20=4*5, 21=3*7, 24=3*8=4*6, 25=5*5, 27=3*9, 28=4*7, 30=5*6, 32=4*8, 35=5*7, 36=4*9=6*6, 40=5*8, 42=6*7, 45=5*9, 48=6*8, 49=7*7, 54=6*9, 56=7*8, 63=7*9, 64=8*8, 72=8*9, 81=9*9
Note that each of the 2-digit integers 12, 16, 18, 24 and 36 can be expressed as a product of 2 single-digit integers in 2 ways. However, each of those 2-digit integers is only counted once.
		

Crossrefs

Programs

  • Python
    def A366181(n):
        a, b, c, d = 10**(n-1), 10**n, 10**((n<<1)-1), 10**(n<<1)
        return len({i*j for i in range(a,b) for j in range(min(i,c//i),min(b,d//i+1)) if c<=i*jChai Wah Wu, Oct 13 2023

Extensions

a(6) from Hugo Pfoertner, Oct 12 2023
a(7) from Bert Dobbelaere, Oct 23 2023
a(8) from Clive Tooth and Benjamin Chaffin, Nov 06 2023

A308807 a(n) = 4*5^(n-1) + n.

Original entry on oeis.org

5, 22, 103, 504, 2505, 12506, 62507, 312508, 1562509, 7812510, 39062511, 195312512, 976562513, 4882812514, 24414062515, 122070312516, 610351562517, 3051757812518, 15258789062519, 76293945312520, 381469726562521, 1907348632812522, 9536743164062523
Offset: 1

Author

Clive Tooth, Jun 25 2019

Keywords

Comments

The last n decimal digits of 2^a(n) form the number 2^n.

Examples

			a(1) = 5, 2^5 = 32, the last digit of 32 is 2, which is 2^1.
a(2) = 22, 2^22 = 4194304, the last 2 digits of 4194304 are 04, which is 2^2.
		

Programs

  • Maple
    seq(4*5^(n-1) + n, n=1..30); # Robert Israel, Jun 28 2019
  • Mathematica
    Table[4*5^(n-1)+n,{n,30}] (* or *) LinearRecurrence[{7,-11,5},{5,22,103},30] (* Harvey P. Dale, Jun 27 2020 *)
  • PARI
    Vec(x*(5 - 13*x + 4*x^2) / ((1 - x)^2*(1 - 5*x)) + O(x^25)) \\ Colin Barker, Jun 29 2019

Formula

a(n) = A005054(n) + n.
From Colin Barker, Jun 26 2019: (Start)
G.f.: x*(5 - 13*x + 4*x^2) / ((1 - x)^2*(1 - 5*x)).
a(n) = 7*a(n-1) - 11*a(n-2) + 5*a(n-3) for n>3.
(End)
Conjectures confirmed by Robert Israel, Jun 28 2019

A270579 The number of sets of parallel planes into which the planes defined in A270578 fall.

Original entry on oeis.org

13, 145, 1237, 4813, 19225, 42901, 119725, 233065, 475609
Offset: 2

Author

Clive Tooth, Mar 19 2016

Keywords

Examples

			The 20 planes defined by the points of the 2 X 2 X 2 grid fall into 13 families of parallel planes: 3 parallel to the faces, 4 perpendicular to the space diagonals and 6 which are the planes defined by an edge and its opposite edge. So a(2)=13.
		

Crossrefs

A270578 The number of distinct planes defined by an n X n X n grid of points.

Original entry on oeis.org

20, 491, 7502, 52013, 297464, 1119791, 3900890, 11135201, 29329232
Offset: 2

Author

Clive Tooth, Mar 19 2016

Keywords

Examples

			The 8 points of the 2 X 2 X 2 grid define 20 planes: the 6 faces of the cube, 6 planes formed by an edge and its opposite edge, and 8 planes defined by the three vertices surrounding a given vertex. So, a(2)=20.
		

Crossrefs

A268124 a(n) = n^4 * (n+3)^6 * 4^(-n).

Original entry on oeis.org

0, 1024, 15625, 59049, 117649, 160000
Offset: 0

Author

Clive Tooth, Jan 26 2016

Keywords

Comments

This is an example of a simple sequence which generates integers for a while, but then generates no further integers.

Examples

			The third term is a(2), which is 2^4 * 5^6 * 4^-2, which is 15625.
		

Programs

A268020 The number of spheres on which the points defined by A222268 lie.

Original entry on oeis.org

3, 29, 299, 2177, 10482, 41348
Offset: 2

Author

Clive Tooth, Feb 28 2016

Keywords

Comments

Given a cubic n X n X n grid of points, a collection of lines is produced by constructing a line through every pair of points. A222267 gives the count of such lines. A collection of points is produced by taking the points of intersection of those lines. A222268 gives the count of such points. Each point in such a collection will lie on a particular sphere centered at the center of the cubic grid. a(n) is the total number of such spheres, including the radius-zero sphere.

Examples

			A 2 X 2 X 2 grid of points defines 28 distinct lines which intersect in a total of 15 points (including the original 8 points). One of these points is the center of the grid, 8 of them are the vertices of the cube and 6 are the face-centers of the cube. So, a(2) = 3.
		

Crossrefs

A222267 The number of distinct lines defined by an n X n X n grid of points.

Original entry on oeis.org

28, 253, 1492, 5485, 17092, 41905, 95140, 191773, 364420, 638785, 1085500, 1745389, 2743084, 4136257, 6101740, 8747821, 12377764, 17066737, 23287564, 31174813, 41276548, 53767873, 69544324, 88722973, 112450132, 140859361, 175324636
Offset: 2

Author

Clive Tooth, Feb 13 2013

Keywords

Comments

Given a cubic n X n X n grid of points, a(n) is the number of distinct lines produced by constructing a line through every pair of points.
Define the grid as consisting of the set of n^3 distinct points whose x, y and z coordinates are all integers in [0..n-1]. Assign to each grid point a distinct index j = x + n*y + n^2*z. For each pair of grid points P_A and P_B (where P_A is the one with the lower index j), let L be the line that passes through both grid points, and let S be the segment of that line from P_A to P_B. Examine each of the C(n^3,2) pairs of distinct grid points P_A and P_B; a(n) is the number of those pairs for which S does not pass through any other grid points between P_A and P_B, nor does L pass through any other grid points beyond the P_A end of S. - Jon E. Schoenfield, Sep 21 2013
Conjecture: a(n) is approximately 0.3639537*n^6, with a relative error of about 10^-5 when n is near 200. - Clive Tooth, Mar 03 2016

Examples

			Each of the 28 pairs of points on a 2 X 2 X 2 grid of points defines a distinct line, so a(2) = 28.
Of the 351 pairs of points on a 3 X 3 X 3 grid, there are only 253 distinct lines, so a(3) = 253.
		

Crossrefs

Cf. A018808, A222268 (number of intersection points of these lines).

Programs

  • Mathematica
    mq[{x1_, y1_}, {x2_, y2_}] := If[x1 == x2, {x1}, {y2 - y1, x2*y1 - x1*y2}/(x2 - x1)]; two[n_] := Block[{p = Tuples[Range@n, 2]},
    Length@Union@Flatten[Table[mq[p[[i]], p[[j]]], {i, 2, n^2}, {j, i - 1}], 1]]; coef[a_, b_] := Block[{d = b - a}, If[d[[1]] == 0, {0}, d *= Sign@d[[1]]/GCD @@ d; {a - d*a[[1]]/d[[1]], d}]]; a[n_] := Block[{p = Tuples[Range@n, 3]}, n*two[n] - 1 + Length@Union@ Flatten[Table[coef[p[[i]], p[[j]]], {i, 2, n^3}, {j, i - 1}], 1]]; Table[v = a[n]; Print@v; v, {n, 2, 12}] (* Giovanni Resta, Feb 14 2013 *)

Extensions

a(6)-a(12) from Giovanni Resta, Feb 14 2013
a(13)-a(28) from Jon E. Schoenfield, Sep 16 2013

A222268 Number of points defined by the lines described in A222267.

Original entry on oeis.org

15, 649, 13307, 107201, 719981, 2912939
Offset: 2

Author

Clive Tooth, Feb 13 2013

Keywords

Comments

Given a cubic n X n X n grid of points, a collection of lines is produced by constructing a line through every pair of points. A222267 gives the count of such lines. a(n) is the total number of points of intersection of these lines, including the original n^3 points.

Examples

			A 2 X 2 X 2 grid of points defines 28 distinct lines which intersect in a total of 15 points (including the original 8 points).
		

Crossrefs

A222267 is the number of lines produced from the grid of points.

Extensions

a(6) and a(7) from Clive Tooth, Feb 28 2016