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.

A047521 Numbers that are congruent to {0, 7} mod 8.

Original entry on oeis.org

0, 7, 8, 15, 16, 23, 24, 31, 32, 39, 40, 47, 48, 55, 56, 63, 64, 71, 72, 79, 80, 87, 88, 95, 96, 103, 104, 111, 112, 119, 120, 127, 128, 135, 136, 143, 144, 151, 152, 159, 160, 167, 168, 175, 176, 183, 184, 191, 192, 199, 200, 207, 208, 215, 216, 223, 224, 231, 232
Offset: 1

Views

Author

Keywords

Comments

Numbers such that the n-th triangular number is divisible by 4. - Charles R Greathouse IV, Apr 07 2011
Except for 0, numbers whose binary reflected Gray code (A014550) ends with 00. - Amiram Eldar, May 17 2021

Crossrefs

Union of A008590 and A004771.

Programs

  • Mathematica
    {#,#+7}&/@(8*Range[0,30])//Flatten (* or *) LinearRecurrence[{1,1,-1},{0,7,8},60] (* Harvey P. Dale, Oct 30 2016 *)
  • PARI
    a(n) = 4*n - 5/2 + 3*(-1)^n/2; \\ David Lovler, Jul 25 2022
  • R
    kmax <- 10 # by choice
    a <- c(0,7)
    for(k in 3:kmax) a <- c(a, a + 2^k)
    a
    # Yosu Yurramendi, Jan 18 2022
    

Formula

a(n) = 8*n - a(n-1) - 9 (with a(1)=0). - Vincenzo Librandi, Aug 06 2010
From R. J. Mathar, Oct 08 2011: (Start)
a(n) = 3*(-1)^n/2 - 5/2 + 4*n.
G.f.: x^2*(7+x) / ( (1+x)*(x-1)^2 ). (End)
a(n+1) = Sum_{k>=0} A030308(n,k)*b(k) with b(0)=7 and b(k)=2^(k+2) for k > 0. - Philippe Deléham, Oct 17 2011
Sum_{n>=2} (-1)^n/a(n) = log(2)/2 + sqrt(2)*log(sqrt(2)+1)/8 - (sqrt(2)+1)*Pi/16. - Amiram Eldar, Dec 18 2021
E.g.f.: 1 + ((8*x -5)*exp(x) + 3*exp(-x))/2. David Lovler, Aug 22 2022

Extensions

More terms from Vincenzo Librandi, Aug 06 2010