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.

A001651 Numbers not divisible by 3.

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, 28, 29, 31, 32, 34, 35, 37, 38, 40, 41, 43, 44, 46, 47, 49, 50, 52, 53, 55, 56, 58, 59, 61, 62, 64, 65, 67, 68, 70, 71, 73, 74, 76, 77, 79, 80, 82, 83, 85, 86, 88, 89, 91, 92, 94, 95, 97, 98, 100, 101, 103, 104
Offset: 1

Views

Author

Keywords

Comments

Inverse binomial transform of A084858. - Benoit Cloitre, Jun 12 2003
Earliest monotonic sequence starting with (1,2) and satisfying the condition: "a(n)+a(n-1) is not in the sequence." - Benoit Cloitre, Mar 25 2004. [The numbers of the form a(n)+a(n-1) form precisely the complement with respect to the positive integers. - David W. Wilson, Feb 18 2012]
a(1) = 1; a(n) is least number which is relatively prime to the sum of all the previous terms. - Amarnath Murthy, Jun 18 2001
For n > 3, numbers having 3 as an anti-divisor. - Alexandre Wajnberg, Oct 02 2005
Also numbers n such that (n+1)*(n+2)/6 = A000292(n)/n is an integer. - Ctibor O. Zizka, Oct 15 2010
Notice the property described by Gary Detlefs in A113801: more generally, these numbers are of the form (2*h*n + (h-4)*(-1)^n-h)/4 (h, n natural numbers), therefore ((2*h*n + (h-4)*(-1)^n - h)/4)^2 - 1 == 0 (mod h); in this case, a(n)^2 - 1 == 0 (mod 3). - Bruno Berselli, Nov 17 2010
A001651 mod 9 gives A141425. - Paul Curtz, Dec 31 2010. (Correct for the modified offset 1. - M. F. Hasler, Apr 07 2015)
The set of natural numbers (1, 2, 3, ...), sequence A000027; represents the numbers of ordered compositions of n using terms in the signed set: (1, 2, -4, -5, 7, 8, -10, -11, 13, 14, ...). This follows from (1, 2, 3, ...) being the INVERT transform of A011655, signed and beginning: (1, 1, 0, -1, -1, 0, 1, 1, 0, ...). - Gary W. Adamson, Apr 28 2013
Union of A047239 and A047257. - Wesley Ivan Hurt, Dec 19 2013
Numbers whose sum of digits (and digital root) is != 0 (mod 3). - Joerg Arndt, Aug 29 2014
The number of partitions of 3*(n-1) into at most 2 parts. - Colin Barker, Apr 22 2015
a(n) is the number of partitions of 3*n into two distinct parts. - L. Edson Jeffery, Jan 14 2017
Conjectured (and like even easily proved) to be the graph bandwidth of the complete bipartite graph K_{n,n}. - Eric W. Weisstein, Apr 24 2017
Numbers k such that Fibonacci(k) mod 4 = 1 or 3. Equivalently, sequence lists the indices of the odd Fibonacci numbers (see A014437). - Bruno Berselli, Oct 17 2017
Minimum value of n_3 such that the "rectangular spiral pattern" is the optimal solution for Ripà's n_1 X n_2 x n_3 Dots Problem, for any n_1 = n_2. For example, if n_1 = n_2 = 5, n_3 = floor((3/2)*(n_1 - 1)) + 1 = a(5). - Marco Ripà, Jul 23 2018
For n >= 54, a(n) = sat(n, P_n), the minimum number of edges in a P_n-saturated graph on n vertices, where P_n is the n-vertex path (see Dudek, Katona, and Wojda, 2003; Frick and Singleton, 2005). - Danny Rorabaugh, Nov 07 2017
From Roger Ford, May 09 2021: (Start)
a(n) is the smallest sum of arch lengths for the top arches of a semi-meander with n arches. An arch length is the number of arches covered + 1.
/\ The top arch has a length of 3. /\ The top arch has a length of 3.
/ \ Both bottom arches have a //\\ The middle arch has a length of 2.
//\/\\ length of 1. ///\\\ The bottom arch has a length of 1.
Example: a(6) = 8 /\ /\
//\\ /\ //\\ /\ 2 + 1 + 1 + 2 + 1 + 1 = 8. (End)
This is the lexicographically earliest increasing sequence of positive integers such that no polynomial of degree d can be fitted to d+2 consecutive terms (equivalently, such that no iterated difference is zero). - Pontus von Brömssen, Dec 26 2021

