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: Alex Abercrombie

Alex Abercrombie's wiki page.

Alex Abercrombie has authored 4 sequences.

A178976 Number of collinear triples in graph of preceding terms.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 2, 4, 4, 4, 5, 5, 5, 6, 8, 11, 11, 12, 12, 12, 14, 14, 14, 16, 18, 20, 22, 24, 26, 29, 29, 29, 30, 31, 32, 35, 35, 35, 37, 38, 40, 43, 43, 45, 46, 50, 51, 52, 55, 55, 57, 57, 59, 61, 63, 65, 69, 69, 74, 74, 74, 76, 77, 78, 81, 82, 82, 86, 89, 91, 93, 96, 99, 100, 104, 105, 106, 107, 108, 112, 113, 115, 115, 117, 121, 122, 122, 124, 124, 125, 126, 131, 133, 134, 137, 139, 141, 146, 148, 150
Offset: 0

Author

Alex Abercrombie, Jan 06 2011

Keywords

Comments

a(n) is the number of 3-element subsets (i0 and a(k)-a(j)=a(j)-a(i).
The sequence appears to grow faster than n but slower than n^(1+c) for any positive c.

Examples

			For n=7, the triples (0,1,2),(0,3,6),(2,4,6),(3,4,5) satisfy the stated conditions, so a(7)=4
		

A179510 Number of equally-spaced triples (x,y,z) of preceding terms with x+y=z.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 3, 4, 4, 5, 5, 6, 7, 7, 8, 9, 9, 10, 10, 11, 12, 13, 13, 14, 15, 16, 17, 17, 18, 18, 19, 19, 20, 21, 22, 22, 23, 23, 24, 24, 25, 26, 26, 27, 28, 29, 30, 31, 31, 32, 32, 33, 34, 34, 35, 36, 36, 37, 38, 39, 39, 40, 41, 41, 42, 42, 43, 43, 44, 44, 45, 45, 46, 47, 47, 48, 49, 49, 50, 50, 51, 52, 53, 53, 54, 55, 56, 56, 57, 57, 58, 59, 60, 60, 61, 62, 62, 63, 64, 64, 65
Offset: 0

Author

Alex Abercrombie, Jan 08 2011

Keywords

Comments

a(n) is the number of 3-element subsets (i,j,k) of {0,...,n-1} such that k-j=j-i>0 and a(i)+a(j)=a(k). An induction argument can show simultaneously that a(n)-a(n-1) is always 0 or 1 and that the only case where three values of a(n) are equal is a(0)=a(1)=a(2)=0. Numerical evidence suggests that a(n) is asymptotic to 2n/3.

Examples

			For n=9, just the triples (0,1,2),(2,3,4),(3,4,5),(4,5,6),(4,6,8) satisfy the stated conditions, so a(9) = 5
		

Crossrefs

A178976 has a somewhat similar definition

A135317 Let h(2*n, 1) = 2*n and h(2*n, m) = h(2*n, m-1) + 2 * d(2*n, m) for m > 1, where d(2*n, m) = (least multiple of m not less than h(2*n, m-1)) - h(2*n, m-1). Then d(2*n, m) is eventually 2-periodic as a function of m, and a(n) is defined as d(2*n, 2*m+1) for large m.

Original entry on oeis.org

0, 1, 2, 0, 1, 2, 3, 4, 0, 3, 4, 5, 1, 2, 3, 6, 0, 1, 4, 5, 6, 2, 5, 6, 7, 8, 0, 7, 8, 9, 3, 4, 5, 1, 2, 3, 6, 7, 10, 4, 7, 8, 0, 1, 2, 9, 10, 11, 5, 8, 9, 12, 6, 7, 10, 11, 12, 8, 9, 10, 0, 3, 4, 13, 1, 2, 5, 6, 11, 3, 4, 9, 14, 0, 1, 10, 11, 12, 2, 7, 8, 13, 5, 6, 9, 12, 13, 7, 10, 11, 14, 15, 16, 14
Offset: 0

Author

Alex Abercrombie, Feb 15 2008

Keywords

Comments

Sequence yielding an ordering of N*N derived from a family of recurrences.
For any integer k define h(k,1)=k and for m>1 define h(k,m)=h(k,m-1)+2*((-h(k,m-1)) mod m) where "r mod s" denotes least nonnegative residue of r modulo s [informally, h(k,m) is got by "reflecting" h(k,m-1) in the least multiple of m that is >=h(k,m-1)]. Then for fixed k>=0 there are integers c(k), b(k), m(k) such that for all m>m(k) we have h(k,2*m+1)-h(k,2*m)=2*c(k) and h(k,2*m+2)-h(k,2*m+1)=2*b(k). [In the terms of the function d defined in the Name, c(k) = d(k, 2*m+1) and b(k) = d(k, 2*m+2) for all m>m(k).]
For all n we have c(2*n+1)=c(2*n) and b(2*n+1)=1+b(2*n). Moreover b(2*n) is even for all n. The function n->(c(2*n),b(2*n)/2) is a bijection from the nonnegative integers N to N*N [as well as n->(b(n),c(n))]. It is "monotone" in the sense that n<=n' whenever c(2*n)<=c(2*n') and b(2*n)<=b(2*n').
This sequence is a(n) = c(2*n).
The results on which the definition is based are not yet proved, but they are plausible and overwhelmingly supported by numerical evidence.
For each fixed m, k->h(k,m) is a bijection Z->Z (this is easy!). However for k<0 the sequence h(k,m) does not have the pseudo-periodic property we have used in defining c(k) and b(k).
m(k) appears to be O(sqrt k).
From Andrey Zabolotskiy, Dec 28 2024: (Start)
See my Github link for the proof that the sequence is indeed well-defined.
That fact is equivalent to the quantity d(k,m) + d(k,m+1) eventually becoming constant. That constant value can be first reached when m is odd (case B) or even (case C).
On the plane (b(k), c(k)), the points from case B (resp. case C) fall in the region which is approximately the octant b(k) > c(k) (resp. c(k) > b(k)).
On the plane (x=n, y=a(n)), the graph of this sequence fills in a certain region in the plane. It's bounded from below by the line y=0 and from above, it seems, by the curve y = sqrt(Pi*x). That region, it seems, is further divided into two parts: the one below the curve y = sqrt((4/Pi)*x) contains points from case B, the one above it contains points from case C. The latter part looks more dense on the graph. (End)

Examples

			h(18,m) for m>=1 goes 18,18,18,22,28,32,38,42,48...so we can take m(18) = 2, then 2*c(18)=28-22=38-32=48-42=...=6, so a(9) = c(18) = 3 and similarly b(18) = 2.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{h = 2 n, b, c = 0, m = 1},
       While[Ceiling[h/(m+1)] != Floor[h/m],
        m++; b = Mod[-h, m]; h += 2 b;
        m++; c = Mod[-h, m]; h += 2 c];
       c];
    Table[a[n], {n, 0, 93}] (* Andrey Zabolotskiy, Apr 29 2023, Dec 25 2024 *)
  • Python
    def a(n):
        h, m, c = 2*n, 1, 0
        while (h+m)//(m+1) != h//m:
            m += 1; b = (-h) % m; h += 2*b
            m += 1; c = (-h) % m; h += 2*c
        return c
    print([a(n) for n in range(30)]) # Andrey Zabolotskiy, Dec 25 2024

