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-7 of 7 results.

A007494 Numbers that are congruent to 0 or 2 mod 3.

Original entry on oeis.org

0, 2, 3, 5, 6, 8, 9, 11, 12, 14, 15, 17, 18, 20, 21, 23, 24, 26, 27, 29, 30, 32, 33, 35, 36, 38, 39, 41, 42, 44, 45, 47, 48, 50, 51, 53, 54, 56, 57, 59, 60, 62, 63, 65, 66, 68, 69, 71, 72, 74, 75, 77, 78, 80, 81, 83, 84, 86, 87, 89, 90, 92, 93, 95, 96, 98, 99, 101, 102, 104, 105, 107
Offset: 0

Views

Author

Christopher Lam Cham Kee (Topher(AT)CyberDude.Com)

Keywords

Comments

The map n -> a(n) (where a(n) = 3n/2 if n even or (3n+1)/2 if n odd) was studied by Mahler, in connection with "Z-numbers" and later by Flatto. One question was whether, iterating from an initial integer, one eventually encountered an iterate = 1 (mod 4). - Jeff Lagarias, Sep 23 2002
Partial sums of 0,2,1,2,1,2,1,2,1,... . - Paul Barry, Aug 18 2007
a(n) = numbers k such that antiharmonic mean of the first k positive integers is not integer. A169609(a(n-1)) = 3. See A146535 and A169609. Complement of A016777. - Jaroslav Krizek, May 28 2010
Range of A173732. - Reinhard Zumkeller, Apr 29 2012
Number of partitions of 6n into two odd parts. - Wesley Ivan Hurt, Nov 15 2014
Numbers m such that 3 divides A000217(m). - Bruno Berselli, Aug 04 2017
Maximal length of a snake like polyomino that fits in a 2 X n rectangle. - Alain Goupil, Feb 12 2020

References

  • L. Flatto, Z-numbers and beta-transformations, in Symbolic dynamics and its applications (New Haven, CT, 1991), 181-201, Contemp. Math., 135, Amer. Math. Soc., Providence, RI, 1992.

Crossrefs

Complement of A016777.
Range of A002517.
Cf. A274406. [Bruno Berselli, Jun 26 2016]

Programs

Formula

a(n) = 3*n/2 if n even, otherwise (3*n+1)/2.
If u(1)=0, u(n) = n + floor(u(n-1)/3), then a(n-1) = u(n). - Benoit Cloitre, Nov 26 2002
G.f.: x*(x+2)/((1-x)^2*(1+x)). - Ralf Stephan, Apr 13 2002
a(n) = 3*floor(n/2) + 2*(n mod 2) = A032766(n) + A000035(n). - Reinhard Zumkeller, Apr 04 2005
a(n) = (6*n+1)/4 - (-1)^n/4; a(n) = Sum_{k=0..n-1} (1 + (-1)^(k/2)*cos(k*Pi/2)). - Paul Barry, Aug 18 2007
A145389(a(n)) <> 1. - Reinhard Zumkeller, Oct 10 2008
a(n) = A002943(n) - A173511(n). - Reinhard Zumkeller, Feb 20 2010
a(n) = 3*n - a(n-1) - 1 (with a(0)=0). - Vincenzo Librandi, Nov 18 2010
a(n) = Sum_{k>=0} A030308(n,k)*A042950(k). - Philippe Deléham, Oct 17 2011
a(n) = n + ceiling(n/2). - Arkadiusz Wesolowski, Sep 18 2012
a(n) = 2n - floor(n/2) = floor((3n+1)/2) = n + (n + (n mod 2))/2. - Wesley Ivan Hurt, Oct 19 2013
a(n) = A000217(n+1) - A099392(n+1). - Bui Quang Tuan, Mar 27 2015
a(n) = n + floor(n/2) + (n mod 2). - Bruno Berselli, Apr 04 2016
a(n) = Sum_{i=1..n} numerator(2/i). - Wesley Ivan Hurt, Feb 26 2017
a(n) = Sum_{k=0..n-1} Sum_{i=0..k} C(i,k)+(-1)^(k-i). - Wesley Ivan Hurt, Sep 20 2017
E.g.f.: (3*exp(x)*x + sinh(x))/2. - Stefano Spezia, Feb 11 2020
Sum_{n>=1} (-1)^(n+1)/a(n) = log(3)/2 - Pi/(6*sqrt(3)). - Amiram Eldar, Dec 04 2021

