Displaying 1-10 of 112 results found.
page
1
2
3
4
5
6
7
8
9
10
11
12
Concatenation of all 01-words, in the order induced by A032766; see Comments.
+20
37
0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1
COMMENTS
Let s = (s(n)) be a strictly increasing sequence of positive integers with infinite complement, t = (t(n)).
For n >= 1, let s'(n) be the number of s(i) that are <= n-1 and let t'(n) be the number of t(i) that are <= n-1.
Define w(1) = 0, w(t(1)) = 1, and w(n) = 0w(s'(n)) if n is in s, and w(n) = 1w(t'(n)) if n is in t. Then (w(n)) is the "s-induced ordering" of all 01-words.
In the following list, W represents the sequence of words w(n) induced by A032766. The list includes five partitions and a self-inverse permutation of the positive integers.
positions in W of words w(n) such that # 0's = # 1's: A344151;
positions in W of words w(n) such that # 0's < # 1's: A344152;
positions in W of words w(n) such that # 0's > # 1's: A344153;
positions in W of words w(n) that end with 0: A344154;
positions in W of words w(n) that end with 1: A344155;
positions in W of words w(n) such that first digit = last digit: A344156;
positions in W of words w(n) such that first digit != last digit: A344157;
positions in W of words w(n) such that 1st digit = 0 and last digit 0: A344158;
positions in W of words w(n) such that 1st digit = 0 and last digit 1: A344159;
positions in W of words w(n) such that 1st digit = 1 and last digit 0: A344160;
positions in W of words w(n) such that 1st digit = 1 and last digit 1: A344161;
position in W of n-th positive integer (base 2): A344162;
positions in W of binary complement of w(n): A344163;
positions in W of palindromes: A344166;
positions in W of words such that #0's - #1's is odd: A344167;
positions in W of words such that #0's - #1's is even: A344168;
positions in W of the reversal of the n-th word in W: A344169.
For a guide to related sequences, see A341256.
EXAMPLE
The first twenty words w(n): 0, 1, 00, 01, 10, 000, 001, 11, 010, 0000, 100, 0001, 011, 101, 0010, 00000, 110, 0100, 00001, 1000.
MATHEMATICA
z = 250;
"The sequence s:" (* A001651, (3n/2) *)
s = Table[Floor[3 n/2], {n, 1, z}]
"The sequence t:" (* A016789; congr to 0 or 1 mod 3; *)
t = Complement[Range[Max[s]], s]
s1[n_] := Length[Intersection[Range[n - 1], s]];
t1[n_] := n - 1 - s1[n];
"The sequence s1:"
Table[s1[n], {n, 1, z}] (* A004396 *)
"The sequence t1:"
Table[t1[n], {n, 1, z}] (* A002264 *)
w[1] = {0}; w[t[[1]]] = {1};
w[n_] := If[MemberQ[s, n], Join[{0}, w[s1[n]]], Join[{1}, w[t1[n]]]]
"List tt of all binary words:"
tt = Table[w[n], {n, 1, z}] (* all the binary words *)
"All the words, concatenated:"
Flatten[tt] (* words, concatenated, A344150 *)
"Positions of words in which #0's = #1's:" (* A344151 *)
Select[Range[Length[tt]], Count[tt[[#]], 0] == Count[tt[[#]], 1] &]
"Positions of words in which #0's < #1's:" (* A344152 *)
Select[Range[Length[tt]], Count[tt[[#]], 0] < Count[tt[[#]], 1] &]
"Positions of words in which #0's > #1's:" (* A344153 *)
Select[Range[Length[tt]], Count[tt[[#]], 0] > Count[tt[[#]], 1] &]
"Positions of words ending with 0:" (* A344154 *)
Select[Range[Length[tt]], Last[tt[[#]]] == 0 &]
"Positions of words ending with 1:" (* A344155 *)
Select[Range[Length[tt]], Last[tt[[#]]] == 1 &]
"Positions of words starting and ending with same digit:" (* A344156 *)
Select[Range[Length[tt]], First[tt[[#]]] == Last[tt[[#]]] &]
"Positions of words starting and ending with opposite digits:" (* A344157 *)
Select[Range[Length[tt]], First[tt[[#]]] != Last[tt[[#]]] &]
"Positions of words starting with 0 and ending with 0:" (* A344158 *)
Select[Range[Length[tt]], First[tt[[#]]] == 0 && Last[tt[[#]]] == 0 &]
"Positions of words starting with 0 and ending with 1:" (* A344159 *)
Select[Range[Length[tt]], First[tt[[#]]] == 0 && Last[tt[[#]]] == 1 &]
"Positions of words starting with 1 and ending with 0:" (* A344160 *)
Select[Range[Length[tt]], First[tt[[#]]] == 1 && Last[tt[[#]]] == 0 &]
"Positions of words starting with 1 and ending with 1:" (* A344161 *)
Select[Range[Length[tt]], First[tt[[#]]] == 1 && Last[tt[[#]]] == 1 &]
"Position of n-th positive integer (base 2) in tt: A344162 "
d[n_] := If[First[w[n]] == 1, FromDigits[w[n], 2]];
Flatten[Table[Position[Table[d[n], {n, 1, 200}], n], {n, 1, 200}]]
"Position of binary complement of w(n): A344163"
comp = Flatten[Table[Position[tt, 1 - w[n]], {n, 1, 50}]]
Table[Total[w[n]], {n, 1, 100}]
Map[Length, Table[Map[Length, Split[w[n]]], {n, 1, 100}]]
"Palindromes:"
Select[tt, # == Reverse[#] &]
"Positions of palindromes: A344166"
Select[Range[Length[tt]], tt[[#]] == Reverse[tt[[#]]] &]
"Positions of words in which #0's - #1's is odd: A344167"
Select[Range[Length[tt]], OddQ[Count[w[#], 0] - Count[w[#], 1]] &]
"Positions of words in which #0's - #1's is even: A344168"
Select[Range[Length[tt]], EvenQ[Count[w[#], 0] - Count[w[#], 1]] &]
"Position of the reversal of the n-th word: A344169"
Flatten[Table[Position[tt, Reverse[w[n]]], {n, 1, 150}]]
Expansion of series_reversion( x/(1 + sum(k>=1, x^ A032766(k)) ) ) / x.
+20
12
1, 1, 1, 2, 6, 16, 40, 107, 307, 893, 2597, 7646, 22878, 69162, 210402, 644098, 1984598, 6149428, 19143220, 59840692, 187781992, 591343894, 1868106990, 5918537492, 18800935948, 59869902152, 191081899648, 611138052146, 1958410654202, 6287175115130, 20218209139666, 65120537016867
COMMENTS
Number of Dyck n-paths avoiding ascents of length == 2 mod 3, see example. - David Scambler, Apr 16 2013
This is a special case of the following: let S be a set of positive numbers, r(x) = x/(1 + sum(e in S, x^e)), and f(x)=series_reversion(r(x)) / x, then f is the g.f. for the number of Dyck words of semilength n with substrings UUU...UU only of lengths e in S (that is, all ascent lengths are in S). [ Joerg Arndt, Apr 16 2013]
FORMULA
G.f. A(x) satisfies 0 = -x^3*A(x)^4 + (-x + 1)*A(x) - 1. [ Joerg Arndt, Mar 01 2014]
Recurrence: 27*(n-1)*n*(n+1)*(2*n-5)*(4*n-11)*(4*n-7)*a(n) = 9*(n-1)*n*(4*n-11)*(96*n^3 - 456*n^2 + 616*n - 197)*a(n-1) - 3*(n-1)*(1728*n^5 - 15552*n^4 + 53164*n^3 - 85322*n^2 + 63369*n - 17010)*a(n-2) + (4*n-9)*(4*n-3)*(728*n^4 - 6188*n^3 + 19267*n^2 - 25987*n + 12810)*a(n-3) - 3*(n-3)*(2*n-3)*(3*n-10)*(3*n-8)*(4*n-7)*(4*n-3)*a(n-4). - Vaclav Kotesovec, Mar 22 2014
a(n) ~ sqrt(2*(3+r)/(3*(1-r)^3)) / (3*sqrt(Pi)*n^(3/2)*r^n), where r = 0.295932936709444136... is the root of the equation 27*(1-r)^4 = 256*r^3. - Vaclav Kotesovec, Mar 22 2014
a(n) = 1/(n + 1)*Sum_{k = 0..floor(n/3)} binomial(n + 1, n - 3*k)*binomial(n + k, n). - Peter Bala, Aug 02 2016
EXAMPLE
The 16 Dyck words of semilength 5 without substrings UUU..UU of length 2, 5, 8, etc. (using '1' for U and '.' for D) are
01: 1.1.1.1.1.
02: 1.1.111...
03: 1.111...1.
04: 1.111..1..
05: 1.111.1...
06: 1.1111....
07: 111...1.1.
08: 111..1..1.
09: 111..1.1..
10: 111.1...1.
11: 111.1..1..
12: 111.1.1...
13: 1111....1.
14: 1111...1..
15: 1111..1...
16: 1111.1....
MAPLE
b:= proc(x, y, t) option remember;
`if`(y<x, 0, `if`(y=0, `if`(t=2, 0, 1),
`if`(x>0 and t<>2, b(x-1, y, 0), 0)+b(x, y-1, irem(t+1, 3))))
end:
a:= n-> b(n, n, 0):
MATHEMATICA
b[x_, y_, t_] := b[x, y, t] = If[y<x, 0, If[y==0, If[t==2, 0, 1], If[x>0 && t != 2, b[x-1, y, 0], 0] + b[x, y-1, Mod[t+1, 3]]]]; a[n_] := b[n, n, 0]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Apr 08 2015, after Alois P. Heinz *)
PROG
(PARI)
N = 66; x = 'x + O('x^N);
rf = x/(1+sum(n=1, N, ((n%3)!=2)*x^n ) );
gf = serreverse(rf)/x;
v = Vec(gf)
EXTENSIONS
Modified definition to obtain offset 0 for combinatorial interpretation, Joerg Arndt, Apr 16 2013
1, 3, 4, 5, 6, 7, 8, 10, 17, 11, 13, 26, 14, 15, 16, 18, 41, 20, 31, 21, 23, 40, 24, 25, 27, 48, 28, 30, 45, 33, 63, 54, 34, 35, 36, 37, 38, 43, 68, 70, 57, 115, 44, 46, 85, 47, 50, 74, 73, 51, 53, 87, 55, 107, 56, 58, 97, 60, 180, 61, 64, 96, 83, 65, 66, 67, 71, 114, 101, 100, 75, 110, 136, 108, 76, 77, 78, 80, 124, 81
MATHEMATICA
t = PositionIndex[FactorInteger[#][[1, 1]] & /@ Range[10^6]]; f[n_] := Times @@ Power[If[# == 1, 1, NextPrime@ #] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n; Flatten@ Map[Position[Lookup[t, FactorInteger[#][[1, 1]]], #] &[f@ f[2 #]] &, Map[Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@#, Last@#] &@ Transpose@ FactorInteger[2 # - 1] &, Floor[#/2] + # & /@ Range@ 80]] (* Michael De Vlieger, Aug 07 2016, Version 10 *)
CROSSREFS
Cf. also A273669 (natural numbers not in this sequence).
Zero-one sequence based on the sequence (3k-1): a( A016789(k))=a(k); a( A032766(k))=1-a(k), a(1)=0.
+20
4
1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1
MATHEMATICA
a[1] = 0; h = 128;
c = (u[#1] &) /@ Range[2h];
d = (Complement[Range[Max[#1]], #1] &)[c]; (* A032766*)
Table[a[d[[n]]] = 1 - a[n], {n, 1, h - 1}]; (* A189097*)
Table[a[c[[n]]] = a[n], {n, 1, h}] (* A189097*)
Flatten[Position[%, 0]] (* A189098*)
Flatten[Position[%%, 1]] (* A189099*)
1, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 33, 34, 36
1, 0, 4, 9, 3, 8, 18, 7, 17, 6, 16, 37, 15, 36, 14, 35, 13, 34, 12, 33, 11, 32, 74, 31, 73, 30, 72, 29, 71, 28, 70, 27, 69, 26, 68, 25, 67, 24, 66, 23, 65, 22, 64, 149, 63, 148, 62, 147, 61, 146, 60, 145, 59, 144, 58, 143, 57, 142, 56, 141, 55, 140, 54, 139
COMMENTS
- starts with zero or more occurrences of "10",
- followed by a "0" when the binary expansion of a(n) starts with zero or more occurrences of "10" followed by "11",
- ends with the binary expansion of a(n) (assuming that 0 has an empty binary expansion).
EXAMPLE
The first terms, alongside the binary expansions of A032766(n) and a(n), are:
-- ---- --------------- ---------
0 1 0 1
1 0 1 0
2 4 11 100
3 9 100 1001
4 3 110 11
5 8 111 1000
6 18 1001 10010
7 7 1010 111
8 17 1100 10001
9 6 1101 110
10 16 1111 10000
11 37 10000 100101
PROG
(PARI) a(n) = { if (n<=1, return (1-n), n+=n\2; for (x=2+exponent(n), oo, my (k=bitneg(n, x)); if (k%3==0, return (k/3)))) }
Square array T(n,k), n>=0, k>=0, read by antidiagonals, where T(0,k) is A032766(k) and T(n,k) = 3*T(n-1,k) + 2 for n>0.
+20
0
0, 1, 2, 3, 5, 8, 4, 11, 17, 26, 6, 14, 35, 53, 80, 7, 20, 44, 107, 161, 242, 9, 23, 62, 134, 323, 485, 728, 10, 29, 71, 188, 404, 971, 1457, 2186, 12, 32, 89, 215, 566, 1214, 2915, 4373, 6560, 13, 28, 98, 269, 647, 1700, 3644, 8747, 13121, 19682, 15, 41, 116
COMMENTS
Permutation of nonnegative integers.
FORMULA
T(n,k) = T(0,k)*3^n + T(n,0) where T(0,k) = A032766(k) and T(n,0) = 3^n - 1 = A024023(n).
EXAMPLE
Square array begins:
0, 1, 3, 4, 6, 7, 9, 10, ...
2, 5, 11, 14, 20, 23, 29, 32, ...
8, 17, 35, 44, 62, 71, 89, 98, ...
26, 53, 107, 134, 188, 215, 269, 296, ...
80, 161, 323, 404, 566, 647, 809, 890, ...
242, 485, 971, 1214, 1700, 1943, 2429, 2672, ...
728, 1457, 2915, 3644, 5102, 5831, 7289, 8018, ...
2186, 4373, 8747, 10934, 15308, 17495, 21869, 24056, ...
...
Numbers not divisible by 3.
(Formerly M0957 N0357)
+10
200
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
COMMENTS
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
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
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
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
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
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).
LINKS
Aneta Dudek, Gyula Y. Katona, and A.Pawel Wojda, m_Path Cover Saturated Graphs, Electronic Notes in Discrete Math., Vol. 13 (April 2003), pp. 41-44.
Brian Hopkins, Euler's Enumerations, Enumerative Combinatorics and Applications, Vol. 1, No. 1 (2021), Article #S1H1.
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(1) = 1, a(n) = 2*a(n-1) - 3*floor(a(n-1)/3). - Benoit Cloitre, Aug 17 2002
Nearest integer to (Sum_{k>=n} 1/k^3)/(Sum_{k>=n} 1/k^4). - Benoit Cloitre, Jun 12 2003
Euler transform of length 3 sequence [2, 1, -1]. - Michael Somos, Sep 06 2008
a(n) = 3*floor(n/2) + (-1)^(n+1). - Gary Detlefs, Dec 29 2011
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
EXAMPLE
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 + ...
MAPLE
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
Drop[Range[200 + 1], {1, -1, 3}] - 1 (* József Konczer, May 24 2016 *)
CoefficientList[Series[(x^2 + x + 1)/((x - 1)^2 (x + 1)), {x, 0, 70}],
x] (* or *)
PROG
(PARI) x='x+O('x^100); Vec(x*(1+x+x^2)/((1-x)*(1-x^2))) \\ Altug Alkan, Oct 22 2015
(Haskell)
a001651 = (`div` 2) . (subtract 1) . (* 3)
a001651_list = filter ((/= 0) . (`mod` 3)) [1..]
(GAP) Filtered([0..110], n->n mod 3<>0); # Muniru A Asiru, Jul 24 2018
(Python)
(Python)
CROSSREFS
Cf. A000726, A001082, A003105, A005408 (n=1 or 3 mod 4), A007494, A008585 (complement), A011655, A026386, A032766, A073010, A191967, A225227, A004526.
Cf. A000027, A000217, A000292, A000982, A001477, A008619, A014437, A040001, A047239, A047257, A077043, A084858, A113801, A141425, A215879.
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
2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80, 83, 86, 89, 92, 95, 98, 101, 104, 107, 110, 113, 116, 119, 122, 125, 128, 131, 134, 137, 140, 143, 146, 149, 152, 155, 158, 161, 164, 167, 170, 173, 176, 179
COMMENTS
Except for 1, n such that Sum_{k=1..n} (k mod 3)*binomial(n,k) is a power of 2. - Benoit Cloitre, Oct 17 2002
The sequence 0,0,2,0,0,5,0,0,8,... has a(n) = n*(1 + cos(2*Pi*n/3 + Pi/3) - sqrt(3)*sin(2*Pi*n + Pi/3))/3 and o.g.f. x^2(2+x^3)/(1-x^3)^2. - Paul Barry, Jan 28 2004 [ Artur Jasinski, Dec 11 2007, remarks that this should read (3*n + 2)*(1 + cos(2*Pi*(3*n + 2)/3 + Pi/3) - sqrt(3)*sin(2*Pi*(3*n + 2)/3 + Pi/3))/3.]
Except for 2, exponents e such that x^e + x + 1 is reducible. - N. J. A. Sloane, Jul 19 2005
The trajectory of these numbers under iteration of sum of cubes of digits eventually turns out to be 371 or 407 (47 is the first of the second kind). - Avik Roy (avik_3.1416(AT)yahoo.co.in), Jan 19 2009
a(n) is the set of numbers congruent to {2,5,8} mod 9. - Gary Detlefs, Mar 07 2010
It appears that a(n) is the set of all values of y such that y^3 = k*n + 2 for integer k. - Gary Detlefs, Mar 08 2010
a(n-1), n >= 1, is also the complex dimension of the manifold E(S), the set of all second-order irreducible Fuchsian differential equations defined on P^1 = C U {oo}, having singular points at most in S = {a_1, ..., a_n, a_{n+1} = oo}, a subset of P^1. See the Iwasaki et al. reference, Proposition 2.1.3., p. 149. - Wolfdieter Lang, Apr 22 2016
Except for 2, exponents for which 1 + x^(n-1) + x^n is reducible. - Ron Knott, Sep 16 2016
The reciprocal sum of 8 distinct items from this sequence can be made equal to 1, with these terms: 2, 5, 8, 14, 20, 35, 41, 1640. - Jinyuan Wang, Nov 16 2018
There are no positive integers x, y, z such that 1/a(x) = 1/a(y) + 1/a(z). - Jinyuan Wang, Dec 31 2018
As a set of positive integers, it is the set sum S + S where S is the set of numbers in A016777. - Michael Somos, May 27 2019
Prepended with {1}, these are the denominators of the elements of the 3x+1 semigroup, the numerators being A005408 prepended with {2}. See Applegate and Lagarias link for more information. - Paolo Xausa, Nov 20 2021
This is also the maximum number of moves starting with n + 1 dots in the game of Sprouts. - Douglas Boffey, Aug 01 2022 [See the Wikipedia link. - Wolfdieter Lang, Sep 29 2022]
a(n-2) is the maximum sum of the span (or L(2,1)-labeling number) of a graph of order n and its complement. The extremal graphs are stars and their complements. For example, K_{1,2} has span 3, and K_2 has span 2. Thus a(3-1) = 5. - Allan Bickle, Apr 20 2023
REFERENCES
K. Iwasaki, H. Kimura, S. Shimomura and M. Yoshida, From Gauss to Painlevé, Vieweg, 1991. p. 149.
Konrad Knopp, Theory and Application of Infinite Series, Dover, p. 269
LINKS
D. Applegate and J. C. Lagarias, The 3x+1 semigroup, Journal of Number Theory, Vol. 177, Issue 1, March 2006, pp. 146-159; see also the arXiv version, arXiv:math/0411140 [math.NT], 2004-2005.
FORMULA
G.f.: (2+x)/(1-x)^2.
a(n) = 3 + a(n-1).
Sum_{n>=1} (-1)^n/a(n) = (1/3)*(Pi/sqrt(3) - log(2)). - Benoit Cloitre, Apr 05 2002
1/2 - 1/5 + 1/8 - 1/11 + ... = (1/3)*(Pi/sqrt(3) - log 2). [Jolley] - Gary W. Adamson, Dec 16 2006
Sum_{n>=0} 1/(a(2*n)*a(2*n+1)) = (Pi/sqrt(3) - log 2)/9 = 0.12451569... (see A196548). [Jolley p. 48 eq (263)]
Conjecture: a(n) = n XOR A005351(n+1) XOR A005352(n+1). - Gilian Breysens, Jul 21 2017
EXAMPLE
G.f. = 2 + 5*x + 8*x^2 + 11*x^3 + 14*x^4 + 17*x^5 + 20*x^6 + ... - Michael Somos, May 27 2019
MATHEMATICA
LinearRecurrence[{2, -1}, {2, 5}, 70] (* Harvey P. Dale, Aug 11 2021 *)
PROG
(Haskell)
(PARI) vector(100, n, 3*n-1) \\ Derek Orr, Apr 13 2015
(Python) for n in range(0, 100): print(3*n+2, end=', ') # Stefano Spezia, Nov 21 2018
CROSSREFS
Cf. A002939, A017041, A017485, A125202, A017233, A179896, A017617, A016957, A008544 (partial products), A032766, A016777, A124388, A005351.
Cf. similar sequences with closed form (2*k-1)*n+k listed in A269044.
Period 2: repeat [1, 2]; a(n) = 1 + (n mod 2).
(Formerly M0089)
+10
136
1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2
COMMENTS
The sequence 1,-2,-1,2,1,-2,-1,2,... with g.f. (1-2x)/(1+x^2) has a(n) = cos(Pi*n/2)-2*sin(Pi*n/2). - Paul Barry, Oct 18 2004
Hankel transform is [1,-3,0,0,0,0,0,0,0,...]. - Philippe Deléham, Mar 29 2007
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=A[i,i]:=1, A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=1, a(n-1) = charpoly(A,2). - Milan Janjic, Jan 24 2010
Denominator of the harmonic mean of the first n triangular numbers. - Colin Barker, Nov 13 2014
This is the lexicographically earliest 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 [See A300002 for the case where not only consecutive terms are considered. - Pontus von Brömssen, Jan 03 2023]
Number of maximum antichains in the power set of {1,2,...,n} partially ordered by set inclusion. For even n, there is a unique maximum antichain formed by all subsets of size n/2; for odd n, there are two maximum antichains, one formed by all subsets of size (n-1)/2 and the other formed by all subsets of size (n+1)/2. See the David Guichard link below for a proof. - Jianing Song, Jun 19 2022
REFERENCES
Jozsef Beck, Combinatorial Games, Cambridge University Press, 2008.
J.-M. De Koninck and A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 545 pages 73 and 260, Ellipses, Paris 2004.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Glen Joyce C. Dulatre, Jamilah V. Alarcon, Vhenedict M. Florida and Daisy Ann A. Disu, On Fractal Sequences, DMMMSU-CAS Science Monitor (2016-2017) Vol. 15 No. 2, 109-113.
FORMULA
G.f.: (1+2*x)/(1-x^2).
a(n) = 2^((1-(-1)^n)/2) = 2^(ceiling(n/2) - floor(n/2)). - Paul Barry, Jun 03 2003
a(n) = (3-(-1)^n)/2; a(n) = 1 + (n mod 2) = 3-a(n-1) = a(n-2) = a(-n).
a(n) = if(n=0,1,if(mod(a(n-1),2)=0,a(n-1)/2,(3*a(n-1)+1)/2)). See Collatz conjecture. - Paul Barry, Mar 31 2008
Dirichlet g.f.: zeta(s)*(1 + 1/2^s). - Mats Granvik, Jul 18 2016
Limit_{n->oo} (1/n)*Sum_{k=1..n} a(k) = 3/2 (De Koninck reference). - Bernard Schott, Nov 09 2021
MATHEMATICA
Nest[ Flatten[# /. { 0 -> {1}, 1 -> {2}, 2 -> {1, 2, 1} }] &, {1}, 8] (* Robert G. Wilson v, May 20 2014 *)
PROG
(PARI) a(n)=1+n%2
(Haskell)
a000034 = (+ 1) . (`mod` 2)
a000034_list = cycle [1, 2]
(Python)
CROSSREFS
Cf. A000035, A003945 (binomial transf), A007089, A010693, A010704, A010888, A032766, A040001, A123344, A134451, A300002.
Cf. sequences listed in Comments section of A283393.
Search completed in 0.072 seconds
|