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: Charles L. Hohn

Charles L. Hohn's wiki page.

Charles L. Hohn has authored 42 sequences. Here are the ten most recent ones:

A387222 Number of noncongruent points in a face-centered cubic lattice that intersect a sphere of radius n centered on a point in the lattice.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 4, 2, 5, 3, 7, 1, 6, 4, 6, 3, 8, 4, 7, 2, 11, 5, 9, 3, 9, 7, 9, 1, 11, 6, 17, 4, 11, 6, 13, 3, 12, 8, 12, 4, 18, 7, 13, 2, 17, 11, 16, 5, 15, 9, 21, 3, 17, 9, 16, 7, 17, 9, 22, 1, 29, 11, 18, 6, 20, 17, 19, 4, 20, 11, 30, 6, 26
Offset: 0

Author

Charles L. Hohn, Aug 22 2025

Keywords

Comments

Here congruence is relative to the 48-point cuboctahedral symmetry in a fcc lattice. The symmetric rotations and reflections of the points that comprise a(n), with redundancies removed for points that lie on axis planes, gives A386315(n).
Odd n with nonprimitive points removed gives A387223.

Examples

			a(5) = 3: [5, 0, 0], [4, 3, 0], and [4, 1, 4*sqrt(1/2)], because this is the minimal set of points whose cuboctahedral rotations and reflections comprise all of the points in a fcc lattice that intersect a sphere of radius 5 centered on a point in the lattice.
		

Crossrefs

Programs

  • PARI
    a(n)={if(!n, return(1)); my(c=0); for(x=0, n, for(y=0, min(x, sqrtint(n^2-x^2)), for(o=0, 1, my(m=2*(n^2-(x+o/2)^2-(y+o/2)^2)); if(!issquare(m), next); my(z=sqrtint(m)); if(z>=0 && z%2==o, c+=if(y+o && (x-y==z || x+y+o==z), 2, 1))))); c/3}

A386315 Number of points in a face-centered cubic lattice that intersect a sphere of radius n centered on a point in the lattice.

Original entry on oeis.org

1, 12, 12, 36, 12, 84, 36, 108, 12, 108, 84, 132, 36, 180, 108, 252, 12, 204, 108, 228, 84, 324, 132, 300, 36, 444, 180, 324, 108, 372, 252, 396, 12, 396, 204, 756, 108, 468, 228, 540, 84, 492, 324, 516, 132, 756, 300, 588, 36, 780, 444, 612, 180, 660, 324
Offset: 0

Author

Charles L. Hohn, Aug 15 2025

Keywords

Comments

For all n > 0, the points at the 4 90-degree rotations of [n, 0, 0] and the eight 90-degree rotations and vertical reflections of [n/2, n/2, n*sqrt(1/2)] form the 12 vertices of a cuboctahedron (shown in red in the Links example). Points that otherwise lie on an axis plane have 24-point symmetry (green), and all other points have 48-point symmetry (blue). Thus, a(n) for all n > 0 are odd multiples of 12.
The number of noncongruent points for each sphere radius n (points within or on vertices or edges of each symmetry region in the Links example) gives A387222, the number of those points that are primitive for radius n (darker colors) gives A387223 for odd sphere radii, and the total primitive count divided by 12 gives A278081 for odd sphere radii. Examples of nonprimitive points include [3, 0, 0] and [3/2, 3/2, 3*sqrt(1/2)] for a(3), which reduce to a(1) primitive points [1, 0, 0] and [1/2, 1/2, sqrt(1/2)] respectively.
Analog for the simple cubic lattice is A016725.

Examples

			a(3) = 36, which is the sum of 4 90-degree rotations of [3, 0, 0], 8 90-degree rotations and vertical reflections of [3/2, 3/2, 3*sqrt(1/2)] and [1, 0, 4*sqrt(1/2)], and 16 90-degree rotations and vertical and horizontal reflections of [5/2, 3/2, sqrt(1/2)].
		

