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.

Showing 1-6 of 6 results.

A004773 Numbers congruent to {0, 1, 2} mod 4: a(n) = floor(4*n/3).

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 8, 9, 10, 12, 13, 14, 16, 17, 18, 20, 21, 22, 24, 25, 26, 28, 29, 30, 32, 33, 34, 36, 37, 38, 40, 41, 42, 44, 45, 46, 48, 49, 50, 52, 53, 54, 56, 57, 58, 60, 61, 62, 64, 65, 66, 68, 69, 70, 72, 73, 74, 76, 77, 78, 80, 81, 82, 84, 85, 86, 88, 89, 90
Offset: 0

Views

Author

Keywords

Comments

The sequence b(n) = floor((4/3)*(n+2)) appears as an upper bound in Fijavz and Wood.
Binary expansion does not end in 11.
From Guenther Schrack, May 04 2023: (Start)
The sequence is the interleaving of the sequences A008586, A016813, A016825, in that order.
Let S(n) = a(n) + a(n+1) + a(n+2). Then floor(S(n)/3) = A042968(n+1), round(S(n)/3) = a(n+1), ceiling(S(n)/3) = A042965(n+2). (End)

Crossrefs

Cf. A177702 (first differences), A000969 (partial sums).
Cf. A032766, this sequence, A001068, A047226, A047368, A004777.
Cf. similar sequences with formula n+i*floor(n/3) listed in A281899.

Programs

  • Magma
    [n: n in [0..100] | n mod 4 in [0..2]]; // Vincenzo Librandi, Dec 23 2010
    
  • Maple
    seq(floor(n/3)+n,n=0..68); # Gary Detlefs, Mar 20 2010
  • Mathematica
    f[n_] := Floor[4 n/3]; Array[f, 69, 0] (* Robert G. Wilson v, Dec 24 2010 *)
    fQ[n_] := Mod[n, 4] != 3; Select[ Range[0, 90], fQ] (* Robert G. Wilson v, Dec 24 2010 *)
    a[0] = 0; a[n_] := a[n] = a[n - 1] + 2 - If[ Mod[a[n - 1], 4] < 2, 1, 0]; Array[a, 69, 0] (* Robert G. Wilson v, Dec 24 2010 *)
    CoefficientList[ Series[x (1 + x + 2 x^2)/((1 - x) (1 - x^3)), {x, 0, 68}], x] (* Robert G. Wilson v, Dec 24 2010 *)
  • PARI
    a(n)=4*n\3 \\ Charles R Greathouse IV, Sep 27 2012

Formula

G.f.: x*(1+x+2*x^2)/((1-x)*(1-x^3)).
a(0) = 0, a(n+1) = a(n) + a(n) mod 4 + 0^(a(n) mod 4). - Reinhard Zumkeller, Mar 23 2003
a(n) = A004396(n) + A004523(n); complement of A004767. - Reinhard Zumkeller, Aug 29 2005
a(n) = floor(n/3) + n. - Gary Detlefs, Mar 20 2010
a(n) = (12*n-3+3*cos(2*n*Pi/3)+sqrt(3)*sin(2*n*Pi/3))/9. - Wesley Ivan Hurt, Sep 30 2017
E.g.f.: (3*exp(x)*(4*x - 1) + exp(-x/2)*(3*cos((sqrt(3)*x)/2) + sqrt(3)*sin((sqrt(3)*x)/2)))/9. - Stefano Spezia, Jun 09 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = (sqrt(2)-1)*Pi/8 + sqrt(2)*log(sqrt(2)+2)/4 + (2-sqrt(2))*log(2)/8. - Amiram Eldar, Dec 05 2021
From Guenther Schrack, May 04 2023: (Start)
a(n) = (12*n - 3 + w^(2*n)*(w + 2) - w^n*(w - 1))/9 where w = (-1 + sqrt(-3))/2.
a(n) = 2*floor(n/3) + floor((n+1)/3) + floor((n+2)/3).
a(n) = (4*n - n mod 3)/3.
a(n) = a(n-3) + 4.
a(n) = a(n-1) + a(n-3) - a(n-4).
a(n) = 4*A002264(n) + A010872(n).
a(n) = A042968(n+1) - 1.
(End)

A047217 Numbers that are congruent to {0, 1, 2} mod 5.

Original entry on oeis.org

0, 1, 2, 5, 6, 7, 10, 11, 12, 15, 16, 17, 20, 21, 22, 25, 26, 27, 30, 31, 32, 35, 36, 37, 40, 41, 42, 45, 46, 47, 50, 51, 52, 55, 56, 57, 60, 61, 62, 65, 66, 67, 70, 71, 72, 75, 76, 77, 80, 81, 82, 85, 86, 87, 90, 91, 92, 95, 96, 97, 100, 101, 102, 105, 106, 107, 110, 111
Offset: 1

Views

Author

Keywords

Comments

Also, the only numbers that are eligible to be the sum of two 4th powers (A004831). - Cino Hilliard, Nov 23 2003
Nonnegative m such that floor(2*m/5) = 2*floor(m/5). - Bruno Berselli, Dec 09 2015
The sequence lists the indices of the multiples of 5 in A007531. - Bruno Berselli, Jan 05 2018

