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.

Showing 1-10 of 13 results. Next

A211000 Coordinates (x,y) of the endpoint of a structure (or curve) formed by Q-toothpicks in which the inflection points are the prime numbers A000040.

Original entry on oeis.org

0, 0, 1, 1, 2, 0, 3, -1, 4, -2, 3, -3, 2, -4, 3, -5, 4, -6, 3, -7, 2, -6, 3, -5, 4, -4, 3, -3, 2, -2, 3, -1, 4, -2, 3, -3, 2, -4, 3, -5, 4, -6, 3, -7, 2, -6, 3, -5, 4, -4, 3, -3, 2, -4, 3, -5, 4, -4, 3, -3, 2, -2, 3, -1, 4, 0, 3, 1, 2, 0, 3, -1, 4, 0
Offset: 0

Views

Author

Omar E. Pol, Mar 30 2012

Keywords

Comments

On the infinite square grid the structure looks like a column of tangent circles of radius 1. The structure arises from the prime numbers A000040. The behavior seems to be as modular arithmetic but in a growing structure. The values on the axis "x" are easy to predict (see A211010). On the other hand the values on the axis "y" do not seem to be predictable (see A211011). This is a member of the family of the structures or curves mentioned in A210838. The odd numbers > 1 are located on the main axis of the structure. Note that here the Q-toothpicks can be superposed. For the definition of Q-toothpicks see A187210. A211021 gives the number of stage where a new circle appears in the structure. For the number of circles after the n-th stage see A211020. For the location of the centers of the circles see A211022. For the sums of the visible nodes after the n-th stage see A211024.

Examples

			We start at stage 0 with no Q-toothpicks.
At stage 1 we place a Q-toothpick centered at (1,0) with its endpoints at (0,0) and (1,1).
At stage 2 we place a Q-toothpick centered at (1,0) with its endpoints at (1,1) and (2,0). Since 2 is a prime number we have that the end of the curve is also an inflection point.
At stage 3 we place a Q-toothpick centered at (3,0) with its endpoints at (2,0) and (3,-1). Since 3 is a prime number we have that the end of the curve is also an inflection point.
At stage 4 we place a Q-toothpick centered at (3,-2) with its endpoints at (3,-1) and (4,-2).
-------------------------------------
.                    The end as
.          Pair      inflection
n        (x    y)      point
-------------------------------
0         0,   0,        -
1         1,   1,        -
2         2,   0,       Yes
3         3,  -1,       Yes
4         4,  -2,        -
5         3,  -3,       Yes
6         2,  -4,        -
7         3,  -5,       Yes
8         4,  -6,        -
9         3,  -7,        -
10        2,  -6,        -
11        3,  -5,       Yes
...
Illustration of the nodes of the structure:
-----------------------------------------------------
After 9 stages    After 10 stages    After 11 stages
-----------------------------------------------------
.
.    1                 1                  1
.  0   2             0   2              0   2
.        3                 3                  3
.          4                 4                  4
.        5                 5                  5
.      6                 6                  6
.        7                 7                 11
.          8            10   8             10   8
.        9                 9                  9
.
		

Crossrefs

Programs

  • Mathematica
    A211000[nmax_]:=Module[{walk={{0,0}},angle=3/4Pi,turn=Pi/2},Do[If[!PrimeQ[n],If[n>5&&PrimeQ[n-1],turn*=-1];angle-=turn];AppendTo[walk,AngleVector[Last[walk],{Sqrt[2],angle}]],{n,0,nmax-1}];walk];
    A211000[100] (* Generates 101 coordinate pairs *) (* Paolo Xausa, Aug 23 2022 *)
  • PARI
    A211000(nmax) = my(walk=vector(nmax+1), turn=1, p1, p2); walk[1]=[0,0];if(nmax==0,return(walk));walk[2]=[1,1];for(n=1, nmax-1, p1=walk[n];p2=walk[n+1];if(isprime(n),walk[n+2]=[2*p2[1]-p1[1],2*p2[2]-p1[2]],if(n>5 && isprime(n-1), turn*=-1);walk[n+2]=[p2[1]-turn*(p1[2]-p2[2]),p2[2]+turn*(p1[1]-p2[1])]));walk;
    A211000(100) \\ Generates 101 coordinate pairs - Paolo Xausa, Sep 22 2022
    
  • Python
    from sympy import isprime
    def A211000(nmax):
        walk, turn = [(0,0),(1,1)], 1
        for n in range(1,nmax):
            p1, p2 = walk[-2], walk[-1]
            if isprime(n): # Go straight
                walk.append((2*p2[0]-p1[0],2*p2[1]-p1[1]))
            else:          # Turn
                if n>5 and isprime(n-1): turn *= -1
                walk.append((p2[0]-turn*(p1[1]-p2[1]),p2[1]+turn*(p1[0]-p2[0])))
        return walk[:nmax+1]
    print(A211000(100)) # Generates 101 coordinate pairs - Paolo Xausa, Sep 22 2022

