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.

A130877 Numbers that are congruent to {0, 5} mod 9.

Original entry on oeis.org

0, 5, 9, 14, 18, 23, 27, 32, 36, 41, 45, 50, 54, 59, 63, 68, 72, 77, 81, 86, 90, 95, 99, 104, 108, 113, 117, 122, 126, 131, 135, 140, 144, 149, 153, 158, 162, 167, 171, 176, 180, 185, 189, 194, 198, 203, 207, 212, 216, 221, 225, 230, 234, 239, 243, 248, 252, 257
Offset: 1

Views

Author

Keywords

Comments

Numbers m such that m = digitsum(k*(m+k)) for some k>=0.
The first differences are 2-periodic: 5, 4, 5, 4, etc. The minimum numbers k associated to the first elements of the sequence are (m,k): (0,0), (5,2), (9,3), (14,5), (18,15), (23,44), (27,42), (32,119), etc.

Crossrefs

Programs

  • Maple
    op(select(n->n mod 9=0 or n mod 9=5,[$0..257])); # Paolo P. Lava, Jul 12 2018
    # second Maple program:
    a:= n-> ceil(9*(n-1)/2):
    seq(a(n), n=1..58);  # Alois P. Heinz, Apr 12 2025
  • Mathematica
    Table[5n-5-Floor[(n-1)/2], {n,100}] (* Wesley Ivan Hurt, Oct 25 2013 *)
    Select[Range[0,300],MemberQ[{0,5},Mod[#,9]]&] (* or *) LinearRecurrence[ {1,1,-1},{0,5,9},60] (* Harvey P. Dale, Aug 04 2019 *)
  • PARI
    forstep(n=0,200,[5,4],print1(n", ")) \\ Charles R Greathouse IV, Oct 17 2011

Formula

a(n) = a(n-2) + 9 for n >= 3.
a(n) = 9/2*(n+1) - 4 + Sum{j=0..n} (-1)^j/2.
O.g.f.: x^2(5+4x)/((1+x)(1-x)^2). a(n) = 9(n-1)/2+(1+(-1)^n)/4. - R. J. Mathar, Jun 13 2008
a(n+1) = Sum_{k>=0} A030308(n,k)*A116453(k+1). - Philippe Deléham, Oct 17 2011
a(n) = 5n - 5 - floor((n-1)/2). - Wesley Ivan Hurt, Oct 25 2013
a(n) = ceiling(9*(n-1)/2). - Alois P. Heinz, Apr 12 2025