[go: up one dir, main page]

login
Search: a117384 -id:a117384
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = 4*A117384(n) - n; a self-inverse permutation of the natural numbers.
+20
2
3, 6, 1, 8, 11, 2, 13, 4, 15, 18, 5, 20, 7, 22, 9, 24, 27, 10, 29, 12, 31, 14, 33, 16, 35, 38, 17, 40, 19, 42, 21, 44, 23, 46, 25, 48, 51, 26, 53, 28, 55, 30, 57, 32, 59, 34, 61, 36, 63, 66, 37, 68, 39, 70, 41, 72, 43, 74, 45, 76, 47, 78, 49, 80, 83, 50, 85, 52, 87, 54, 89, 56
OFFSET
1,1
COMMENTS
A117384 is defined by A117384(n) = A117384(k) when k = 4*A117384(n) - n. A001614 is the Connell sequence generated as: 1 odd, 2 even, 3 odd, .. and A118011 is the complement of A001614.
FORMULA
a(a(n)) = n; a(A118011(n)) = a(4*n - A001614(n)) = A001614(n).
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Apr 10 2006
STATUS
approved
Connell sequence: 1 odd, 2 even, 3 odd, ...
(Formerly M0962 N0359)
+10
38
1, 2, 4, 5, 7, 9, 10, 12, 14, 16, 17, 19, 21, 23, 25, 26, 28, 30, 32, 34, 36, 37, 39, 41, 43, 45, 47, 49, 50, 52, 54, 56, 58, 60, 62, 64, 65, 67, 69, 71, 73, 75, 77, 79, 81, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 122
OFFSET
1,2
COMMENTS
Next (2n-1) odd numbers alternating with next 2n even numbers. Squares (A000290(n)) occur at the A000217(n)-th entry. - Lekraj Beedassy, Aug 06 2004. - Comment corrected by Daniel Forgues, Jul 18 2009
a(t_n) = a(n(n+1)/2) = n^2 relates squares to triangular numbers. - Daniel Forgues
The natural numbers not included are A118011(n) = 4n - a(n) as n=1,2,3,... - Paul D. Hanna, Apr 10 2006
As a triangle with row sums = A069778 (1, 6, 21, 52, 105, ...): /Q 1;/Q 2, 4;/Q 5, 7, 9;/Q 10, 12, 14, 16;/Q ... . - Gary W. Adamson, Sep 01 2008
The triangle sums, see A180662 for their definitions, link the Connell sequence A001614 as a triangle with six sequences, see the crossrefs. - Johannes W. Meijer, May 20 2011
a(n) = A122797(n) + n - 1. - Reinhard Zumkeller, Feb 12 2012
REFERENCES
C. Pickover, Computers and the Imagination, St. Martin's Press, NY, 1991, p. 276.
C. A. Pickover, The Mathematics of Oz, Chapter 39, Camb. Univ. Press UK 2002.
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
Ian Connell and Andrew Korsak, Problem E1382, Amer. Math. Monthly, 67 (1960), 380.
Douglas E. Iannucci and Donna Mills-Taylor, On Generalizing the Connell Sequence, J. Integer Sequences, Vol. 2, 1999, #99.1.7.
H. P. Robinson and N. J. A. Sloane, Correspondence, 1971-1972
N. J. A. Sloane, Handwritten notes on Self-Generating Sequences, 1970 (note that A1148 has now become A005282)
Gary E. Stevens, A Connell-Like Sequence, J. Integer Sequences, Vol. 1, 1998, #98.1.4.
Eric Weisstein's World of Mathematics, Connell Sequence
FORMULA
a(n) = 2*n - floor( (1+ sqrt(8*n-7))/2 ).
a(n) = A005843(n) - A002024(n). - Lekraj Beedassy, Aug 06 2004
a(n) = A118012(A118011(n)). A117384( a(n) ) = n; A117384( 4*n - a(n) ) = n. - Paul D. Hanna, Apr 10 2006
a(1) = 1; then a(n) = a(n-1)+1 if a(n-1) is a square, a(n) = a(n-1)+2 otherwise. For example, a(21)=36 is a square therefore a(22)=36+1=37 which is not a square so a(23)=37+2=39 ... - Benoit Cloitre, Feb 07 2007
T(n,k) = (n-1)^2 + 2*k - 1. - Omar E. Pol, Aug 13 2013
a(n)^2 = a(n*(n+1)/2). - Ivan N. Ianakiev, Aug 15 2013
Let the sequence be written in the form of the triangle in the EXAMPLE section below and let a(n) and a(n+1) belong to the same row of the triangle. Then a(n)*a(n+1) + 1 = a(A000217(A118011(n))) = A000290(A118011(n)). - Ivan N. Ianakiev, Aug 16 2013
a(n) = 2*n-round(sqrt(2*n)). - Gerald Hillier, Apr 15 2015
From Robert Israel, Apr 20 2015 (Start):
G.f. 2*x/(1-x)^2 - (x/(1-x))*sum(n>=0, x^(n*(n+1)/2))
= 2*x/(1-x)^2 - (Theta2(0,x^(1/2)))*x^(7/8)/(2*(1-x)) where Theta2 is a Jacobi theta function.
a(n) = 2*n-1 - Sum(i=0..n-2, A023531(i)). (End)
EXAMPLE
From Omar E. Pol, Aug 13 2013: (Start)
Written as a triangle the sequence begins:
1;
2, 4;
5, 7, 9;
10, 12, 14, 16;
17, 19, 21, 23, 25;
26, 28, 30, 32, 34, 36;
37, 39, 41, 43, 45, 47, 49;
50, 52, 54, 56, 58, 60, 62, 64;
65, 67, 69, 71, 73, 75, 77, 79, 81;
82, 84, 86, 88, 90, 92, 94, 96, 98, 100;
...
Right border gives A000290, n >= 1.
(End)
MAPLE
A001614:=proc(n): 2*n - floor((1+sqrt(8*n-7))/2) end: seq(A001614(n), n=1..67); # Johannes W. Meijer, May 20 2011
MATHEMATICA
lst={}; i=0; For[j=1, j<=4!, a=i+1; b=j; k=0; For[i=a, i<=9!, k++; AppendTo[lst, i]; If[k>=b, Break[]]; i=i+2]; j++ ]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 29 2008 *)
row[n_] := 2*Range[n+1]+n^2-1; Table[row[n], {n, 0, 11}] // Flatten (* Jean-François Alcover, Oct 25 2013 *)
PROG
(Haskell)
a001614 n = a001614_list !! (n-1)
a001614_list = f 0 0 a057211_list where
f c z (x:xs) = z' : f x z' xs where z' = z + 1 + 0 ^ abs (x - c)
-- Reinhard Zumkeller, Dec 30 2011
(Magma) [2*n-Round(Sqrt(2*n)): n in [1..80]]; // Vincenzo Librandi, Apr 17 2015
(PARI) a(n)=2*n - round(sqrt(2*n)) \\ Charles R Greathouse IV, Apr 20 2015
(Python)
from math import isqrt
def A001614(n): return (m:=n<<1)-(k:=isqrt(m))-int((m<<2)>(k<<2)*(k+1)+1) # Chai Wah Wu, Jul 26 2022
CROSSREFS
Cf. A117384, A118011 (complement), A118012.
Cf. A069778. - Gary W. Adamson, Sep 01 2008
From Johannes W. Meijer, May 20 2011: (Start)
Triangle columns: A002522, A117950 (n>=1), A117951 (n>=2), A117619 (n>=3), A154533 (n>=5), A000290 (n>=1), A008865 (n>=2), A028347 (n>=3), A028878 (n>=1), A028884 (n>=2), A054569 [T(2*n,n)].
Triangle sums (see the comments): A069778 (Row1), A190716 (Row2), A058187 (Related to Kn11, Kn12, Kn13, Kn21, Kn22, Kn23, Fi1, Fi2, Ze1 and Ze2), A000292 (Related to Kn3, Kn4, Ca3, Ca4, Gi3 and Gi4), A190717 (Related to Ca1, Ca2, Ze3, Ze4), A190718 (Related to Gi1 and Gi2). (End)
KEYWORD
nonn,easy,nice,tabl
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Mar 16 2001
STATUS
approved
Complement of the Connell sequence (A001614); a(n) = 4*n - A001614(n).
+10
7
3, 6, 8, 11, 13, 15, 18, 20, 22, 24, 27, 29, 31, 33, 35, 38, 40, 42, 44, 46, 48, 51, 53, 55, 57, 59, 61, 63, 66, 68, 70, 72, 74, 76, 78, 80, 83, 85, 87, 89, 91, 93, 95, 97, 99, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 123, 125, 127, 129, 131, 133, 135, 137, 139
OFFSET
1,1
COMMENTS
a(n) is the position of the second appearance of n in A117384, where A117384(m) = A117384(k) and k = 4*A117384(m) - m. The Connell sequence (A001614) is generated as: 1 odd, 2 even, 3 odd, ...
FORMULA
A001614(n) = A118012(a(n)).
a(n) = 2n+[(1+sqrt(8n-7))/2]. - Juri-Stepan Gerasimov Aug 25 2009
a(n) = 2*n+round(sqrt(2*n)). - Gerald Hillier, Apr 16 2015
From Robert Israel, Apr 20 2015 (Start):
a(n) = 2*n + 1 + Sum(j=0 .. n-2, A023531(j)).
G.f. 2*x/(1-x)^2 + x/(1-x) * Sum(j=0..infinity, x^(j*(j+1)/2))
= 2*x/(1-x)^2 + x^(7/8)/(2-2*x) * Theta2(0,sqrt(x)), where Theta2 is a Jacobi theta function. (End)
MATHEMATICA
Table[2 n + Round[Sqrt[2 n]], {n, 70}] (* Vincenzo Librandi, Apr 16 2015 *)
PROG
(Magma) [2*n+Round(Sqrt(2*n)): n in [1..70]]; // Vincenzo Librandi, Apr 16 2015
(Python)
from math import isqrt
def A118011(n): return (m:=n<<1)+(k:=isqrt(m))+int((m<<2)>(k<<2)*(k+1)+1) # Chai Wah Wu, Jul 26 2022
CROSSREFS
A171152 gives partial sums.
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Apr 10 2006
STATUS
approved
Positive integers, each occurring twice in the sequence, such that a(n) = a(k) when n+k = 5*a(n), starting with a(1)=1 and filling the next vacant position with the smallest unused number.
+10
3
1, 2, 3, 1, 4, 5, 6, 2, 7, 8, 9, 3, 10, 11, 4, 12, 13, 14, 5, 15, 16, 17, 6, 18, 19, 7, 20, 21, 22, 8, 23, 24, 25, 9, 26, 27, 10, 28, 29, 30, 11, 31, 32, 12, 33, 34, 35, 13, 36, 37, 38, 14, 39, 40, 15, 41, 42, 43, 16, 44, 45, 46, 17, 47, 48, 18, 49, 50, 51, 19, 52, 53, 20, 54, 55, 56
OFFSET
1,2
FORMULA
a(5*a(n)-n) = a(n). Conjecture: Lim_inf a(n)/n = (5-sqrt(5))/10; Lim_sup a(n)/n = (5+sqrt(5))/10.
PROG
(PARI) {a(n)=local(A=vector(n), m=1); for(k=1, n, if(A[k]==0, A[k]=m; if(5*m-k<=#A, A[5*m-k]=m); m+=1)); A[n]}
CROSSREFS
Cf. A117384 (a(4*a(n)-n)=a(n)), A117386 (a(6*a(n)-n)=a(n)).
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Mar 11 2006
STATUS
approved
Positive integers, each occurring twice in the sequence, such that a(n) = a(k) when n+k = 6*a(n), starting with a(1)=1 and filling the next vacant position with the smallest unused number.
+10
2
1, 2, 3, 4, 1, 5, 6, 7, 8, 2, 9, 10, 11, 12, 3, 13, 14, 15, 16, 4, 17, 18, 19, 5, 20, 21, 22, 23, 6, 24, 25, 26, 27, 7, 28, 29, 30, 31, 8, 32, 33, 34, 9, 35, 36, 37, 38, 10, 39, 40, 41, 42, 11, 43, 44, 45, 46, 12, 47, 48, 49, 13, 50, 51, 52, 53, 14, 54, 55, 56, 57, 15, 58, 59, 60, 61
OFFSET
1,2
FORMULA
a(6*a(n)-n) = a(n). Conjecture: Lim_inf a(n)/n = (3-sqrt(3))/6; Lim_sup a(n)/n = (3+sqrt(3))/6.
PROG
(PARI) {a(n)=local(A=vector(n), m=1); for(k=1, n, if(A[k]==0, A[k]=m; if(6*m-k<=#A, A[6*m-k]=m); m+=1)); A[n]}
CROSSREFS
Cf. A117384 (a(4*a(n)-n)=a(n)), A117385 (a(5*a(n)-n)=a(n)).
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Mar 11 2006
STATUS
approved
Primes, each occurring twice, such that a(C(n)) = a(4*n-C(n)) = prime(n), where C is the Connell sequence (A001614).
+10
1
2, 3, 2, 5, 7, 3, 11, 5, 13, 17, 7, 19, 11, 23, 13, 29, 31, 17, 37, 19, 41, 23, 43, 29, 47, 53, 31, 59, 37, 61, 41, 67, 43, 71, 47, 73, 79, 53, 83, 59, 89, 61, 97, 67, 101, 71, 103, 73, 107, 109, 79, 113, 83, 127, 89, 131, 97, 137, 101, 139, 103, 149, 107, 151
OFFSET
1,1
COMMENTS
Terms can be arranged in an irregular triangle read by rows in which row r is a permutation P of the primes in the interval [prime(s), prime(s+rlen-1)], where s = 1+(r-1)*(r-2)/2, rlen = 2*r-1 = A005408(r-1) and r >= 1 (see example).
P is the alternating (first term > second term < third term > fourth term < ...) permutation m -> 1, 1 -> 2, m+1 -> 3, 2 -> 4, m+2 -> 5, 3 -> 6, ..., rlen -> rlen where m = ceiling(rlen/2).
The triangle has the following properties.
Row lengths are the positive odd numbers (A005408).
First column is A078721.
Column 3 is A078722 (for n >= 1).
Column 5 is A078724 (for n >= 2).
Column 7 is A078725 (for n >= 3).
Each even column is equal to the column preceding it.
Row records (A011756) are in the right border.
Indices of row records are the positive terms of A000290.
Each row r contains r terms that are duplicated in the next row.
In each row, the sum of terms which are not already listed in the sequence give A007468.
For rows r >= 2, row sum is A007468(r)+A007468(r-1) and row product is A007467(r)*A007467(r-1).
FORMULA
a(A001614(n)) = a(4*n-A001614(n)) = prime(n).
EXAMPLE
Written as an irregular triangle the sequence begins:
2;
3, 2, 5;
7, 3, 11, 5, 13;
17, 7, 19, 11, 23, 13, 29;
31, 17, 37, 19, 41, 23, 43, 29, 47;
53, 31, 59, 37, 61, 41, 67, 43, 71, 47, 73;
79, 53, 83, 59, 89, 61, 97, 67, 101, 71, 103, 73, 107;
...
The triangle can be arranged as shown below so that, in every row, each odd position term is equal to the term immediately below it.
2
3 2 5
7 3 11 5 13
17 7 19 11 23 13 29
31 17 37 19 41 23 43 29 47
...
MATHEMATICA
nterms=64; a=ConstantArray[0, nterms]; For[n=1; p=1, n<=nterms, n++, If[a[[n]]==0, a[[n]]=Prime[p]; If[(d=4p-n)<=nterms, a[[d]]=a[[n]]]; p++]]; a
(* Second program, triangle rows *)
nrows=8; Table[rlen=2r-1; Permute[Prime[Range[s=1+(r-1)(r-2)/2, s+rlen-1]], Join[Range[2, rlen, 2], Range[1, rlen, 2]]], {r, nrows}]
KEYWORD
nonn,tabf
AUTHOR
Paolo Xausa, Aug 16 2021
STATUS
approved

Search completed in 0.007 seconds