A211011 Value on the axis "y" of the endpoint of the structure (or curve) of A211000 at n-th stage.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Mar 30 2012

Keywords

Comments

For n >= 13 the structure of A211000 looks like essentially a column of tangent circles of radius 1. The structure arises from the prime numbers A000040. The behavior seems to be as modular arithmetic but in a growing structure. Note that all odd numbers > 1 are located on the main axis of the structure. For the number of circles after n-th stage see A211020. For the values on the axis "x" see A211010. For the values for the n-th prime see A211023.

Examples

			Consider the illustration of the structure of A211000:
------------------------------------------------------
.           After           After            After
.  y      9 stages        10 stages        11 stages
------------------------------------------------------
.  2
.  1        1               1                1
.  0      0   2           0   2            0   2
. -1            3               3                3
. -2              4               4                4
. -3            5               5                5
. -4          6               6                6
. -5            7               7               11
. -6              8          10   8           10   8
. -7            9               9                9
. -8
We can see that a(7) = a(11) = -5.
		

Crossrefs

Programs

  • Mathematica
    A211011[nmax_]:=Module[{ep={0,0},angle=3/4Pi,turn=Pi/2},Join[{0},Table[If[!PrimeQ[n],If[n>5&&PrimeQ[n-1],turn*=-1];angle-=turn];Last[ep=AngleVector[ep,{Sqrt[2],angle}]],{n,0,nmax-1}]]];
    A211011[100] (* Paolo Xausa, Jan 14 2023 *)

Formula

abs(a(n)-a(n+1)) = 1.

A211010 Value on the axis "x" of the endpoint of the structure of A211000 at n-th stage.

Original entry on oeis.org

0, 1, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3
Offset: 0

Views

Author

Omar E. Pol, Mar 30 2012

Keywords

Comments

For the values on the axis "y" see A211011.
Also [0, 1] together with the absolute values of A131731.

Crossrefs