Formula

It appears that a(n) = A319573(A252448(2*n+1)) [discovered by Sequence Machine], moreover, c(n) = A319573(n') and b(n) = A319572(n') with n' = A252448(n), where b and c are described above. - Andrey Zabolotskiy, Apr 28 2023

Extensions

Edited by Andrey Zabolotskiy, Apr 29 2023

A117846 Given n, define a(n) as follows: let a sequence b(k) be defined by b(k+1)=b(k)+b(k)mod k; b(1)=2n-1. (Here b(k)mod k denotes the least nonnegative residue of b(k) modulo k). Let a(n) be the common value of b(k+1)-b(k) for all large k if such exists; otherwise let a(n) be 0.

Original entry on oeis.org

97, 1, 2, 2, 316, 2, 3, 3, 3, 4, 12, 4, 4, 12, 11, 11, 316, 11, 316, 316, 6, 316, 316, 316, 316, 97, 316, 316, 13, 316, 13, 13, 13, 13, 8, 13, 13, 12, 13, 13, 13, 13, 13, 13, 14, 14, 316, 14, 316, 316, 316, 97, 9, 97, 97, 13, 10, 10, 11, 10, 14, 11, 12, 12, 97, 12, 97, 132
Offset: 1

Author

Alex Abercrombie, Mar 22 2007

Keywords

Comments

Putting b(1)=2n gives essentially the same sequence as putting b(1)=2n-1. It is a plausible conjecture or at least an interesting open problem that a(n) is never zero; that is all the sequences b(k) are arithmetic progressions from some point on. Sequence A073117 is the sequence b(k) with b(1)=1. Do the values a(n) include all positive numbers?

Examples

			n=4: b(1)=7 and the sequence b(k) continues 7,8,10,12,14...with b(k+1)-b(k)=2 for all k>3, so a(4)=2.
		

Crossrefs

Cf. A073117.