A014601 Numbers congruent to 0 or 3 mod 4.

Original entry on oeis.org

0, 3, 4, 7, 8, 11, 12, 15, 16, 19, 20, 23, 24, 27, 28, 31, 32, 35, 36, 39, 40, 43, 44, 47, 48, 51, 52, 55, 56, 59, 60, 63, 64, 67, 68, 71, 72, 75, 76, 79, 80, 83, 84, 87, 88, 91, 92, 95, 96, 99, 100, 103, 104, 107, 108, 111, 112, 115, 116, 119, 120, 123, 124
Offset: 0

Views

Author

Eric Rains (rains(AT)caltech.edu)

Keywords

Comments

Discriminants of orders in imaginary quadratic fields (negated). [Comment corrected by Christopher E. Thompson, Dec 11 2016]
Numbers such that Langford-Skolem problem has a solution - see A014552.
Complement of A042963. - Reinhard Zumkeller, Oct 04 2004
Also called skew amenable numbers; a number k is skew amenable if there exist a set {a(i)} of integers satisfying the relations k = Sum_{i=1..k} a(i) = -Product_{i=1..k} a(i). Thus we have 8 = 1 + 1 + 1 + 1 + 1 + 1 - 2 + 4 = -(1*1*1*1*1*1*(-2)*4). - Lekraj Beedassy, Jan 07 2005
Possible nonpositive discriminants of quadratic equation a*x^2 + b*x + c or discriminants of binary quadratic forms a*x^2 + b*x*y + c*y^2. - Artur Jasinski, Apr 28 2008
Also, disregarding the 0 term, positive integers m such that, equivalently,
(i) +-1 +-2 +-... +-m is even for all choices of signs,
(ii) +-1 +-2 +-... +-m = 0 for some choices of signs,
(iii) for all -m <= k <= m, k = +-1 +-2 +-... +-(k-1) +-(k+1) +-(k+2) +-... +-m for at least one choice of signs. - Rick L. Shepherd, Oct 29 2008
A145768(a(n)) is even. - Reinhard Zumkeller, Jun 05 2012
Multiples of 4 interleaved with 1 less than multiples of 4. - Wesley Ivan Hurt, Nov 08 2013
((2*k+0) + (2*k+1) + ... + (2*k+m-1) + (2*k+m)) is even if and only if m = a(n) for some n where k is any nonnegative integer. - Gionata Neri, Jul 24 2015
Numbers whose binary reflected Gray code (A014550) ends with 0. - Amiram Eldar, May 17 2021

Examples

			G.f. = 3*x + 4*x^2 + 7*x^3 + 8*x^4 + 11*x^5 + 12*x^6 + 15*x^7 + 16*x^8 + ...
		

References

  • H. Cohen, Course in Computational Alg. No. Theory, Springer, 1993, pp. 514-5.
  • A. Scholz and B. Schoeneberg, Einführung in die Zahlentheorie, 5. Aufl., de Gruyter, Berlin, New York, 1973, p. 108.

Crossrefs

Cf. A274406. - Bruno Berselli, Jun 26 2016