Bisection of A211000.
Cf. A211011 (the y's in A211000).

Programs

Formula

From Colin Barker, Sep 15 2013: (Start)
a(n) = (6+(-i)^n+i^n)/2 where n > 1, i=sqrt(-1).
a(n) = a(n-1) - a(n-2) + a(n-3) for n > 4.
G.f.: -x*(x+1)*(2*x^2+1) / ((x-1)*(x^2+1)). (End)

A211003 Primes congruent to 3 in the structure (or curve) of A211000.

Original entry on oeis.org

3, 31, 43, 47, 151, 179, 251, 347, 359, 367, 6571, 6599, 6607, 6619, 6659, 6679
Offset: 1

Views

Author

Omar E. Pol, Mar 30 2012

Keywords

Comments

The behavior seems to be as modular arithmetic but in a growing structure. For n >= 13 the structure is essentially a column of tangent circles of radius 1.

Crossrefs

Primes in A211002.

A211001 Numbers congruent to 2 in the structure of A211000.

Original entry on oeis.org

2, 34, 42, 50, 150, 242, 246, 250, 354, 358, 370, 390, 394, 402, 406, 6570, 6602, 6606, 6622, 6626, 6630, 6634, 6654, 6658, 6682, 6686
Offset: 1

Views

Author

Omar E. Pol, Mar 30 2012

Keywords

Comments

The behavior seems to be as modular arithmetic but in a growing structure. The structure of A211000 looks like essentially a column of tangent circles of radius 1. The structure arises from the prime numbers A000040. For the number of circles at n-th stage see A211020.

Crossrefs

A211023 Value on the axis "y" of the endpoint of the structure of A211000 if the index is prime.

Original entry on oeis.org

0, -1, -3, -5, -5, -3, -3, -5, -5, -3, -1, 1, 1, -1, -1, 1, 3, 5, 7, 7, 5, 3, 3, 5, 5, 5, 7, 7, 5, 5, 7, 7, 5, 3, 1, -1, -3, -5, -5, -3, -1, 1, 3, 5, 5, 3, 3, 3, 3, 5, 5, 3, 1, -1, -3, -5, -7, -9, -11, -11, -9, -7, -5, -5, -7, -7, -5, -3, -1, 1, 1, -1, -1, 1, 3
Offset: 1

Views

Author

Omar E. Pol, Mar 31 2012

Keywords

Comments

a(n) is also the value on the axis "y" of the n-th inflection point in the structure of A211000.
The behavior seems to be as modular arithmetic but in a growing structure. The structure of A211000 looks like essentially a column of tangent circles of radius 1. The structure of A211000 arises from the prime numbers A000040.

Crossrefs

Programs

  • Mathematica
    A211023[upto_]:=Module[{ep={0, 0}, angle=3/4Pi, turn=Pi/2}, Table[If[!PrimeQ[n], If[n>5&&PrimeQ[n-1], turn*=-1]; angle-=turn]; ep=AngleVector[ep, {Sqrt[2], angle}];If[PrimeQ[n+1], Last[ep], Nothing], {n, 0,upto-1}]];
    A211023[500] (* Paolo Xausa, Jan 14 2023 *)

Formula

a(n) = A211011(A000040(n)).

A211021 Numbers n such that a new circle appears in the structure of A211000.

Original entry on oeis.org

11, 13, 15, 34, 41, 65, 71, 75, 275, 281, 285, 437, 443, 561, 567, 575, 581, 591, 597, 605, 611, 617, 647, 663, 957, 971, 1025, 1037, 1043, 1055, 1067, 1073, 1091, 1113, 1153, 1165, 1711, 2243, 3377, 3467, 5809, 7937, 7955, 8021, 8043, 8057, 8063
Offset: 1

Views

Author

Omar E. Pol, Mar 31 2012

Keywords

Comments

Also where the positive records occur in A211020.
The behavior seems to be as modular arithmetic but in a growing structure. The structure of A211000 looks like essentially a column of tangent circles of radius 1. The structure arises from the prime numbers A000040.

Crossrefs

Programs

  • Mathematica
    A211020[nmax_]:=Module[{ep={{0, 0}}, angle=3/4Pi, turn=Pi/2, cells}, Join[{0}, Table[If[!PrimeQ[n], If[n>5&&PrimeQ[n-1], turn*=-1]; angle-=turn]; AppendTo[ep, AngleVector[Last[ep], {Sqrt[2], angle}]]; cells=FindCycle[Graph[MapApply[UndirectedEdge, Partition[ep, 2, 1]]], {4}, All]; CountDistinct[Map[Sort, Map[First, cells, {2}]]], {n, 0, nmax-1}]]];
    Flatten[Position[Differences[A211020[1000]],1]] (* Paolo Xausa, Jan 16 2023 *)

A211024 Sum of all visible nodes in the structure of A211000 at n-th stage.

Original entry on oeis.org

0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 59, 71, 79, 93, 105, 117, 121, 133, 141, 153, 165, 177, 181, 193, 201, 209, 213, 217, 221, 237, 253, 285, 318, 350, 354, 358, 362, 400, 439, 479, 483, 491, 499, 527, 543, 559, 563, 575, 583, 591, 595, 599, 603
Offset: 0

Views

Author

Omar E. Pol, Apr 14 2012

Keywords

Comments

First differs from A000217 at a(11). For n >= 13 the Q-toothpick structure of A211000 looks like essentially a column of tangent circles of radius 1. The structure arises from the prime numbers A000040. The behavior seems to be as modular arithmetic but in a growing structure.

Examples

			Consider the illustration of the nodes in structure of A211000:
-----------------------------------------------------
After 9 stages    After 10 stages    After 11 stages
-----------------------------------------------------
.
.    1                 1                  1
.  0   2             0   2              0   2
.        3                 3                  3
.          4                 4                  4
.        5                 5                  5
.      6                 6                  6
.        7                 7                 11
.          8            10   8             10   8
.        9                 9                  9
.
----------------------------------------------------
We can see that:
a(9)  = 0+1+2+3+4+5+6+7+8+9 = a(8)+9 = 45
a(10) = 0+1+2+3+4+5+6+7+8+9+10 = a(9)+10 = 55
a(11) = 0+1+2+3+4+5+6+8+9+10+11 = a(10)-7+11 = 59
		

Crossrefs

Programs

  • Mathematica
    A211024[nmax_]:=Module[{ep={0,0},node=Association[],angle=3/4Pi,turn=Pi/2},Join[{0},Table[If[!PrimeQ[n],If[n>5&&PrimeQ[n-1],turn*=-1];angle-=turn];ep=AngleVector[ep,{Sqrt[2],angle}];node[ep]=n+1;Total[node],{n,0,nmax-1}]]];
    A211024[100] (* Paolo Xausa, Jan 16 2023 *)

A355478 The honeybee prime walk: a(n) is the number of closed honeycomb cells after the n-th step of the walk described in the comments.

Original entry on oeis.org

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, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9
Offset: 0

Views

Author

Paolo Xausa, Jul 18 2022

Keywords

Comments

At step 0, the honeybee is at the origin. No honeycomb cell wall is yet built.
At step 1, the honeybee walks one unit eastward, building the first cell wall.
At step n, the honeybee turns 60 degrees clockwise or counterclockwise (depending on whether n is prime or not, respectively), then walks one unit in the new direction, building the next cell wall (which may coincide with an existing wall).
a(n) is the number of distinct, "unit" honeycomb cells (six sides of unit length) built after the n-th step.
Does this walk generate a full hexagonal tiling of the plane?

Examples

			In the following diagrams the walk is shown at the end of the n-th step, together with the position of the bee (*).
.
n     0      1      8        28               60
a(n)  0      0      0         1                5
                                         __
                                      __/ 5\*_
      *      __*   __    __          / 4\__/  \__
                     \     \__       \__/ 3\__   \__
                     /     /  \__       \__/ 2\__/  \__
                     \     \*_   \__       \__/  \__   \__
                     /     / 1\     \            / 1\     \
                     \     \__/   __/            \__/   __/
                     /     /   __/               /   __/
                     \*    \__/                  \__/
.
		

Crossrefs

Programs

  • Mathematica
    A355478[nmax_]:=Module[{a={0}, walk={{0, 0}}, angle=0, cells}, Do[AppendTo[walk, AngleVector[Last[walk], angle+=If[PrimeQ[n], -1, 1]Pi/3]]; cells=FindCycle[Graph[MapApply[UndirectedEdge, Partition[walk, 2, 1]]], {6}, All]; AppendTo[a, CountDistinct[Map[Sort, Map[First, cells, {2}]]]], {n, nmax}]; a];
    A355478[100] (* Paolo Xausa, Jan 04 2023 *)

A211002 Numbers congruent to 3 in the structure (or curve) of A211000.

Original entry on oeis.org

3, 15, 31, 35, 43, 47, 51, 151, 155, 175, 179, 243, 247, 251, 255, 339, 343, 347, 355, 359, 363, 367, 371, 391, 395, 403, 407, 6571, 6575, 6583, 6587, 6591, 6595, 6599, 6603, 6607, 6611, 6615, 6619, 6623, 6627, 6631, 6635, 6655, 6659, 6675, 6679, 6683, 6687
Offset: 1

Views

Author

Omar E. Pol, Mar 30 2012

Keywords

Comments

The behavior seems to be as modular arithmetic but in a growing structure. For n >= 13 the structure is essentially a column of tangent circles of radius 1.

Crossrefs

Showing 1-10 of 13 results. Next