Crossrefs

Programs

  • PARI
    a(n)={my(c=0); for(x=0, n, for(y=0, min(x, sqrtint(n^2-x^2)), for(o=0, 1, my(m=2*(n^2-(x+o/2)^2-(y+o/2)^2)); if(!issquare(m), next); my(z=sqrtint(m)); if(z>=0 && z%2==o, c+=2^(4-if(!z, 1)-if(x==y, 1)-if(!min(x, y) && !o, 1)-if(!vecmax([x, y, z, o]), 1)))))); c}
    
  • PARI
    a(n)={if(!n, return(1)); my(f=Vec(factor(n)), o=12, r=o); for(i=if(#f[1] && f[1][1]==2, 2, 1), #f[1], my(m=if(f[1][i]%8>=4, 2)); f[2][i]++; while(f[2][i]--, o=o*f[1][i]+r*m); r=o); o}

Formula

a(n) = A004015(n^2).
a(2*n) = a(n).
a(p*n) = p*a(n) where p is a prime and p mod 8 is in {1, 3}.
a(p*n) = p*a(n) + 2*a(n/p^c) where p is a prime, p mod 8 is in {5, 7}, and c is the count of prime factors p in n.

A386671 All integers k that can produce a closed walk in a square lattice via noncongruent primitive k-length hypotenuses, in ascending order.

Original entry on oeis.org

40885, 69745, 98605, 127465, 146705, 175565, 214045, 233285, 242905, 262145, 271765, 329485, 358345, 377585, 416065, 435305, 464165, 473785, 550745, 560365, 579605, 618085, 646945, 666185, 675805, 695045, 704665, 752765, 762385, 787205, 810485, 839345, 848965
Offset: 1

Author

Charles L. Hohn, Jul 28 2025

Keywords

Comments

Most of the initial terms are (5 * 13 * 37) * p, where p is a Pythagorean prime (A002144) other than 5, 13, or 37. These terms produce walks of 8 segments that form the same bilaterally symmetrical base shape, scaled up by a factor of p, and rotated such that the axis of symmetry becomes the hypotenuse of Pythagorean triangle [x, y, p] * 6392. See Links for examples.
Other series with their own such patterns occur with a series based on (29 * 61 * 89) * p beginning at a(30) = 787205, and another based on (13 * 109 * 229) * p beginning at a(60) = 1622465. It is conjectured that there are infinitely many of such series.
The first term that is a product of 5 different Pythagorean primes, a(44) = 1185665, is also the first that produces multiple different solutions.
It is conjectured that all terms are products of 4 or more Pythagorean primes, including at least 4 different ones, though not all such products produce closed walks. It is also conjectured that all walks have an even count of hypotenuse segments and a minimum of 6 segments, and are bilaterally symmetrical when arranged in order of increasing angle.
The shortest such walk in 2 or more dimensions, by total walk length rather than diagonal segment length, gives A385525, with A385525(2) = a(1) * 8. Closed walks along diagonals in an equilateral triangular lattice gives A387031.

Examples

			a(1) = 40885 because 40885-length hypotenuses of primitive Pythagorean triangles [38076, 14893] + [35844, 19667] + [11603, 39204] + [-34387, 22116] + [-37523, 16236] + [-26093, -31476] + [3636, -40723] + [8844, -39917] = [0, 0].
		

Crossrefs

Programs

  • PARI
    is_a386671(k)={my(v=List); for(x=1, sqrtint(k^2/2), my(y=sqrtint(k^2-x^2)); if(x^2+y^2==k^2 && gcd([x, y, k])==1, listput(v, [x, y]))); return(if(#v>=3 && closable(v), 1, 0))}
    closable(v, c=vector(3))={my(o=!c[1] && !c[2]); if(#v==1, return(if(c[3] && (o || vecsort(abs([c[1], c[2]]))==vecsort(abs(v[1]))), 1, 0))); my(x, y, v2=v); listpop(v2); foreach(if(o, [0, 1], [0, 1, -1]), x, foreach(if(!x, [0], o, [1], [1, -1]), y, forperm(2, p, if(closable(v2, c+[v[#v][p[1]]*x, v[#v][p[2]]*y, abs(x)]), return(1)); if(!x || o, break)))); 0}

A387031 All integers k that can produce a closed walk in an equilateral triangular lattice via noncongruent primitive k-length diagonals, in ascending order.

Original entry on oeis.org

53599, 104377, 105469, 121303, 126217, 136591, 144781, 172081, 177289, 178087, 189007, 205933, 211603, 222859, 251503, 273637, 276241, 290563, 300181, 300979, 307489, 325717, 345247, 346801, 348859, 358267, 359233, 388759, 392119, 392977, 403039, 417487
Offset: 1

Author

Charles L. Hohn, Aug 13 2025

Keywords

Comments

All observed terms are products of 4 different primes that are 1 mod 6 (A002476), though not all such products produce closed walks. It is conjectured that all terms are products of 4 or more such primes, including at least 4 different ones.
Closed walks along diagonals in a square lattice gives A386671.

Examples

			a(1) = 53599 because 53599-length moves of [0, 60, 120] degrees respectively of [26216, 35445, 0] + [-16165, 0, 43656] + [-19651, 0, 41000] + [-1389, -52891, 0] + [0, -21829, -39240] + [50264, 0, -6141] = [39275, -39275, 39275], and [0, 0] + 39275 @ 0 degrees - 39275 @ 60 degrees + 39275 @ 120 degrees = [0, 0].
		

Crossrefs

Programs

  • PARI
    is_a387031(k)={my(v=List); for(x=1, sqrtint(k^2/3), my(y=(sqrtint(4*k^2-3*x^2)-x)/2); if((x+y/2)^2+y^2*3/4==k^2 && gcd([x, y, k])==1, listput(v, [x, y]))); return(if(#v>=3 && closable(v), 1, 0))}
    closable(v, c=vector(4))={my(o=(c[1]==c[3] && c[2]==-c[3])); if(!#v, return(if(c[4], o, 0))); my(x, y, v2=v); listpop(v2); foreach(if(o, [0, 1], [0, 1, 2, 3, 4, 5, 6]), r1, my(r2=r1%6+1); forperm(2, p, my(c2=c); if(r1, c2[(r1-1)%3+1]+=v[#v][p[1]]*if(r1>=4, -1, 1); c2[(r2-1)%3+1]+=v[#v][p[2]]*if(r2>=4, -1, 1); c2[4]++); if(closable(v2, c2), return(1)); if(!r1, break)))}

A385525 Consider the graph whose vertices are the points of the n-dimensional cubic lattice with points connected by all integer-length diagonals that traverse all n dimensions and do not intersect intermediate points. a(n) is the total length of the shortest possible closed walk in this graph via noncongruent diagonals of the same length.

Original entry on oeis.org

327080, 84, 52, 32, 18, 24, 24, 24, 24, 24, 18, 24, 24, 24, 24, 24, 24, 24, 24, 30, 24, 30, 30, 24, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 36, 30, 36, 36, 30, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 40, 36, 36, 40, 36, 40, 42
Offset: 2

Author

Charles L. Hohn, Jul 30 2025

Keywords

Comments

Other than a(2) whose walk is comprised of 8 diagonal segments, all known terms are produced by 3- or 4-segment walks, including some with examples of both. It is conjectured that this holds true for all n >= 3.
For n = 2, the walk segments are the hypotenuses of noncongruent primitive Pythagorean triangles.
The offset is 2, because even though the graph could be defined in dimension 1 (the vertices would be the points of Z, with each point connected to its two neighbors), it would not contain any closed paths.
Removing the constraint that the diagonal segments must all have the same length gives A386251. All such walks in 2 dimensions, by diagonal segment length rather than total walk length, gives A386671.

Examples

			a(2) = 327080 because [3636, 40723] + [8844, 39917] + [11603, -39204] + [38076, -14893] + [-37523, -16236] + [35844, -19667] + [-34387, -22116] + [-26093, 31476] = [0, 0] and 8 segments * length 40885 = 327080, which is the smallest example for n = 2.
a(3) = 84: [16, 11, 8] + [-13, 4, 16] + [-8, -19, -4] + [5, 4, -20] = [0, 0, 0] and 4 * 21 = 84.
a(4) = 52: [8, 8, 5, 4] + [-9, -6, 6, 4] + [-7, -4, -10, 2] + [8, 2, -1, -10] = [0, 0, 0, 0] and 4 * 13 = 52.
		

Crossrefs

Cf. A020882 (diagonals in 2 dimensions), A096910 (diagonals in 3 dimensions).

A386251 Consider the graph whose vertices are the points of the n-dimensional cubic lattice with points connected by all integer-length diagonals that traverse all n dimensions and do not intersect intermediate points. a(n) is the total length of the shortest possible closed walk in this graph via noncongruent diagonals.

Original entry on oeis.org

60, 28, 20, 22, 18, 16, 18, 18, 16, 18, 18, 18, 20, 20, 18, 20, 20, 20, 22, 22, 22, 24, 24, 22, 24, 24, 24, 26, 24, 24, 26, 26, 26, 26, 26, 26, 28, 28, 28, 28, 30, 28, 30, 30, 30, 30, 30, 30, 32, 32, 32, 32, 32, 32, 32, 34, 34, 34, 34, 34, 36, 34, 34, 36, 36
Offset: 2

Author

Charles L. Hohn, Jul 16 2025

Keywords

Comments

It is provable that all such walks must be even in total length. It is also provable that 3-segment closed walks are impossible for n < 6, and conjectured that a(n) for all n >= 6 are produced by 3-segment walks.
For n = 2, the walk segments are the hypotenuses of noncongruent primitive Pythagorean triangles.
The offset is 2, because even though the graph could be defined in dimension 1 (the vertices would be the points of Z, with each point connected to its two neighbors), it would not contain any closed paths.
Adding a constraint that the diagonal segments must all have the same length gives A385525.

Examples

			a(2) = 60 because [3, 4] + [5, 12] + [-15, 8] + [7, -24] = [0, 0] and segment lengths 5 + 13 + 17 + 25 = 60, which is the smallest example for n = 2.
a(3) = 28: [2, 2, 1] + [-3, -2, -6] + [-7, 4, 4] + [8, -4, 1] = [0, 0, 0] and 3 + 7 + 9 + 9 = 28.
a(4) = 20: [1, 1, 1, 1] + [-1, -2, -2, -4] + [-5, -3, -1, 1] + [5, 4, 2, 2] = [0, 0, 0, 0] and 2 + 5 + 6 + 7 = 20.
		

Crossrefs

Cf. A385525.
Cf. A020882 (diagonals in 2 dimensions), A096910 (diagonals in 3 dimensions).

A385084 Smallest integer value of Manhattan(v) + Euclidean(v) where v is a vector of n positive integers, and Manhattan(v) = Sum v[i] and Euclidean(v) = sqrt(Sum v[i]^2).

Original entry on oeis.org

2, 12, 8, 6, 12, 10, 14, 14, 12, 16, 20, 22, 18, 22, 26, 20, 24, 28, 26, 30, 30, 28, 36, 34, 30, 38, 36, 36, 42, 38, 42, 44, 40, 44, 46, 42, 48, 48, 54, 50, 50, 56, 52, 58, 58, 54, 60, 60, 56, 62, 66, 64, 64, 68, 66, 66, 70, 68, 74, 74, 70, 76, 76, 72, 78, 78, 80
Offset: 1

Author

Charles L. Hohn, Jun 17 2025

Keywords

Comments

Manhattan and Euclidean are distance measures from the origin for v as coordinates of a point in n-dimensional space.
Integer Euclidean(v) requires that v is a Pythagorean n-tuple.
These distances are a walk from the origin by a positive integer number of unit steps in each of the n dimensions, and a return to the origin by a straight line which is also an integer number of unit steps.
When n is a square, a(n) = n + sqrt(n) from v all 1's.

Examples

			For n=2, v is the legs of a Pythagorean triangle and the smallest Manhattan + Euclidean is a(2) = 12 from v = {3,4}.
a(3) = 8 because 1 + 2 + 2 + sqrt(1^2 + 2^2 + 2^2) =  1 + 2 + 2 + 3 = 8.
a(4) = 6 because 1 + 1 + 1 + 1 + sqrt(1^2 + 1^2 + 1^2 + 1^2) = 1 + 1 + 1 + 1 + 2 = 6.
a(29) = 42: 3^2 + (4 * 2^2) + (24 * 1^2) = 7^2, and 6^2 + (28 * 1^2) = 8^2 (first term with multiple different examples).
		

Programs

  • PARI
    a(n)={my(r=oo); for(c=0, oo, if(n+sqrtint(n-1)+1+c>=r, return(r)); forpart(p=c, my(s=sum(i=1, #p, (p[i]+1)^2)+(n-#p)); if(issquare(s), r=min(r, n+c+sqrtint(s))), , n))}

A385967 Smallest nonnegative integer whose square is the sum of the squares of A047432(n) distinct primes.

Original entry on oeis.org

0, 2, 18, 16, 27, 52, 54, 102, 96, 103, 152, 142, 218, 216, 225, 288, 282, 366, 352, 387, 440, 474, 558, 528, 559, 648, 626, 758, 780, 783, 900, 858, 978, 976, 1047, 1112, 1146, 1290, 1248, 1285, 1404, 1394, 1550, 1584, 1587, 1764, 1710, 1866, 1868, 1959, 2048
Offset: 1

Author

Charles L. Hohn, Jul 13 2025

Keywords

Comments

Terms are odd when n is a multiple of 5, and even otherwise.
a(10) = 103 is also the smallest number whose square is the sum of the squares of at least 2 distinct primes and which itself is also a prime.
From David A. Corneth, Jul 14 2025: (Start)
If A047432(n) is a multiple of 4 then 4 cannot be one of the squares of primes in the sum. Proof: If 4 is there the sum of squares mod 4 will be 3 (mod 4) in that case. No square is 3 (mod 4). A contradiction.
If A047432(n) is a multiple of 3 then 9 cannot be one of the squares of primes in the sum. Proof: If 9 is there then the sum of squares will be 2 (mod 3) in that case. No square is 2 (mod 3). A contradiction. (End)

Examples

			a(5) = 27 because prime count A047432(5) = 6 and the smallest sum of squares of 6 distinct primes that is a square is 19^2 + 13^2 + 11^2 + 7^2 + 5^2 + 2^2 = 27^2.
		

Crossrefs

Programs

  • PARI
    a(n, c1=0, c2=0, c3=0, ~r, ~pc)={if(c1==0, n--; my(n5=n%5); n=(n-n5)/5*8+n5+if(n5>=2, 2, 0); r=[oo]; pc=vector(max(n-1, 0)); for(i=1, #pc, pc[i]=if(i>1, pc[i-1], 0)+prime(i)^2)); if(c1==n, return(if(issquare(c3), c3, oo))); for(i=n-c1, if(c1, c2-1, oo), my(p2=prime(i)^2); if(c3+p2+if(n-c1-1>0, pc[n-c1-1], 0)>=r[1], break); r[1]=min(r[1], a(n, c1+1, i, c3+p2, ~r, ~pc))); if(c1, r[1], sqrtint(r[1]))}

A385051 a(n) is the least positive number k such that n is the greatest m such that k is a quadratic nonresidue mod prime(i+1) for i=1..m and {k mod prime(i+1): i=1..m} are all distinct.

Original entry on oeis.org

1, 2, 8, 68, 173, 593, 1748, 908, 40178, 74093, 91538, 93308, 441803, 10712063, 7898483, 35865968, 133019963, 206951093, 1314259253, 2453647853, 6701493818, 54776939873, 7717930358, 250589717363, 255937042268, 3665861003153, 957987212453, 9953155219223
Offset: 0

Author

Charles L. Hohn, Jun 16 2025

Keywords

Comments

Only relevant for odd primes, as every positive integer is a square mod 2.
For n >= 3, {a(n) mod 105} = {68, 83}.

Examples

			a(0) = 1: |{}| = 0: terminates at 1 mod 3 (square: = 1^2 mod 3).
a(1) = 2: |{2}| = 1: 2 mod 3 = 2 (nonsquare), terminates at 2 mod 5 (not distinct: repeats 2 mod 3).
a(2) = 8: |{2, 3}| = 2: 8 mod 3 = 2 (nonsquare), 8 mod 5 = 3 (nonsquare), terminates at 8 mod 7 (square: = 1^2 mod 7).
a(3) = 68: |{2, 3, 5}| = 3.
		

Crossrefs

Cf. A376999 (nondistinct nonsquares), A385050 (distinct squares), A279074 (distinct moduli).

Programs

  • PARI
    a(n)={my(v=List); for(k=1, oo, my(m=Map); for(i=1, oo, my(p=prime(i+1), kp=k%p); if(i>#v, listput(v, Map); for(j=0, (p-p%2)/2, mapput(v[i], j^2%p, 1))); if(!mapisdefined(v[i], kp) && !mapisdefined(m, kp), mapput(m, kp, 1); next); if(i-1==n, return(k)); break))}

A385050 a(n) is the least positive number k such that n is the greatest m such that k is a quadratic residue mod prime(i) for i=1..m and {k mod prime(i): i=1..m} are all distinct.

Original entry on oeis.org

1, 3, 4, 184, 9, 1479, 20799, 31509, 162094, 83554, 828844, 895449, 4631104, 86925309, 97476129, 14684224, 33547264, 5381151099, 516743824, 1958770564, 112746608529, 3046156864, 373079083204, 1394424964, 297469886464, 1596601563489, 976001733184, 33344131402059
Offset: 1

Author

Charles L. Hohn, Jun 16 2025

Keywords

Comments

For n >= 4, {a(n) mod 105} = {9, 79}.

Examples

			a(1) = 1: |{1}| = 1: 1 mod 2 = 1^2 mod 2, terminates at 1 mod 3 (not distinct: repeats 1 mod 2).
a(2) = 3: |{1, 0}| = 2: 3 mod 2 = 1^2 mod 2, 3 mod 3 = 0^2 mod 3, terminates at 3 mod 5 (nonsquare).
a(3) = 4: |{0, 1, 4}| = 3.
a(4) = 184: |{0, 1, 4, 2}| = 4 (2 = 3^2 mod 7).
a(5) = 9: |{1, 0, 4, 2, 9}| = 5.
a(6) = 1479: |{1, 0, 4, 2, 5, 10}| = 6.
		

Crossrefs

Cf. A377212 (nondistinct squares), A385051 (distinct nonsquares), A279074 (distinct moduli).

Programs

  • PARI
    a(n)={my(v=List); for(k=1, oo, my(m=Map); for(i=1, oo, my(p=prime(i), kp=k%p); if(i>#v, listput(v, Map); for(j=0, (p-p%2)/2, mapput(v[i], j^2%p, 1))); if(mapisdefined(v[i], kp) && !mapisdefined(m, kp), mapput(m, kp, 1); next); if(i-1==n, return(k)); break))}