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: Nathan John Eaves

Nathan John Eaves's wiki page.

Nathan John Eaves has authored 3 sequences.

A351224 Length of record run of consecutive numbers having the same Collatz trajectory length.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 8, 9, 14, 17, 25, 27, 29, 30, 40, 41, 47, 52, 54, 60, 65, 77, 89, 96, 98, 120, 127, 130, 136, 152, 174, 176
Offset: 1

Author

Nathan John Eaves, Feb 04 2022

Keywords

Comments

It appears that this sequence is infinite.
For every record number of consecutive identical terms in A006577, the run length is a term of this sequence.
This sequence is interesting because when A006577 is graphed on a scatter plot, it is immediately obvious that there are many runs of terms having the same value.
This sequence is related to A351104 where instead it returns the run length of the records.

Examples

			a(10)=17 since the 10th record run of identical consecutive trajectory lengths has a run length of 17.
Used from A351104 by _Jon E. Schoenfield_.
      trajectory  numbers in run   run
   n    length    (1st is a(n))   length
  --  ----------  --------------  ------
   1        1        1               1
   2        9       12, 13           2
   3       18       28, 29, 30       3
   4       25       98 ...  102      5
   5      120      386 ...  391      6
   6       36      943 ...  949      7
   7       47     1494 ... 1501      8
   8       42     1680 ... 1688      9
   9       48     2987 ... 3000     14
  10       57     7083 ... 7099     17
		

Crossrefs

For first term of run see A351104.

Programs

  • Python
    import numpy as np
    def find_records(m):
        l=np.array([0]+[-1 for i in range(m-1)])
        for n in range(len(l)):
            path=[n+1]
            while path[-1]>m or l[path[-1]-1]==-1:
                if path[-1]%2==0:
                    path.append(path[-1]//2)
                else:
                    path.append(path[-1]*3+1)
            path.reverse()
            for i in range(1,len(path)):
                if path[i]<=m:
                    l[path[i]-1]=l[path[0]-1]+i
        seq=[]
        c,lsteps,record=1,0,0
        for n in range(1,len(l)):
            if l[n]==lsteps:
                c+=1
            else:
                if c>record:
                    record=c
                    seq.append(c)
                c=1
            lsteps=l[n]
        return seq
    print(", ".join([str(i) for i in find_records(1000000)]))

A351104 Numbers that begin a record-length run of consecutive numbers having the same Collatz trajectory length.

Original entry on oeis.org

1, 12, 28, 98, 386, 943, 1494, 1680, 2987, 7083, 57346, 252548, 331778, 524289, 596310, 2886352, 3247146, 3264428, 4585418, 5158596, 5772712, 13019668, 18341744, 24455681, 98041684, 136696632, 271114753, 361486064, 406672385, 481981441, 711611184, 722067240
Offset: 1

Author

Nathan John Eaves, Jan 31 2022

Keywords

Comments

It appears that this sequence is infinite.
For every record number of consecutive identical terms in A006577, the index of the first of those consecutive terms is a term of this sequence.
This sequence is interesting because when A006577 is graphed on a scatter plot, it is immediately obvious that there are many runs of terms having the same value.

Examples

			a(4)=98 since the length of the Collatz trajectory of each number from 98 through 102 is of length 25 and this is the fourth record length.
From _Jon E. Schoenfield_, Feb 01 2022: (Start)
      trajectory  numbers in run   run
   n    length    (1st is a(n))   length
  --  ----------  --------------  ------
   1        1        1               1
   2        9       12, 13           2
   3       18       28, 29, 30       3
   4       25       98 ...  102      5
   5      120      386 ...  391      6
   6       36      943 ...  949      7
   7       47     1494 ... 1501      8
   8       42     1680 ... 1688      9
   9       48     2987 ... 3000     14
  10       57     7083 ... 7099     17
(End)
		

Crossrefs

For length of run see A351224.

Programs

  • Python
    import numpy as np
    def find_records(m):
        l=np.array([0]+[-1 for i in range(m-1)])
        for n in range(len(l)):
            path=[n+1]
            while path[-1]>m or l[path[-1]-1]==-1:
                if path[-1]%2==0:
                    path.append(path[-1]//2)
                else:
                    path.append(path[-1]*3+1)
            path.reverse()
            for i in range(1, len(path)):
                if path[i]<=m:
                    l[path[i]-1]=l[path[0]-1]+i
        ciclr=[]
        c=1
        lsteps=0
        record=0
        for n in range(1, len(l)):
            if l[n]==lsteps:
                c+=1
            else:
                if c>record:
                    record=c
                    ciclr.append(n-c+1)
                c=1
            lsteps=l[n]
        return ciclr
    print(", ".join([str(i) for i in find_records(1000000)]))

A282852 37-gonal numbers: a(n) = n*(35*n-33)/2.

Original entry on oeis.org

0, 1, 37, 108, 214, 355, 531, 742, 988, 1269, 1585, 1936, 2322, 2743, 3199, 3690, 4216, 4777, 5373, 6004, 6670, 7371, 8107, 8878, 9684, 10525, 11401, 12312, 13258, 14239, 15255, 16306, 17392, 18513, 19669, 20860, 22086, 23347, 24643, 25974
Offset: 0

Author

Nathan John Eaves, Feb 23 2017

Keywords

Comments

According to the common formula for the polygonal numbers: (s-2)*n*(n-1)/2 + n (here s = 37).

Crossrefs

Programs

  • Mathematica
    Table[n(35n-33)/2, {n, 40}]
    PolygonalNumber[37,Range[0,40]] (* Requires Mathematica version 10 or later *) (* or *) LinearRecurrence[{3,-3,1},{0,1,37},40] (* Harvey P. Dale, Oct 24 2020 *)
  • PARI
    for(n=0,100,print1(n*(35*n-33)/2,", ")) \\ Derek Orr, Feb 27 2017
  • Python
    for n in range(0,51):
        print(n*(35*n-33)//2)
    

Formula

From Nikolaos Pantelidis, Feb 10 2023: (Start)
G.f.: x*(1 + 34*x)/(1 - x)^3.
E.g.f.: exp(x)*(x + 35*x^2/2). (End)