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.

A047264 Numbers that are congruent to 0 or 5 mod 6.

Original entry on oeis.org

0, 5, 6, 11, 12, 17, 18, 23, 24, 29, 30, 35, 36, 41, 42, 47, 48, 53, 54, 59, 60, 65, 66, 71, 72, 77, 78, 83, 84, 89, 90, 95, 96, 101, 102, 107, 108, 113, 114, 119, 120, 125, 126, 131, 132, 137, 138, 143, 144, 149, 150, 155, 156, 161, 162, 167, 168, 173, 174
Offset: 1

Views

Author

Keywords

Comments

Values of n for which Sum_{k=1..n} k*Fibonacci(k) is even (n > 0). Example: 5 is in the sequence because Sum_{k=1..5} k*Fibonacci(k) = 1*1 + 2*1 + 3*2 + 4*3 + 5*5 = 46. - Emeric Deutsch, Mar 28 2005
For a(n) is the n-th Tower of Hanoi move, the smallest disc (#1) is on peg A. If n == (1,2) mod 6, the disc is on peg C; and if n == (3,4) mod 6, the disc is on peg B. Disc #1 rotates C,B,A,C,B,A,C,B,A,... All discs start at "0" on peg A. Disc #1 is on peg A again for moves (5,6), (11,12), (17,18), ... - Gary W. Adamson, Jun 23 2012

Examples

			From _Vincenzo Librandi_, Aug 05 2010: (Start)
a(2) = 6*2 - 0 - 7 = 5;
a(3) = 6*3 - 5 - 7 = 6;
a(4) = 6*4 - 6 - 7 = 11. (End)
		

Crossrefs

Complement of A047227.

Programs

  • Maple
    c:=proc(n) if n mod 6 = 0 or n mod 6 = 5 then n else fi end: seq(c(n),n=0..149); # Emeric Deutsch, Mar 28 2005
  • Mathematica
    Select[Range[0, 149], MemberQ[{0, 5}, Mod[#, 6]] &] (* or *)
    Fold[Append[#1, 6 #2 - Last@ #1 - 7] &, {0}, Range[2, 50]] (* or *)
    Rest@ CoefficientList[Series[x^2*(5 + x)/((1 + x) (x - 1)^2), {x, 0, 50}], x] (* Michael De Vlieger, Jan 12 2018 *)
  • PARI
    forstep(n=0,200,[5,1],print1(n", ")) \\ Charles R Greathouse IV, Oct 17 2011
    
  • PARI
    a(n) = 3*n - 2 + (-1)^n \\ David Lovler, Aug 04 2022

Formula

a(n) = 3*n + (-1)^n - 2.
a(n) = 6*n - a(n-1) - 7 (with a(1)=0). - Vincenzo Librandi, Aug 05 2010
G.f.: x^2*(5+x) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
Let b(1)=0, b(2)=1 and b(k+2) = b(k+1) - b(k) + k^2; then a(n) is the sequence of integers such that b(a(n)) is a square = (a(n) + 1)^2. - Benoit Cloitre, Sep 04 2002
a(n+1) = Sum_{k>=0} A030308(n,k)*b(k) with b(0)=5 and b(k)=A007283(k) for k > 0. - Philippe Deléham, Oct 17 2011
Sum_{n>=2} (-1)^n/a(n) = log(2)/3 + log(3)/4 - sqrt(3)*Pi/12. - Amiram Eldar, Dec 13 2021
E.g.f.: 1 + (3*x - 2)*exp(x) + exp(-x). - David Lovler, Aug 08 2022