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.

A364843 Integers are repeated in runs of 1, 2, 3, ... Each new integer (following a run) is given the value of its sequence index value.

Original entry on oeis.org

1, 2, 2, 4, 4, 4, 7, 7, 7, 7, 11, 11, 11, 11, 11, 16, 16, 16, 16, 16, 16, 22, 22, 22, 22, 22, 22, 22, 29, 29, 29, 29, 29, 29, 29, 29, 37, 37, 37, 37, 37, 37, 37, 37, 37, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56
Offset: 1

Views

Author

Peter Woodward, Aug 10 2023

Keywords

Comments

Omitting repeats yields the triangular numbers plus 1 sequence A000124.

Examples

			Illustrated as a triangle begins:
   1;
   2,  2;
   4,  4,  4;
   7,  7,  7,  7;
  11, 11, 11, 11, 11;
  16, 16, 16, 16, 16, 16;
  22, 22, 22, 22, 22, 22, 22;
  ...
		

Crossrefs

Row sums give A006000(n-1).

Programs

  • Maple
    T:= (n, k)-> n*(n-1)/2+1:
    seq(seq(T(n,k), k=1..n), n=1..11);  # Alois P. Heinz, Aug 31 2023
  • PARI
    a(n) = my(t=(sqrtint(8*n-1)-1)\2); t*(t+1)/2+1 \\ Thomas Scheuerle, Aug 10 2023
    
  • Python
    from math import isqrt
    def A364843(n): return ((t:=isqrt((n<<3)-1)-1>>1)*(t+1)>>1)+1 # Chai Wah Wu, Sep 15 2023

Formula

G.f.: x*y*(1 + 2*x^4*y^2 - x*(1 + y) - 2*x^3*y*(1 + y) + x^2*(1 + y + y^2))/((1 - x)^3*(1 - x*y)^3). - Stefano Spezia, Sep 02 2023
Sum_{k=1..n} k = T(n,k) = A006528(n). - Alois P. Heinz, Sep 15 2023