[go: up one dir, main page]

login
Search: a032766 -id:a032766
     Sort: relevance | references | number | modified | created      Format: long | short | data
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
OFFSET
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.
s = A032766; t = A016789; s' = A004396; t' = A002264;
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.
length of w(n): A344150;
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;
sum of digits in w(n): A344164;
number of runs in w(n): A344165;
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}]]
"Sum of digits of w(n): A344164"
Table[Total[w[n]], {n, 1, 100}]
"Number of runs in w(n): A344165"
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}]]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Clark Kimberling, May 11 2021
STATUS
approved
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
OFFSET
0,4
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]
LINKS
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....
- Joerg Arndt, Apr 16 2013
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):
seq(a(n), n=0..40); # Alois P. Heinz, Apr 16 2013
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)
CROSSREFS
Cf. A215341.
KEYWORD
nonn,easy
AUTHOR
Joerg Arndt, Aug 19 2012
EXTENSIONS
Modified definition to obtain offset 0 for combinatorial interpretation, Joerg Arndt, Apr 16 2013
STATUS
approved
a(n) = A249746(A032766(n)).
+20
6
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
OFFSET
1,2
LINKS
FORMULA
a(n) = A249746(A032766(n)).
a(n) = A249824(A254050(n)).
a(n) = A249746(A254049(A249745(n))).
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 *)
PROG
(Scheme) (define (A273664 n) (A249746 (A032766 n)))
CROSSREFS
Cf. also A273669 (natural numbers not in this sequence).
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 06 2016
STATUS
approved
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
OFFSET
1
MATHEMATICA
u[n_] := 3n-1; (*A016789*)
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*)
KEYWORD
nonn
AUTHOR
Clark Kimberling, Apr 16 2011
STATUS
approved
Essentially the same as A032766.
+20
1
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
OFFSET
0,3
KEYWORD
dead
STATUS
approved
a(n) is the least k such that A359194(k) = A032766(n).
+20
1
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
OFFSET
0,3
COMMENTS
The binary expansion of numbers m such that A359194(m) = A032766(n):
- 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:
n a(n) bin(A032766(n)) bin(a(n))
-- ---- --------------- ---------
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)))) }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Dec 23 2022
STATUS
approved
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
OFFSET
0,3
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, ...
...
KEYWORD
nonn,tabl
AUTHOR
Philippe Deléham, Feb 20 2014
STATUS
approved
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
OFFSET
1,2
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
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
L. Carlitz, R. Scoville and T. Vaughan, Some arithmetic functions related to Fibonacci numbers, Fib. Quart., Vol. 11, No. 4 (1973), pp. 337-386.
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.
Marietjie Frick and Joy Singleton, Lower Bound for the Size of Maximal Nontraceable Graphs, Electron. J. Combin., 12#R32 (2005), 9 pp.
Aviezri S. Fraenkel, New games related to old and new sequences, INTEGERS, Electronic J. of Combinatorial Number Theory, Vol. 4, Paper G6, 2004. (See Table 5.)
Brian Hopkins, Euler's Enumerations, Enumerative Combinatorics and Applications, Vol. 1, No. 1 (2021), Article #S1H1.
G. Ledin, Jr., Is Eratosthenes out?, Fib. Quart., Vol. 6, No. 4 (1968), pp. 261-265.
Gerard P. Michon, Counting Polyhedra.
Melvyn B. Nathanson, On the fractional parts of roots of positive real numbers, Amer. Math. Monthly, Vol. 120, No. 5 (2013), pp. 409-429 [see p. 417].
M. A. Nyblom, Some curious sequences involving floor and ceiling functions, Am. Math. Monthly, Vol. 109, No. 6 (2002), pp. 559-564, Ex. 2.2.
Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992.
Marco Ripà, The rectangular spiral or the n1 X n2 X ... X nk Points Problem , Notes on Number Theory and Discrete Mathematics, Vol. 20, No. 1 (2014), pp. 59-71.
Eric Weisstein's World of Mathematics, Complete Bipartite Graph, Graph Bandwidth, and RATS Sequence.
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
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
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 *)
PROG
(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
(Magma) [3*(2*n-1)/4-(-1)^n/4: n in [1..80]]; // Vincenzo Librandi, Jun 07 2011
(Haskell)
a001651 = (`div` 2) . (subtract 1) . (* 3)
a001651_list = filter ((/= 0) . (`mod` 3)) [1..]
-- Reinhard Zumkeller, Jul 07 2012, Aug 23 2011
(GAP) Filtered([0..110], n->n mod 3<>0); # Muniru A Asiru, Jul 24 2018
(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
CROSSREFS
KEYWORD
nonn,easy
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
STATUS
approved
a(n) = 3*n + 2.
+10
194
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
OFFSET
0,1
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
Union of A165334 and A165335. - Reinhard Zumkeller, Sep 17 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
These numbers do not occur in A000217 (triangular numbers). - Arkadiusz Wesolowski, Jan 08 2012
A089911(2*a(n)) = 9. - Reinhard Zumkeller, Jul 05 2013
Also indices of even Bell numbers (A000110). - Enrique Pérez Herrero, Sep 10 2013
Central terms of the triangle A108872. - Reinhard Zumkeller, Oct 01 2014
A092942(a(n)) = 1 for n > 0. - Reinhard Zumkeller, Dec 13 2014
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
Interleaving of A016933 and A016969. - Leo Tavares, Nov 16 2021
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.
H. Balakrishnan and N. Deo, Parallel algorithm for radiocoloring a graph, Congr. Numer. 160 (2003), 193-204.
Allan Bickle, Extremal Decompositions for Nordhaus-Gaddum Theorems, Discrete Math, 346 7 (2023), 113392.
L. Euler, An observation on the sums of divisors, arXiv:math/0411587 [math.HO], 2004-2009, p. 9.
L. B. W. Jolley, Summation of Series, Dover, 1961, p. 16
Tanya Khovanova, Recursive Sequences
Konrad Knopp, Theorie und Anwendung der unendlichen Reihen, Berlin, J. Springer, 1922. (Original German edition of "Theory and Application of Infinite Series")
Luis Manuel Rivera, Integer sequences and k-commuting permutations, arXiv preprint arXiv:1406.3081 [math.CO], 2014-2015.
Wikipedia, Sprouts (game)
FORMULA
G.f.: (2+x)/(1-x)^2.
a(n) = 3 + a(n-1).
a(n) = 1 + A016777(n).
a(n) = A124388(n)/9.
a(n) = A125199(n+1,1). - Reinhard Zumkeller, Nov 24 2006
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)]
a(n) = 2*a(n-1) - a(n-2); a(0)=2, a(1)=5. - Philippe Deléham, Nov 03 2008
a(n) = 6*n - a(n-1) + 1 with a(0)=2. - Vincenzo Librandi, Aug 25 2010
Conjecture: a(n) = n XOR A005351(n+1) XOR A005352(n+1). - Gilian Breysens, Jul 21 2017
E.g.f.: (2 + 3*x)*exp(x). - G. C. Greubel, Nov 02 2018
a(n) = A005449(n+1) - A005449(n). - Jinyuan Wang, Feb 03 2019
a(n) = -A016777(-1-n) for all n in Z. - Michael Somos, May 27 2019
a(n) = A007310(n+1) + (1 - n mod 2). - Walt Rorie-Baety, Sep 13 2021
a(n) = A000096(n+1) - A000217(n-1). See Capped Triangular Frames illustration. - Leo Tavares, Oct 05 2021
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
MAPLE
seq(3*n+2, n = 0 .. 50); # Matt C. Anderson, May 18 2017
MATHEMATICA
Range[2, 500, 3] (* Vladimir Joseph Stephan Orlovsky, May 26 2011 *)
LinearRecurrence[{2, -1}, {2, 5}, 70] (* Harvey P. Dale, Aug 11 2021 *)
PROG
(Haskell)
a016789 = (+ 2) . (* 3) -- Reinhard Zumkeller, Jul 05 2013
(PARI) vector(100, n, 3*n-1) \\ Derek Orr, Apr 13 2015
(Magma) [3*n+2: n in [0..80]]; // Vincenzo Librandi, Apr 14 2015
(GAP) List([0..70], n->3*n+2); # Muniru A Asiru, Nov 02 2018
(Python) for n in range(0, 100): print(3*n+2, end=', ') # Stefano Spezia, Nov 21 2018
CROSSREFS
First differences of A005449.
Cf. A087370.
Cf. similar sequences with closed form (2*k-1)*n+k listed in A269044.
KEYWORD
nonn,easy
STATUS
approved
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
OFFSET
0,2
COMMENTS
Also continued fraction for (sqrt(3)+1)/2 (cf. A040001) and base-3 digital root of n+1 (cf. A007089, A010888). - Henry Bottomley, Jul 05 2001
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
4/33 = 0.121212... - Eric Desbiaux, Nov 03 2008
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
First differences of A032766. - Tom Edgar, Jul 17 2014
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
Paul Barry, On a Central Transform of Integer Sequences, arXiv:2004.04577 [math.CO], 2020.
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.
Daniele A. Gewurz and Francesca Merola, Sequences realized as Parker vectors of oligomorphic permutation groups, J. Integer Seqs., Vol. 6, 2003.
David Guichard, Sperner's Theorem
Agustín Moreno Cañadas, Hernán Giraldo and Robinson Julian Serna Vanegas, Some integer partitions induced by orbits of Dynkin type, Far East Journal of Mathematical Sciences (FJMS), Vol. 101, No. 12 (2017), pp. 2745-2766.
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) = gcd(n-1, n+1). - Paul Barry, Sep 16 2004
Binomial transform of A123344, inverse binomial transform of A003945. - Philippe Deléham, Jun 04 2007
a(n) = A134451(n+1). - Reinhard Zumkeller, Oct 27 2007
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
a(n) = 2^n (mod 3). - Vincenzo Librandi, Feb 05 2011
a(n) = A000035(n) + 1. - M. F. Hasler, Jan 13 2012
a(n) = abs(sin(n*Pi/2) - 2*cos(n*Pi/2)). - Mohammad K. Azarian, Mar 12 2012
a(n) = A010704(n) / 3. - Reinhard Zumkeller, Jul 03 2012
a(n) = floor((4/33)*10^(n+1)) mod 10. - Hieronymus Fischer, Jan 03 2013
a(n) = floor((5/8)*3^(n+1)) mod 3. - Hieronymus Fischer, Jan 03 2013
a(n) = floor((n+1)*3/2) - floor((n)*3/2). - Hailey R. Olafson, Jul 23 2014
a(n) = denominator(n/2). - Wesley Ivan Hurt, Sep 11 2014
Dirichlet g.f.: zeta(s)*(1 + 1/2^s). - Mats Granvik, Jul 18 2016
E.g.f.: 2*sinh(x) + cosh(x). - Ilya Gutkovskiy, Jul 18 2016
a(n) = A010693(n) - 1. - Filip Zaludek, Oct 29 2016
a(n) = n + 1 - 2*floor(n/2). - Lorenzo Sauras Altuzarra, Jun 28 2019
Limit_{n->oo} (1/n)*Sum_{k=1..n} a(k) = 3/2 (De Koninck reference). - Bernard Schott, Nov 09 2021
MAPLE
(1+2*x)/(1-x^2);
A000034 := proc(n) op((n mod 2)+1, [1, 2]) ; end proc: # R. J. Mathar, Feb 05 2011
MATHEMATICA
a[n_] := If[OddQ[n], 2, 1]; Table[a[n], {n, 0, 90}] (* Stefan Steinerberger, Apr 17 2006 *)
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
(PARI) a(n)=1+bittest(n, 0) \\ M. F. Hasler, Jan 13 2012
(Haskell)
a000034 = (+ 1) . (`mod` 2)
a000034_list = cycle [1, 2]
-- Reinhard Zumkeller, Jul 03 2012, Dec 02 2011 and corrected by James Spahlinger, Oct 08 2012
(Magma) [1+(n mod 2) : n in [0..100]]; // Wesley Ivan Hurt, Sep 11 2014
(GAP) List([0..120], n->1+(n mod 2)); # Muniru A Asiru, Feb 01 2019
(Python)
def A000034(n): return 1 + (n & 1) # Chai Wah Wu, May 25 2022
CROSSREFS
Cf. sequences listed in Comments section of A283393.
KEYWORD
nonn,easy
EXTENSIONS
Better definition from M. F. Hasler, Jan 13 2012
STATUS
approved

Search completed in 0.072 seconds