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: Stuart E Anderson

Stuart E Anderson's wiki page.

Stuart E Anderson has authored 25 sequences. Here are the ten most recent ones:

A377881 Number of ordered pairs of real n X n (0,1)-matrices that satisfy the equation A + B = A * B.

Original entry on oeis.org

1, 1, 2, 72, 3760, 210042
Offset: 0

Author

Stuart E Anderson, Nov 10 2024

Keywords

Comments

Matrix multiplication of A and B is commutative here.
If A + B = A * B then (A - I)*(B - I) = I, where I is the identity matrix. For integer matrices, the determinant of (A-I) must be +-1 and its inverse gives B-I. - Andrew Howroyd, Nov 12 2024

Examples

			One of the 72 solutions in 3x3 (1,0) matrices:
  A = {{0,0,0},{0,1,1},{1,1,1}},
  B = {{0,0,0},{1,1,1},{0,1,1}}
  A + B = {{0,0,0},{1,2,2},{1,2,2}}
  A * B = {{0,0,0},{1,2,2},{1,2,2}}
		

Crossrefs

Cf. A060757.

Programs

  • PARI
    \\ See comments. Uses Gray code to generate A-I (called A here).
    a(n)= { my(Id=matid(n), A=-Id); sum(f=0, 2^(n^2)-1, if(f, my(t=valuation(f,2), i=t\n+1, j=t%n+1); A[i,j]=if(i==j,-1,1)-A[i,j]); if(abs(matdet(A))==1, my(B=A^(-1)+Id); vecmin(B)>=0 && vecmax(B)<=1 && denominator(B)==1)) } \\ Andrew Howroyd, Nov 12 2024

Extensions

a(4) corrected and a(5) from Andrew Howroyd, Nov 12 2024

A367033 Von Neumann ordinals in bracket notation encoded by binary bits: '{' -> 0, '}'-> 1.

Original entry on oeis.org

1, 3, 39, 9807, 642665631, 2760227864398567743, 50917216999682251351660181504218706559, 17326231117678921325668214077168498563134593883851671914433735718213795341567
Offset: 0

Author

Stuart E Anderson, Nov 20 2023

Keywords

Comments

If brackets are interpreted as 90-degree turns, and left bracket is turn left and go forward 1 unit, right bracket is turn right and go forward 1 unit, then a Levy C curve is drawn.

Examples

			For n=3, Von Neumann's 3-element set {0, 1, 2} is
   { {}, {{}}, {{},{{}}} }
   0 01  0011  001 00111 1 binary = a(3) = 9807
		

Crossrefs

Cf. A092124 (bit complement), A333447 (bit reversal), A308187 (individual bits).