Programs

  • Haskell
    a014601 n = a014601_list !! n
    a014601_list = [x | x <- [0..], mod x 4 `elem` [0, 3]]
    -- Reinhard Zumkeller, Jun 05 2012
  • Magma
    [n: n in [0..200]|n mod 4 in {0,3}]; // Vincenzo Librandi, Dec 24 2010
    
  • Maple
    A014601:=n->3*n-2*floor(n/2); seq(A014601(k), k=0..100); # Wesley Ivan Hurt, Nov 08 2013
  • Mathematica
    aa = {}; Do[Do[Do[d = b^2 - 4 a c; If[d <= 0, AppendTo[aa, -d]], {a, 0, 50}], {b, 0, 50}], {c, 0, 50}]; Union[aa] (* Artur Jasinski, Apr 28 2008 *)
    Select[Range[0, 124], Or[Mod[#, 4] == 0, Mod[#, 4] == 3] &] (* Ant King, Nov 18 2010 *)
    CoefficientList[Series[2 x/(1 - x)^2 + (1/(1 - x) + 1/(1 + x)) x/2, {x, 0, 100}], x] (* Vincenzo Librandi, May 18 2014 *)
    a[ n_] := 2 n + Mod[n, 2]; (* Michael Somos, Jul 24 2015 *)
  • PARI
    {a(n) = 2*n + n%2}; /* Michael Somos, Dec 27 2010 */
    

Formula

a(n) = (n + 1)*2 + 1 - n mod 2. - Reinhard Zumkeller, Apr 21 2003
A014494(n) = A000217(a(n)). - Reinhard Zumkeller, Oct 04 2004
a(n) = Sum_{k=1..n} (2 - (-1)^k). - William A. Tedeschi, Mar 20 2008
A139131(a(n)) = A078636(a(n)). - Reinhard Zumkeller, Apr 10 2008
From R. J. Mathar, Sep 25 2009: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3) for n > 2.
G.f.: x*(3+x)/((1+x)*(x-1)^2). (End)
a(n) = 2*n + (n mod 2). - Paolo Valzasina (p.valzasina(AT)gmail.com), Nov 24 2009
a(n) = (4*n - (-1)^n + 1)/2. - Bruno Berselli, Oct 06 2010
a(n) = 4*n - a(n-1) - 1 (with a(0) = 0). - Vincenzo Librandi, Dec 24 2010
a(n) = -A042948(-n) for all n in Z. - Michael Somos, Dec 27 2010
G.f.: 2*x / (1 - x)^2 + (1 / (1 - x) + 1 / (1 + x)) * x/2. - Michael Somos, Dec 27 2010
a(n) = Sum_{k>=0} A030308(n,k)*b(k) with b(0) = 3 and b(k) = 2^(k+1) for k > 0. - Philippe Deléham, Oct 17 2011
a(n) = ceiling((4/3)*ceiling(3*n/2)). - Clark Kimberling, Jul 04 2012
a(n) = 3n - 2*floor(n/2). - Wesley Ivan Hurt, Nov 08 2013
a(n) = A042948(n+1) - 1 for all n in Z. - Michael Somos, Jul 24 2015
a(n) + a(n+1) = A004767(n) for all n in Z. - Michael Somos, Jul 24 2015
Sum_{n>=1} (-1)^(n+1)/a(n) = 3*log(2)/4 - Pi/8. - Amiram Eldar, Dec 05 2021
E.g.f.: ((4*x + 1)*exp(x) - exp(-x))/2. - David Lovler, Aug 04 2022

A047208 Numbers that are congruent to {0, 4} mod 5.

Original entry on oeis.org

0, 4, 5, 9, 10, 14, 15, 19, 20, 24, 25, 29, 30, 34, 35, 39, 40, 44, 45, 49, 50, 54, 55, 59, 60, 64, 65, 69, 70, 74, 75, 79, 80, 84, 85, 89, 90, 94, 95, 99, 100, 104, 105, 109, 110, 114, 115, 119, 120, 124, 125, 129, 130, 134, 135, 139, 140, 144, 145, 149
Offset: 1

Views

Author

Keywords

Comments

Also solutions to 3^x + 5^x == 2 (mod 11). - Cino Hilliard, May 18 2003

Crossrefs

Cf. A001622, A010674, A010685 (first differences), A274406.

Programs

  • Magma
    [(5*(n-1) + 3*((n-1) mod 2))/2: n in [1..100]]; // G. C. Greubel, Nov 23 2021
    
  • Mathematica
    {#,#+4}&/@(5*Range[0,30])//Flatten (* Harvey P. Dale, Apr 05 2019 *)
  • PARI
    forstep(n=0,200,[4,1],print1(n", ")) \\ Charles R Greathouse IV, Oct 17 2011
    
  • Sage
    [(5*(n-1) +3*((n-1)%2))/2 for n in (1..100)] # G. C. Greubel, Nov 23 2021

Formula

From R. J. Mathar, Jan 24 2009: (Start)
G.f.: x^2*(4+x)/((1-x)^2*(1+x)).
a(n) = a(n-2) + 5. (End)
a(n) = 5*n - 6 - a(n-1) (with a(1)=0). - Vincenzo Librandi, Nov 18 2010
a(n+1) = Sum_{k>=0} A030308(n,k)*b(k), with b(0)=4 and b(k) = A020714(k-1) = 5*2^(k-1) for k>0. - Philippe Deléham, Oct 17 2011
a(n) = ceiling((5/3)*ceiling(3*n/2)). - Clark Kimberling, Jul 04 2012
a(n) = (5*(n-1) + 3*(n-1 mod 2))/2 = (5*(n-1) + A010674(n-1))/2. - G. C. Greubel, Nov 23 2021
Sum_{n>=2} (-1)^n/a(n) = log(5)/4 + log(phi)/(2*sqrt(5)) - sqrt(1+2/sqrt(5))*Pi/10, where phi is the golden ratio (A001622). - Amiram Eldar, Dec 07 2021
E.g.f.: 1 + ((5*x - 7/2)*exp(x) + (3/2)*exp(-x))/2. - David Lovler, Aug 23 2022

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

A193910 Leap centuries in the revised Julian calendar.

Original entry on oeis.org

2, 6, 11, 15, 20, 24, 29, 33, 38, 42, 47, 51, 56, 60, 65, 69, 74, 78, 83, 87, 92, 96, 101, 105, 110, 114, 119, 123, 128, 132, 137, 141, 146, 150, 155, 159, 164, 168, 173, 177, 182, 186, 191, 195, 200, 204, 209, 213, 218, 222, 227, 231, 236, 240, 245, 249
Offset: 1

Views

Author

Frank Ellermann, Aug 09 2011

Keywords

Comments

Terms divided by 100, e.g., 29 indicates year 2900, which is a revised Julian leap year, but not a Gregorian leap year. Values below 20 are "proleptic" (only based on the formula).

Examples

			20 mod 9 is 2; 2000 was a leap year in the revised Julian calendar.
24 mod 9 is 6; 2400 and 2000 also happen to be Gregorian leap years.
28 is the first integer greater than 16 only contained in A008586.
29 is the first integer greater than 16 not contained in A008586.
		

Crossrefs

A008586 enumerates "Gregorian leap centuries" (N mod 4 = 0).
A193879 enumerates all differences from A008586.
Cf. A274406: numbers congruent to {0, 8} mod 9; A301451: numbers congruent to {1, 7} mod 9. This sequence lists the numbers congruent to {2, 6} mod 9.

Programs

  • Mathematica
    Table[1/4 (18 m - (-1)^m - 11), {m, 56}] (* Farideh Firoozbakht, Oct 08 2014 *)
  • PARI
    a(n)=(9*n-5)\2 \\ Charles R Greathouse IV, Aug 23 2011
  • Rexx
    do C = 0 to 250; J = C // 9; if J = 2 | J = 6 then say C; end C
    

Formula

a(n) = a(n-2) + 9. - Charles R Greathouse IV, Aug 09 2011
a(n) = 2 or 6 (mod 9).
For all positive integers n, a(n) = (1/4)*(18*n-17*(-1)^n-11), which implies a(2*n-1) = 9*n-3 and a(2*n) = 9*n-7. - Farideh Firoozbakht, Oct 08 2014
G.f.: x*(2 + 4*x + 3*x^2)/((1 + x)*(1 - x)^2). - Philippe Deléham, Nov 30 2016

A047335 Numbers that are congruent to {0, 6} mod 7.

Original entry on oeis.org

0, 6, 7, 13, 14, 20, 21, 27, 28, 34, 35, 41, 42, 48, 49, 55, 56, 62, 63, 69, 70, 76, 77, 83, 84, 90, 91, 97, 98, 104, 105, 111, 112, 118, 119, 125, 126, 132, 133, 139, 140, 146, 147, 153, 154, 160, 161, 167, 168
Offset: 1

Views

Author

Keywords

References

  • Hsien-Kuei Hwang, S Janson, TH Tsai, Exact and asymptotic solutions of the recurrence f(n) = f(floor(n/2)) + f(ceiling(n/2)) + g(n): theory and applications, Preprint, 2016; http://140.109.74.92/hk/wp-content/files/2016/12/aat-hhrr-1.pdf. Also Exact and Asymptotic Solutions of a Divide-and-Conquer Recurrence Dividing at Half: Theory and Applications, ACM Transactions on Algorithms, 13:4 (2017), #47; DOI: 10.1145/3127585

Crossrefs

Cf. A274406.

Programs

  • Mathematica
    Select[Range[0,200],MemberQ[{0,6},Mod[#,7]]&]  (* Harvey P. Dale, Mar 16 2011 *)

Formula

From Bruno Berselli, Oct 06 2010: (Start)
G.f.: x^2*(6+x)/((1+x)*(1-x)^2).
a(n) - a(n-1) - a(n-2) + a(n-3) = 0 (n > 3).
a(n) = (14*n + 5*(-1)^n - 9)/4.
a(n) - a(n-2) = 7 (n > 2).
a(n) - a(n-1) = A010687(k) with n > 1 and k == n-1 (mod 2). (End)
a(n+1) = Sum_{k>=0} A030308(n,k)*b(k) with b(0)=6 and b(k) = 7*2^(k-1) = A005009(k-1) for k > 0. - Philippe Deléham, Oct 18 2011

A301451 Numbers congruent to {1, 7} mod 9.

Original entry on oeis.org

1, 7, 10, 16, 19, 25, 28, 34, 37, 43, 46, 52, 55, 61, 64, 70, 73, 79, 82, 88, 91, 97, 100, 106, 109, 115, 118, 124, 127, 133, 136, 142, 145, 151, 154, 160, 163, 169, 172, 178, 181, 187, 190, 196, 199, 205, 208, 214, 217, 223, 226, 232, 235, 241, 244, 250, 253, 259, 262, 268
Offset: 1

Views

Author

Bruno Berselli, Mar 21 2018

Keywords

Comments

First bisection of A056991, second bisection of A242660.
The squares of the terms of A174396 are the squares of this sequence.

Crossrefs

Cf. A274406: numbers congruent to {0, 8} mod 9.
Cf. A193910: numbers congruent to {2, 6} mod 9.

Programs

  • GAP
    a := [1,7,10];; for n in [4..60] do a[n] := a[n-1] + a[n-2] - a[n-3]; od; a;
    
  • Magma
    &cat [[9*n+1, 9*n+7]: n in [0..40]];
    
  • Mathematica
    Table[2 (2 n - 1) + (2 n - 3 (1 - (-1)^n))/4, {n, 1, 60}]
    {#+1,#+7}&/@(9*Range[0,30])//Flatten (* or *) LinearRecurrence[{1,1,-1},{1,7,10},60] (* Harvey P. Dale, Nov 08 2020 *)
  • PARI
    Vec(x*(1 + 6*x + 2*x^2) / ((1 - x)^2*(1 + x)) + O(x^60)) \\ Colin Barker, Mar 22 2018
  • Python
    [2*(2*n-1)+(2*n-3*(1-(-1)**n))/4 for n in range(1,70)]
    
  • Sage
    [n for n in (1..300) if n % 9 in (1,7)]
    

Formula

O.g.f.: x*(1 + 6*x + 2*x^2)/((1 + x)*(1 - x)^2).
E.g.f.: (3 + 8*exp(x) - 11*exp(2*x) + 18*x*exp(2*x))*exp(-x)/4.
a(n) = a(n-1) + a(n-2) - a(n-3).
a(n) = 2*(2*n - 1) + (2*n - 3*(1 - (-1)^n))/4. Therefore, for n even a(n) = (9*n - 4)/2, otherwise a(n) = (9*n - 7)/2.
a(2n+1) = A017173(n). a(2n) = A017245(n-1). - R. J. Mathar, Feb 28 2019
Showing 1-7 of 7 results.