Crossrefs

Cf. A007531, A030341, A004831 (two 4th powers).
Cf. similar sequences with formula n+i*floor(n/3) listed in A281899.

Programs

  • Magma
    I:=[0, 1, 2, 5]; [n le 4 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..70]]; // Vincenzo Librandi, Apr 25 2012
    
  • Magma
    &cat [[5*n,5*n+1,5*n+2]: n in [0..30]]; // Bruno Berselli, Dec 09 2015
  • Maple
    seq(op([5*i,5*i+1,5*i+2]),i=0..100); # Robert Israel, Sep 02 2014
  • Mathematica
    Select[Range[0,120], MemberQ[{0,1,2}, Mod[#,5]]&] (* Harvey P. Dale, Jan 20 2012 *)
  • PARI
    a(n)=n--\3*5+n%3 \\ Charles R Greathouse IV, Oct 22 2011
    
  • PARI
    concat(0, Vec(x^2*(1+x+3*x^2)/(1-x)^2/(1+x+x^2) + O(x^100))) \\ Altug Alkan, Dec 09 2015
    
  • PARI
    is(n) = n%5 < 3 \\ Felix Fröhlich, Jan 05 2018
    

Formula

a(n+1) = Sum_{k>=0} A030341(n,k)*b(k) with b(0)=1 and b(k)=5*3^(k-1) for k>0. - Philippe Deléham, Oct 22 2011
G.f.: x^2*(1+x+3*x^2)/(1-x)^2/(1+x+x^2). - Colin Barker, Feb 17 2012
a(n) = 5 + a(n-3) for n>3. - Robert Israel, Sep 02 2014
a(n) = floor((5/4)*floor(4*(n-1)/3)). - Bruno Berselli, May 03 2016
From Wesley Ivan Hurt, Jun 14 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(n) = (15*n-21-6*cos(2*n*Pi/3)+2*sqrt(3)*sin(2*n*Pi/3))/9.
a(3*k) = 5*k-3, a(3*k-1) = 5*k-4, a(3*k-2) = 5*k-5. (End)
a(n) = n - 1 + 2*floor((n-1)/3). - Bruno Berselli, Feb 06 2017
Sum_{n>=2} (-1)^n/a(n) = sqrt(1-2/sqrt(5))*Pi/5 + 3*log(2)/5. - Amiram Eldar, Dec 10 2021

A047240 Numbers that are congruent to {0, 1, 2} mod 6.

Original entry on oeis.org

0, 1, 2, 6, 7, 8, 12, 13, 14, 18, 19, 20, 24, 25, 26, 30, 31, 32, 36, 37, 38, 42, 43, 44, 48, 49, 50, 54, 55, 56, 60, 61, 62, 66, 67, 68, 72, 73, 74, 78, 79, 80, 84, 85, 86, 90, 91, 92, 96, 97, 98, 102, 103, 104, 108, 109, 110, 114, 115, 116, 120, 121, 122
Offset: 1

Views

Author

Keywords

Comments

Partial sums of 0,1,1,4,1,1,4,... - Paul Barry, Feb 19 2007
Numbers k such that floor(k/3) = 2*floor(k/6). - Bruno Berselli, Oct 05 2017

Crossrefs

Cf. similar sequences with formula n+i*floor(n/3) listed in A281899.

Programs

Formula

From Paul Barry, Feb 19 2007: (Start)
G.f.: x*(1 + x + 4*x^2)/((1 - x)*(1 - x^3)).
a(n) = 2*n - 3 - cos(2*n*Pi/3) + sin(2*n*Pi/3)/sqrt(3). (End)
a(n) = n-1 + 3*floor((n-1)/3). - Philippe Deléham, Apr 21 2009
a(n) = 6*floor(n/3) + (n mod 3). - Gary Detlefs, Mar 09 2010
a(n+1) = Sum_{k>=0} A030341(n,k)*b(k) with b(0)=1 and b(k)=2*3^k for k>0. - Philippe Deléham, Oct 22 2011.
a(n) = 2*n - 2 - A010872(n-1). - Wesley Ivan Hurt, Jul 07 2013
From Wesley Ivan Hurt, Jun 14 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(3*k) = 6*k-4, a(3*k-1) = 6*k-5, a(3*k-2) = 6*k-6. (End)
Sum_{n>=2} (-1)^n/a(n) = (3-sqrt(3))*Pi/18 + log(2+sqrt(3))/(2*sqrt(3)). - Amiram Eldar, Dec 14 2021
E.g.f.: 4 + exp(x)*(2*x - 3) - exp(-x/2)*(3*cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2))/3. - Stefano Spezia, Jul 26 2024

Extensions

Paul Barry formula adapted for offset 1 by Wesley Ivan Hurt, Jun 14 2016

A248375 a(n) = floor(9*n/8).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 63, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95
Offset: 0

Views

Author

M. F. Hasler, Oct 05 2014

Keywords

Comments

Also: numbers not congruent to 8 (mod 9), or numbers whose base-9 expansion does not end in the digit "8".
Paz proves that for all n>0 there is a prime in Breusch's interval [n; a(n+3)], cf A248371.

Crossrefs

Programs

  • Magma
    [Floor(9*n/8): n in [0..90]]; // Bruno Berselli, Oct 06 2014
  • Mathematica
    Table[Floor[9 n/8], {n, 0, 90}] (* Bruno Berselli, Oct 06 2014 *)
  • PARI
    a(n)=9*n\8
    

Formula

G.f.: x*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + 2*x^7) / ((1 + x)*(1 - x)^2*(1 + x^2)*(1 + x^4)). [Bruno Berselli, Oct 06 2014]
a(n) = n + floor(n/8) = a(n-1) + a(n-8) - a(n-9). [Bruno Berselli, Oct 06 2014]
a(n) = A168183(n+1) - 1. - Philippe Deléham, Dec 05 2013

A047354 Numbers that are congruent to {0, 1, 2} mod 7.

Original entry on oeis.org

0, 1, 2, 7, 8, 9, 14, 15, 16, 21, 22, 23, 28, 29, 30, 35, 36, 37, 42, 43, 44, 49, 50, 51, 56, 57, 58, 63, 64, 65, 70, 71, 72, 77, 78, 79, 84, 85, 86, 91, 92, 93, 98, 99, 100, 105, 106, 107, 112, 113, 114, 119, 120, 121, 126, 127, 128, 133, 134, 135, 140, 141
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A030341.
Cf. similar sequences with formula n+i*floor(n/3) listed in A281899.

Programs

  • Magma
    [n : n in [0..150] | n mod 7 in [0..2]]; // Wesley Ivan Hurt, Jun 08 2016
  • Maple
    seq(7*floor(n/3)+(n mod 3), n=0..60); # Gary Detlefs, Mar 09 2010
  • Mathematica
    Flatten[{#,#+1,#+2}&/@(7Range[0,20])]  (* Harvey P. Dale, Mar 05 2011 *)

Formula

a(n) = 7*floor(n/3)+(n mod 3), with offset 0 and a(0)=0. - Gary Detlefs, Mar 09 2010
From R. J. Mathar, Mar 29 2010: (Start)
G.f.: x^2*(1+x+5*x^2)/((1+x+x^2) * (x-1)^2).
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4. (End)
a(n+1) = Sum_{k>=0} A030341(n,k)*b(k) with b(0)=1 and b(k)=7*3^(k-1) for k>0. - Philippe Deléham, Oct 24 2011
From Wesley Ivan Hurt, Jun 08 2016: (Start)
a(n) = (21*n-33-12*cos(2*n*Pi/3)+4*sqrt(3)*sin(2*n*Pi/3))/9.
a(3k) = 7k-5, a(3k-1) = 7k-6, a(3k-2) = 7k-7. (End)
a(n) = n + 4*floor((n-1)/3) - 1. - Bruno Berselli, Feb 06 2017

A047469 Numbers that are congruent to {0, 1, 2} mod 8.

Original entry on oeis.org

0, 1, 2, 8, 9, 10, 16, 17, 18, 24, 25, 26, 32, 33, 34, 40, 41, 42, 48, 49, 50, 56, 57, 58, 64, 65, 66, 72, 73, 74, 80, 81, 82, 88, 89, 90, 96, 97, 98, 104, 105, 106, 112, 113, 114, 120, 121, 122, 128, 129, 130, 136, 137, 138, 144, 145, 146, 152, 153, 154
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A030341.
Cf. similar sequences with formula n+i*floor(n/3) listed in A281899.

Programs

  • Magma
    [n : n in [0..150] | n mod 8 in [0..2]]; // Wesley Ivan Hurt, Jun 09 2016
  • Maple
    A047469:=n->(24*n-39-15*cos(2*n*Pi/3)+5*sqrt(3)*sin(2*n*Pi/3))/9: seq(A047469(n), n=1..100); # Wesley Ivan Hurt, Jun 09 2016
  • Mathematica
    Select[Range[0, 150], MemberQ[{0, 1, 2}, Mod[#, 8]] &] (* Wesley Ivan Hurt, Jun 09 2016 *)
  • PARI
    a(n)=n+(n-1)\3*5-1
    

Formula

G.f.: x*(1 + x + 6*x^2)/((1 - x)*(1 - x^3)).
a(n+1) = Sum_{k>=0} A030341(n,k)*b(k) with b(0)=1 and b(k) = 8*3^(k-1) for k>0. - Philippe Deléham, Oct 24 2011
From Wesley Ivan Hurt, Jun 09 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(n) = (24*n-39-15*cos(2*n*Pi/3)+5*sqrt(3)*sin(2*n*Pi/3))/9.
a(3k) = 8k-6, a(3k-1) = 8k-7, a(3k-2) = 8k-8. (End)
a(n) = n + 5*floor((n-1)/3) - 1. - Bruno Berselli, Feb 06 2017
Showing 1-6 of 6 results.