Examples

			G.f.: x + 2*x^2 + 4*x^3 + 5*x^4 + 7*x^5 + 8*x^6 + 10*x^7 + 11*x^8 + 13*x^9 + ...
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • GAP
    Filtered([0..110],n->n mod 3<>0); # Muniru A Asiru, Jul 24 2018
    
  • Haskell
    a001651 = (`div` 2) . (subtract 1) . (* 3)
    a001651_list = filter ((/= 0) . (`mod` 3)) [1..]
    -- Reinhard Zumkeller, Jul 07 2012, Aug 23 2011
    
  • Magma
    [3*(2*n-1)/4-(-1)^n/4: n in [1..80]]; // Vincenzo Librandi, Jun 07 2011
    
  • Maple
    A001651 := n -> 3*floor(n/2) - (-1)^n; # Corrected by M. F. Hasler, Apr 07 2015
    A001651:=(1+z+z**2)/(z+1)/(z-1)**2; # Simon Plouffe in his 1992 dissertation
    a[1]:=1:a[2]:=2:for n from 3 to 100 do a[n]:=a[n-2]+3 od: seq(a[n], n=1..69); # Zerinvary Lajos, Mar 16 2008, offset corrected by M. F. Hasler, Apr 07 2015
  • Mathematica
    Select[Table[n,{n,200}],Mod[#,3]!=0&] (* Vladimir Joseph Stephan Orlovsky, Feb 18 2011 *)
    Drop[Range[200 + 1], {1, -1, 3}] - 1 (* József Konczer, May 24 2016 *)
    Floor[(3 Range[70] - 1)/2] (* Eric W. Weisstein, Apr 24 2017 *)
    CoefficientList[Series[(x^2 + x + 1)/((x - 1)^2 (x + 1)), {x, 0, 70}],
      x] (* or *)
    LinearRecurrence[{1, 1, -1}, {1, 2, 4}, 70] (* Robert G. Wilson v, Jul 25 2018 *)
  • PARI
    {a(n) = n + (n-1)\2}; /* Michael Somos, Jan 15 2011 */
    
  • PARI
    x='x+O('x^100); Vec(x*(1+x+x^2)/((1-x)*(1-x^2))) \\ Altug Alkan, Oct 22 2015
    
  • Python
    print([k for k in range(1, 105) if k%3]) # Michael S. Branicky, Sep 06 2021
    
  • Python
    def A001651(n): return (n<<1)-(n>>1)-1 # Chai Wah Wu, Mar 05 2024

Formula

a(n) = 3 + a(n-2) for n > 2.
a(n) = a(n-1) + a(n-2) - a(n-3) for n > 3.
a(2*n+1) = 3*n+1, a(2*n) = 3*n-1.
G.f.: x * (1 + x + x^2) / ((1 - x) * (1 - x^2)). - Michael Somos, Jun 08 2000
a(n) = (4-n)*a(n-1) + 2*a(n-2) + (n-3)*a(n-3) (from the Carlitz et al. article).
a(n) = floor((3*n-1)/2). [Corrected by Gary Detlefs]
a(1) = 1, a(n) = 2*a(n-1) - 3*floor(a(n-1)/3). - Benoit Cloitre, Aug 17 2002
a(n+1) = 1 + n - n mod 2 + (n + n mod 2)/2. - Reinhard Zumkeller, Dec 17 2002
a(1) = 1, a(n+1) = a(n) + (a(n) mod 3). - Reinhard Zumkeller, Mar 23 2003
a(1) = 1, a(n) = 3*(n-1) - a(n-1). - Benoit Cloitre, Apr 12 2003
a(n) = 3*(2*n-1)/4 - (-1)^n/4. - Benoit Cloitre, Jun 12 2003
Nearest integer to (Sum_{k>=n} 1/k^3)/(Sum_{k>=n} 1/k^4). - Benoit Cloitre, Jun 12 2003
Partial sums of A040001. a(n) = A032766(n-1)+1. - Paul Barry, Sep 02 2003
a(n) = T(n, 1) = T(n, n-1), where T is the array in A026386. - Emeric Deutsch, Feb 18 2004
a(n) = sqrt(3*A001082(n)+1). - Zak Seidov, Dec 12 2007
a(n) = A077043(n) - A077043(n-1). - Reinhard Zumkeller, Dec 28 2007
a(n) = A001477(n-1) + A008619(n-1). - Yosu Yurramendi, Aug 10 2008
Euler transform of length 3 sequence [2, 1, -1]. - Michael Somos, Sep 06 2008
A011655(a(n)) = 1. - Reinhard Zumkeller, Nov 30 2009
a(n) = n - 1 + ceiling(n/2). - Michael Somos, Jan 15 2011
a(n) = 3*A000217(n)+1 - 2*Sum_{i=1..n-1} a(i), for n>1. - Bruno Berselli, Nov 17 2010
a(n) = 3*floor(n/2) + (-1)^(n+1). - Gary Detlefs, Dec 29 2011
A215879(a(n)) > 0. - Reinhard Zumkeller, Dec 28 2012 [More precisely, A215879 is the characteristic function of A001651. - M. F. Hasler, Apr 07 2015]
a(n) = 2n - 1 - floor(n/2). - Wesley Ivan Hurt, Oct 25 2013
a(n) = (3n - 2 + (n mod 2)) / 2. - Wesley Ivan Hurt, Mar 31 2014
a(n) = A000217(n) - A000982(n-1). - Bui Quang Tuan, Mar 28 2015
1/1^3 - 1/2^3 + 1/4^3 - 1/5^3 + 1/7^3 - 1/8^3 + ... = 4 Pi^3/(3 sqrt(3)). - M. F. Hasler, Mar 29 2015
E.g.f.: (4 + sinh(x) - cosh(x) + 3*(2*x - 1)*exp(x))/4. - Ilya Gutkovskiy, May 24 2016
a(n) = a(n+k-1) + a(n-k) - a(n-1) for n > k >= 0. - Bob Selcoe, Feb 03 2017
a(n) = -a(1-n) for all n in Z. - Michael Somos, Jul 31 2018
a(n) = n + A004526(n-1). - David James Sycamore, Sep 06 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(3*sqrt(3)) (A073010). - Amiram Eldar, Dec 04 2021
From Amiram Eldar, Nov 22 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = 1.
Product_{n>=2} (1 + (-1)^n/a(n)) = 2*Pi/(3*sqrt(3)) (A248897). (End)

Extensions

This is a list, so the offset should be 1. I corrected this and adjusted some of the comments and formulas. Other lines probably also need to be adjusted. - N. J. A. Sloane, Jan 01 2011
Offset of pre-2011 formulas verified or corrected by M. F. Hasler, Apr 07-18 2015 and by Danny Rorabaugh, Oct 23 2015

A026472 {3, 7} together with the numbers congruent to {1, 2} mod 12.

Original entry on oeis.org

1, 2, 3, 7, 13, 14, 25, 26, 37, 38, 49, 50, 61, 62, 73, 74, 85, 86, 97, 98, 109, 110, 121, 122, 133, 134, 145, 146, 157, 158, 169, 170, 181, 182, 193, 194, 205, 206, 217, 218, 229, 230, 241, 242, 253, 254, 265, 266, 277, 278, 289, 290, 301, 302, 313, 314
Offset: 1

Views

Author

Keywords

Comments

The old definition of this sequence was "a(n) = least positive integer > a(n-1) and not equal to a(i)+a(j)+a(k) for 1<=i<=j<=k<=n". However, Ralf Stephan observes that this does not fit the terms shown. The present definition (due to Stephan) has been adopted as a temporary solution. - N. J. A. Sloane, Nov 24 2004
Regarding the old definition, see Comments at A047239. - Clark Kimberling, Oct 09 2019

Crossrefs

Programs

  • Mathematica
    p = {1, 2, 3, 7}; r = 12 Range[200]; Union[p, 1 + r, 2 + r] (* Clark Kimberling, Oct 10 2019 *)
  • PARI
    Vec(x*(1 + x + 3*x^3 + 5*x^4 - 3*x^5 + 5*x^6) / ((1 - x)^2*(1 + x)) + O(x^40)) \\ Colin Barker, Oct 20 2019

Formula

From Colin Barker, Oct 10 2019: (Start)
G.f.: x*(1 + x + 3*x^3 + 5*x^4 - 3*x^5 + 5*x^6) / ((1 - x)^2*(1 + x)).
a(n) = a(n-1) + a(n-2) - a(n-3) for n>6.
a(n) = -(39/2) - (5*(-1)^n)/2 + 6*n for n>4.
(End)

Extensions

More terms from Clark Kimberling, Oct 10 2019

A272205 A bisection of the primes congruent to 1 modulo 3 (A002476). This is the part depending on the corresponding A001479 entry being congruent to 4 or 5 modulo 6.

Original entry on oeis.org

19, 37, 43, 73, 103, 127, 163, 229, 283, 313, 331, 337, 379, 397, 421, 457, 463, 487, 499, 523, 541, 577, 607, 613, 619, 631, 691, 709, 727, 787, 811, 829, 853, 859, 877, 883, 967, 991, 997
Offset: 1

Views

Author

Wolfdieter Lang, May 05 2016

Keywords

Comments

The other part of this bisection appears in A272204.
Each prime == 1 (mod 3) has a unique representation A002476(m) = A(m)^2 + 3*B(m)^2 with positive A(m) = A001479(m+1) and B(m) = A001480(m+1), m >= 1. The present sequence gives such primes corresponding to A(m) == 4, 5 (mod 6). The ones corresponding to A(m) == 1, 2 (mod 6) (the complement) are given in A272205.
The corresponding A001479 entries are 4, 5, 4, 5, 10, 10, 4, 11, 16, 11, 16, 17, 4, 17, 11, 5, 10, 22, 16, 4, 23, 23, 10, 5, 16, 22, 4, 11, 22, 28, 28, 23, 29, 28, 17, 4, 10, 22, 5, ...
See A272204 for a comment on the relevance of this bisection in connection with the signs of the q-expansion coefficients of the modular cusp form eta^{12}(12*z) / (eta^4(6*z)*eta^4(24*z)).

Crossrefs

Cf. A001479, A001480, A002476, A047239, A187076, A272203, A272204 (complement relative to A002476).

Formula

This sequence collects the 1 (mod 3) primes p(m) = A002476(m) = A(m)^2 + 3*B(m)^2 with positive A(m) == 4, 5 (mod 6), for m >= 1. A(m) = A001479(m+1).

A047230 Numbers that are congruent to {3, 4} mod 6.

Original entry on oeis.org

3, 4, 9, 10, 15, 16, 21, 22, 27, 28, 33, 34, 39, 40, 45, 46, 51, 52, 57, 58, 63, 64, 69, 70, 75, 76, 81, 82, 87, 88, 93, 94, 99, 100, 105, 106, 111, 112, 117, 118, 123, 124, 129, 130, 135, 136, 141, 142, 147, 148
Offset: 1

Views

Author

Keywords

Comments

If a(n) = the n-th Towers of Hanoi move, the smallest disc (#1) is on peg B. (Cf. A047264, A047239). For TOH moves 1 and 2, disc #1 is on peg C. For moves 3 and 4, it's on peg B, and for moves 5 and 6, it's on peg A. The cycle continues CBACBACBA... for moves (7,8), (9,10), (11,12), etc. So disc #1 is on peg B for TOH moves (3, 4, 9, 10, 15, 16, ...). - Gary W. Adamson Jun 22 2012

Programs

  • Mathematica
    LinearRecurrence[{1,1,-1},{3,4,9},50] (* Harvey P. Dale, Dec 04 2018 *)
  • PARI
    a(n) = 3*n - 1 - (-1)^n \\ David Lovler, Aug 25 2022

Formula

a(n) = 6*n - a(n-1) - 5 (with a(1)=3). - Vincenzo Librandi, Aug 05 2010
From R. J. Mathar, Oct 08 2011: (Start)
a(n) = 3*n - 1 - (-1)^n.
G.f.: ( x*(3+x+2*x^2) ) / ( (1+x)*(x-1)^2 ).
(End)
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(12*sqrt(3)) + log(2)/3 - log(3)/4. - Amiram Eldar, Dec 13 2021
E.g.f.: 2 + 3*x*exp(x) - 2*cosh(x). - David Lovler, Aug 25 2022

A272204 A bisection of the primes congruent to 1 modulo 3 (A002476). This is the part depending on the corresponding A001479 entry being congruent to 1 or 2 modulo 6.

Original entry on oeis.org

7, 13, 31, 61, 67, 79, 97, 109, 139, 151, 157, 181, 193, 199, 211, 223, 241, 271, 277, 307, 349, 367, 373, 409, 433, 439, 547, 571, 601, 643, 661, 673, 733, 739, 751, 757, 769, 823, 907, 919, 937
Offset: 1

Views

Author

Wolfdieter Lang, May 05 2016

Keywords

Comments

The other part of this bisection appears in A272205.
Each prime == 1 (mod 3) has a unique representation A002476(m) = A(m)^2 + 3*B(m)^2 with positive A(m) = A001479(m+1) and B(m) = A001480(m+1), m >= 1. The present sequence gives all such primes corresponding to A(m) == 1, 2 (mod 6). The ones corresponding to A(m) not == 1, 2 (mod 6) (the complement), that is == 4, 5 (mod 6), are given in A272205.
The corresponding A001479 entries are 2, 1, 2, 7, 8, 2, 7, 1, 8, 2, 7, 13, 1, 14, 8, 14, 7, 14, 13, 8, 7, 2, 19, 19, 1, 14, 20, 8, 13, 20, 19, 25, 25, 8, 26, 13, 1, 26, 20, 26, 13, ...
This bisection of the 1 (mod 3) primes A002476 is needed to determine the sign in the formula for the coefficients of the q-expansion (q = exp(2*Pi*i*z), Im(z) > 0) of the modular weight 2 cusp form
eta^{12}(12*z) / (eta^4(6*z)*eta^4(24*z)) |A187076%20which%20gives%20the%20coefficients%20of%20the%20q-expansion%20of%20F(q)%20=%20Eta(q%5E%7B1/6%7D)%20/%20q%5E%7B1/6%7D%20=%20Product">{z=z(q)} =: Eta(q) with Dedekind's eta function. See A187076 which gives the coefficients of the q-expansion of F(q) = Eta(q^{1/6}) / q^{1/6} = Product{m>=0} (1 - q^(2*m))^{12} / ((1 - q^m)*(1 - q^(4*m)))^4. The q-expansion coefficients (called b(n)) of the modular cusp form are given there using multiplicativity. Note that there x can also be negative, whereas here A is positive.

Crossrefs

Cf. A001479, A001480, A002476, A047239, A187076, A272203, A272205 (complement relative to A002476).

Formula

This sequence collects the 1 (mod 3) primes p(m) = A002476(m) = A(m)^2 + 3*B(m)^2 with positive A(m) == 1, 2 (mod 6), for m >= 1. A(m) = A001479(m+1).

A047250 Numbers that are congruent to {0, 3, 4, 5} (mod 6).

Original entry on oeis.org

0, 3, 4, 5, 6, 9, 10, 11, 12, 15, 16, 17, 18, 21, 22, 23, 24, 27, 28, 29, 30, 33, 34, 35, 36, 39, 40, 41, 42, 45, 46, 47, 48, 51, 52, 53, 54, 57, 58, 59, 60, 63, 64, 65, 66, 69, 70, 71, 72, 75, 76, 77, 78, 81, 82, 83, 84, 87, 88, 89, 90, 93, 94, 95, 96, 99
Offset: 1

Views

Author

Keywords

Comments

The sequence is the interleaving of A047233 with A047270. - Guenther Schrack, Feb 15 2019

Crossrefs

Complement: A047239.

Programs

  • Magma
    [n : n in [0..150] | n mod 6 in [0, 3, 4, 5]]; // Wesley Ivan Hurt, Jun 02 2016
    
  • Maple
    A047250:=n->(6*n-3+I^(2*n)-(1+I)*I^(-n)-(1-I)*I^n)/4: seq(A047250(n), n=1..100); # Wesley Ivan Hurt, Jun 02 2016
  • Mathematica
    Select[Range[0,100], MemberQ[{0,3,4,5}, Mod[#,6]]&] (* or *) LinearRecurrence[{1,0,0,1,-1}, {0,3,4,5,6}, 60] (* Harvey P. Dale, Apr 01 2013 *)
  • PARI
    my(x='x+O('x^70)); concat([0], Vec(x^2*(3+x+x^2+x^3)/((1+x)*(1+x^2)*(1-x)^2))) \\ G. C. Greubel, Feb 16 2019
    
  • Sage
    a=(x^2*(3+x+x^2+x^3)/((1+x)*(1+x^2)*(1-x)^2)).series(x, 72).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Feb 16 2019

Formula

G.f.: x^2*(3+x+x^2+x^3)/((1+x)*(1+x^2)*(1-x)^2). - R. J. Mathar, Oct 08 2011
From Wesley Ivan Hurt, Jun 02 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(n) = (6*n - 3 + i^(2*n) - (1+i)*i^(-n) - (1-i)*i^n)/4 where i=sqrt(-1).
a(2*k) = A047270(k), a(2*k-1) = A047233(k). (End)
E.g.f.: (2 - sin(x) - cos(x) + (3*x - 2)*sinh(x) + (3*x - 1)*cosh(x))/2. - Ilya Gutkovskiy, Jun 02 2016
From Guenther Schrack, Feb 15 2019: (Start)
a(n) = (6*n - 3 + (-1)^n - 2*(-1)^(n*(n-1)/2))/4.
a(n) = a(n-4) + 6, a(1)=0, a(2)=3, a(3)=4, a(4)=5, for n > 4.
a(-n) = -A047246(n+2). (End)
Sum_{n>=2} (-1)^n/a(n) = 2*log(2)/3 - Pi/(6*sqrt(3)). - Amiram Eldar, Dec 17 2021

A304723 a(n) = 5^(n-1)*(3^n - 1)/2.

Original entry on oeis.org

0, 1, 20, 325, 5000, 75625, 1137500, 17078125, 256250000, 3844140625, 57664062500, 864970703125, 12974609375000, 194619384765625, 2919291992187500, 43789385986328125, 656840820312500000, 9852612457275390625, 147789187622070312500, 2216837818145751953125, 33252567291259765625000
Offset: 0

Views

Author

Vincenzo Librandi, May 22 2018

Keywords

Comments

It is easy to prove that when a(n) is divisible by 7 it is also divisible by 13, but the converse does not always hold. - Bruno Berselli, May 22 2018

Crossrefs

Subsequence of A047239 (after 0).

Programs

  • Magma
    [5^(n-1)*(3^n-1)/2: n in [0..20]];
    
  • Mathematica
    Table[5^(n - 1) (3^n - 1)/2, {n, 0, 25}]
  • PARI
    a(n) = 5^(n-1) * (3^n - 1) / 2 \\ Felix Fröhlich, May 22 2018

Formula

O.g.f.: x/((1 - 5*x)*(1 - 15*x)).
E.g.f.: (-1 + exp(10*x))*exp(5*x)/10. - Bruno Berselli, May 22 2018
a(n) = 20*a(n-1) - 75*a(n-2), n>1.
Showing 1-7 of 7 results.