Programs

  • Mathematica
    With[{nmax=8},Map[FromDigits[#,2]&,NestList["0"<>StringTake[#,{2,-2}]<>#<>"1"&,"01",nmax]]] (* Paolo Xausa, Nov 20 2023 *)
  • PARI
    a(n) = my(k = 1); for(m = 1, n, k = (k-1)*2^(2^m)+2*k+1); k; \\ Thomas Scheuerle, Nov 21 2023
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A367033(n): return 1-(m:=1<<(2<A367033(n-1) if n>0 else 1

Extensions

a(7) from Paolo Xausa, Nov 20 2023
Offset corrected by Kevin Ryde, Dec 24 2023

A366079 Perfect squares in A005728.

Original entry on oeis.org

1, 81, 121, 361, 1352569, 2140369, 6416089, 9186961, 30261001, 108056025, 820765201, 2331248089, 170938421809, 8189950752481, 8870860603201, 33527956250889, 136943052939289, 149526943190641, 4953581020385761, 509672946670475329, 578899033007097609, 2043000477545048329
Offset: 1

Author

Stuart E Anderson, Sep 28 2023

Keywords

Examples

			a(3) = 361 because A005728(34) = 361 and 361 is 19 squared.
		

Crossrefs

Programs

  • PARI
    f(n)=1+sum(k=1, n, eulerphi(k)); \\ A005728
    select(x->issquare(x), apply(f, [0..10^5])) \\ Michel Marcus, Sep 28 2023

Extensions

a(11)-a(12) from Michel Marcus, Sep 28 2023
a(13)-a(22) from Hugo Pfoertner, Sep 28 2023

A346112 Size of the smallest regular polygon chain for a regular polygon with n sides.

Original entry on oeis.org

6, 4, 6, 3, 6, 4, 6, 5, 6, 3, 6, 4, 6, 4, 6, 3, 6, 4
Offset: 3

Author

Stuart E Anderson, Jul 05 2021

Keywords

Comments

Each polygon in a polygon chain shares one edge with both its predecessor and successor polygon. The polygon chain forms a connected cycle.

Examples

			For n = 6, 3 hexagons can form a ring.  See the first link for this and further images.
		

Formula

Empirical observations for n >= 3:
a(n) = 3 if n == 0 (mod 6),
4 if n == 4 or 8 (mod 12),
5 if n = 10,
4 if n = 14,
6 otherwise.

A319926 Isomer counts of compound perfect squared squares.

Original entry on oeis.org

4, 7, 8, 11, 12, 14, 16
Offset: 1

Author

Stuart E Anderson, Oct 01 2018

Keywords

Comments

The isomer count of a compound perfect squared square (CPSS) is the number of ways its squared subrectangle and constituent squares can be arranged, up to symmetry of the CPSS. A squared square is perfect if none of its constituent squares are the same size. A squared square is compound if it contains a smaller squared subrectangle. Note that the squared subrectangle can be a squared square. Specific concrete examples of CPSSs with isomer counts under 100 of 4, 7, 8, 11, 12, 16, 19, 20, 23, 24, 28, 31, 32, 35, 36, 39, 40, 47, 48, 56, 60, 63, 64, 68, 72, 76, 80, 88 and 96 exist. Geometric constructions based on a suitable pair of perfect squared rectangles each with up to 4 isomers suggests additional isomer counts up to 100 of 14, 21, 22, 33, 42, 44, 66 and 99, but no actual examples are known. As the number of squares in a squared square - the order - increases new arrangements appear. It is conjectured that expected CPSS subrectangle isomer arrangements will eventually appear if the order is high enough.
The term a(6)=14 is based on a theoretical construction, not on known or existing CPSSs. These terms have been included to distinguish the sequence from others. Considering all the ways two or more subrectangles can be arranged within a CPSS it does not appear possible for a CPSS with 5, 6, 9, 10 or 13 isomers to exist but even this much has not been proved.

Examples

			a(1) = 4, because the compound perfect squares of order 24 comprise the square with side 175 and Bouwkamp code (81,56,38) (18,20) (55,16,3) (1,5,14) (4) (9) (39) (51,30) (29,31,64) (43,8) (35,2) (33) as well as three others from the other symmetries of the order-13 111 X 94 squared subrectangle. See MathWorld link for an explanation of Bouwkamp code.
		

Crossrefs

A298612 The number of concave polygon classes.

Original entry on oeis.org

0, 1, 3, 8, 14, 29, 53, 100, 180, 343, 623, 1172, 2182, 4105, 7701, 14590, 27584, 52475, 99867, 190732, 364710, 699237, 1342169, 2581412, 4971052, 9587563, 18512775, 35792550, 69273650, 134219777, 260301157, 505294108, 981706812
Offset: 3

Author

Stuart E Anderson, Jan 23 2018

Keywords

Comments

A concave polygon has at least one concave interior corner angle, and at least three convex interior corner angles. Two concave polygon classes are equivalent if the cyclic ordering of the concave and convex interior angles of each are equal.
a(n) is also the number of combinatorial necklaces with n beads in 2 colors (black and white) with at least one white bead and no fewer than 3 black beads.

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, EulerPhi[#] 2^(n/#) &]/n - Floor[n/2] - 3, {n, 3, 35}] (* Michael De Vlieger, Jan 28 2018 *)

Formula

a(n) = A000031(n) - A004526(n) - 3, n >= 3.
a(n) = A262232(n)-1, n >= 3.

A262244 Number of concave equilateral n-gons with corner angles of m*Pi/n (0 < m < 2n), where m and n are integers.

Original entry on oeis.org

0, 0, 1, 22, 11, 1319, 25858
Offset: 3

Author

Stuart E Anderson, Sep 15 2015

Keywords

Comments

An n-gon is a polygon with n corners and n sides, each of which is a straight line segment joining two corners. A polygon P is said to be a simple polygon (or a Jordan polygon) if the only points of the plane belonging to multiple edges of P are the corners of P. Such a polygon has a well-defined interior and exterior. Simple polygons are topologically equivalent to a disk, hence zero angles are not allowed; allowable angles are m*Pi/n (where m and n are integers and 0 < m < 2n). A simple n-gon is concave iff at least one of its internal angles is greater than Pi, or equivalently m > n for at least one of the corners. The sum of the m-numbers (called angle factors) for the n-gon has to be n*(n-2). They are partitions of n*(n-2) into n parts with largest part n < k < 2n, and as the edges of a polygon form a closed path, the sum of unit vectors defined by the angle coordinates m/Pi is zero. The reason the m-numbers sum to n*(n-2) is that the sum of the interior angles of any n-gon is Pi*(n-2), and as angles are m*Pi/n, n = Pi.
Observation: when n is prime, m is odd and m != n.

Examples

			For n = 5, the a(5) = 1 solution is (1 3 3 1 7) in m angle factors.
For n = 7, the a(7) = 11 solutions in m angle factors are as follows: (1 11 5 3 5 5 5), (1 5 3 9 1 5 11), (1 5 5 1 11 1 11), (1 5 5 5 1 9 9), (1 5 5 5 3 5 11), (1 9 1 9 3 3 9), (1 9 3 5 1 11 5), (1 9 3 5 5 3 9), (3 3 5 5 3 3 13), (3 3 9 3 5 3 9), (3 5 5 5 5 3 9).
		

Crossrefs

Cf. A262181 (convex equilateral polygons).

Extensions

a(9) corrected by Stuart E Anderson, Aug 04 2024

A262181 a(n) = total number of convex equilateral n-gons with corner angles of m*Pi/n (0 < m <= n).

Original entry on oeis.org

1, 2, 1, 11, 1, 42, 64, 202, 1, 1557, 1, 5539, 32298, 30666, 1, 405200, 1, 1035642
Offset: 3

Author

Stuart E Anderson, Sep 14 2015

Keywords

Comments

An n-gon is a polygon with n corners and n sides, each of which is a straight line segment joining two corners. An n-gon or polygon P is said to be a simple polygon (or a Jordan polygon) if the only points of the plane belonging to two polygon edges of P are the polygon vertices of P. Such a polygon has a well-defined interior and exterior. Simple polygons are topologically equivalent to a disk, hence zero angles are not allowed; allowable angles are m*Pi/n (where m and n are integers and 0 < m <= n). An n-gon is convex if it contains all the diagonal segments connecting any pair of its points. A convex polygon is sometimes strictly defined as a polygon with all its interior angles less than Pi. We use the less strict definition where every internal or interior angle is less than or equal to Pi, that is, straight angles are permitted.
Conjecture: There is only one convex equilateral n-gon for prime n.

Examples

			For n = 3 there is one convex n-gon, the equilateral triangle, with m angle factors (3 3 3); so a(3) = 1.
For n = 4 there are two convex n-gons, the square and a rhombus, with respective m angle factors (2 2 2 2) and (1 3 1 3); so a(4) = 2.
For n = 5, there is the regular pentagon, m factors (3 3 3 3 3); so a(5) = 1.
For n = 6 there are 11 convex n-gons; here are the m factors:(1 5 6 1 5 6), (1 6 5 1 6 5), (2 4 6 2 4 6), (2 5 5 2 5 5), (2 6 2 6 2 6), (2 6 4 2 6 4), (3 3 6 3 3 6), (3 4 5 3 4 5), (3 5 3 5 3 5), (3 5 4 3 5 4), (4 4 4 4 4 4); so a(6) = 11.
		

Crossrefs

A262244 for concave polygons with corner angles of m*Pi/n (0 < m < 2n), where m and n are integers.

Formula

a(n) = A292355(n) for n prime or twice prime. - Andrew Howroyd, Sep 14 2017
a(n) = -(1+(-1)^n)/2 + (1/(2*n))*(A321415(n) - binomial(3*n-1, n) + Sum_{d|n} phi(n/d) * binomial(3*d-1, d)). - Andrew Howroyd, Nov 09 2018

Extensions

a(10) corrected and a(12)-a(17) from Andrew Howroyd, Sep 14 2017
a(18)-a(20) from Andrew Howroyd, Nov 09 2018

A248505 Alternating the subtraction and multiplication of two previous terms, starting with 3, 2.

Original entry on oeis.org

3, 2, -1, -2, -1, 2, 3, 6, 3, 18, 15, 270, 255, 68850, 68595, 4722765750, 4722697155, 22304192371256441250, 22304192366533744095, 497476997228678085728479670747901918750, 497476997228678085706175478381368174655
Offset: 1

Author

Stuart E Anderson, Oct 07 2014

Keywords

Examples

			For n = 3, a(n) = a(2) - a(1) = 2 - 3  = -1.
		

Crossrefs

Cf. A248479.

Programs

  • Mathematica
    a248505[n_Integer] := Module[{f},
    f[1] = 3; f[2] = 2; f[k_] := If[EvenQ[k], f[k - 1] * f[k - 2], f[k - 1] - f[k - 2]]; f /@ Range[n]]; a248505[21] (* Michael De Vlieger, Nov 17 2014 *)
  • PARI
    v=[3,2];for(n=1,20,if(n%2,v=concat(v,v[#v]-v[#v-1]));if(!(n%2),v=concat(v,v[#v]*v[#v-1])));v \\ Derek Orr, Oct 29 2014

Formula

For n odd a(n) = a(n-1) - a(n-2),
For n even a(n) = a(n-1) * a(n-2),
a(1) = 3, a(2) = 2.

Extensions

More terms from Colin Barker, Oct 07 2014

A248512 Sequence based on repeating in turn the subtract, add and multiply operations on the previous 2 terms, starting with 0, 1.

Original entry on oeis.org

0, 1, 1, 2, 2, 0, 2, 0, -2, -2, 4, 6, 10, 60, 50, 110, 5500, 5390, 10890, 58697100, 58686210, 117383310, 6888781581155100, 6888781463771790, 13777563044926890, 94910620919839581404684194433100, 94910620919839567627121149506210
Offset: 1

Author

Stuart E Anderson, Oct 07 2014

Keywords

Comments

After a(16) the sequence entries end 100, 90, 90, 100, 10, 10, 100, 90, 90, ... . - Jon Perry, Oct 29 2014

Programs

  • Mathematica
    nxt[{n_,a_,b_}]:={n+1,b,Which[Mod[n+1,3]==0,b-a,Mod[n+1,3] == 1,a+b,True,a*b]}; NestList[nxt,{2,0,1},30][[All,2]] (* Harvey P. Dale, Sep 20 2021 *)

Formula

For n > 2,
If n mod 3 = 0, a(n) = a(n-1) - a(n-2),
If n mod 3 = 1, a(n) = a(n-1) + a(n-2),
If n mod 3 = 2, a(n) = a(n-1) x a(n-2),
a(1) = 0, a(2) = 1.

Extensions

More terms from Colin Barker, Oct 08 2014
Edited: Name changed and keyword easy added - Wolfdieter Lang, Oct 29 2014
Changed name. - Jon Perry, Oct 29 2014