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.

A278814 a(n) = ceiling(sqrt(3n+1)).

Original entry on oeis.org

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

Views

Author

Mohammad K. Azarian, Nov 28 2016

Keywords

Crossrefs

Programs

  • Derive
    PROG(y := [], n := 100, LOOP(IF(n = -1, RETURN y), y := ADJOIN(CEILING(SQRT(1 + 3·n)), y), n := n - 1))
    
  • Maple
    seq(ceil(sqrt(3*k+1)), k=0..100); # Robert Israel, Nov 28 2016
  • Mathematica
    Table[Ceiling[Sqrt[3n+1]],{n,0,100}]
  • PARI
    a(n)=sqrtint(3*n)+1 \\ Charles R Greathouse IV, Nov 29 2016
    
  • Python
    from math import isqrt
    def A278814(n): return 1+isqrt(3*n) # Chai Wah Wu, Jul 28 2022

Formula

a(n) = ceiling(sqrt(3n+1)).
From Robert Israel, Nov 28 2016: (Start)
G.f.: (1-x)^(-1)*Sum_{k>=0} (x^(3*k^2)+x^(3*k^2+2*k+1)+x^(3*k^2+4*k+2)).
a(n+1) = a(n)+1 if n is in A032765, otherwise a(n+1) = a(n). (End)
Sum_{n>=0} (-1)^n/a(n) = log(2) (A002162). - Amiram Eldar, Jun 18 2025