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.

Previous Showing 21-30 of 37 results. Next

A122796 Connell (3,5)-sum sequence (partial sums of the (3,5)-Connell sequence).

Original entry on oeis.org

1, 3, 8, 16, 27, 41, 58, 76, 97, 121, 148, 178, 211, 247, 286, 328, 373, 421, 470, 522, 577, 635, 696, 760, 827, 897, 970, 1046, 1125, 1207, 1292, 1380, 1471, 1565, 1660, 1758, 1859, 1963, 2070, 2180, 2293, 2409, 2528, 2650, 2775, 2903, 3034, 3168, 3305, 3445, 3588, 3734, 3883, 4035, 4190, 4346, 4505, 4667, 4832, 5000, 5171, 5345, 5522, 5702, 5885, 6071, 6260, 6452, 6647, 6845
Offset: 1

Views

Author

Grady Bullington (bullingt(AT)uwosh.edu), Sep 14 2006

Keywords

Crossrefs

Formula

a(n) = (n-th triangular number)-n+(n-th partial sum of A122799).

A122799 A P_7-stuttered arithmetic progression with a(n+1)=a(n) if n is not a heptagonal number, a(n+1)=a(n)+2 otherwise.

Original entry on oeis.org

1, 1, 3, 5, 7, 9, 11, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187
Offset: 1

Views

Author

Grady Bullington (bullingt(AT)uwosh.edu), Sep 14 2006

Keywords

Comments

P_7(i) = the i-th heptagonal number.

Crossrefs

Programs

  • PARI
    isHeptag(n) = {if (! issquare(40*n+9, &res), return (0)); if ((res + 3) % 10, return (0), return (1));}
    lista(m) = {aa = 1; for (i=1, m, print1(aa, ", "); if (! isHeptag(i), aa += 2););} \\ Michel Marcus, Apr 01 2013

Formula

a(n) = A045930(n)-n+1.

Extensions

Definition corrected by Michel Marcus, Apr 01 2013

A138606 List first F(1) odd numbers, then first F(2) even numbers (starting from 2), then the next F(3) odd numbers, then the next F(4) even numbers, etc., where F(n) = A000045(n), the n-th Fibonacci number.

Original entry on oeis.org

1, 2, 3, 5, 4, 6, 8, 7, 9, 11, 13, 15, 10, 12, 14, 16, 18, 20, 22, 24, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77
Offset: 1

Views

Author

Ctibor O. Zizka, May 14 2008

Keywords

Comments

The original name was "FibCon sequence". However, this sequence has only a passing resemblance to Connell-like sequences (see A001614), which are all monotone, while this sequence is a bijection of natural numbers.
Fixed points of the permutation are the terms of A062114. - Ivan Neretin, Sep 04 2017

Examples

			Let us separate the positive integers into odd (A005408) and even numbers (A005843):
1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,...
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,...
then we get the following subsequences:
S1={1}
S2={2}
S3={3,5}
S4={4,6,8}
S5={7,9,11,13,15}
S6={10,12,14,16,18,20,22,24}
...
and concatenating them S1/S2/S3/S4/S5/... gives this sequence.
		

Crossrefs

Inverse: A166013. A000035(a(n)) = A000035(A072649(n)). Cf. A138607-A138609, A138612.

Programs

  • Mathematica
    o = 1; e = 2; Flatten@Table[If[OddQ[n], Range[o, (o += 2 Fibonacci[n]) - 1, 2], Range[e, (e += 2 Fibonacci[n]) - 1, 2]], {n, 9}] (* Ivan Neretin, Sep 04 2017 *)

Formula

a(n) = A166012(A072649(n)-1) + 2*(n - A000045(1+A072649(n))). - Antti Karttunen, Oct 05 2009

Extensions

Edited, extended and Scheme code added by Antti Karttunen, Oct 05 2009

A045975 Take the first odd integer and multiple of 1, the next 2 even integers and multiples of 2, the next 3 odd integers and multiples of 3, the next 4 even integers and multiples of 4, ...

Original entry on oeis.org

1, 2, 4, 9, 15, 21, 24, 28, 32, 36, 45, 55, 65, 75, 85, 90, 96, 102, 108, 114, 120, 133, 147, 161, 175, 189, 203, 217, 224, 232, 240, 248, 256, 264, 272, 280, 297, 315, 333, 351, 369, 387, 405, 423, 441, 450, 460, 470, 480, 490, 500, 510, 520, 530, 540, 561, 583, 605, 627, 649, 671, 693
Offset: 1

Views

Author

Fang-kuo Huang (gsyps(AT)ms17.hinet.net)

Keywords

Comments

A generalized Connell sequence.

Examples

			Triangle begins:
    1;
    2,   4;
    9,  15,  21;
   24,  28,  32,  36;
   45,  55,  65,  75,  85;
   90,  96, 102, 108, 114, 120;
  133, 147, 161, 175, 189, 203, 217;
  ...
		

Crossrefs

Seen as a triangle read by rows: cf. A204558 (row sums), A005917 (central terms), A204556 (left edge), A204557 (right edge).

Programs

  • Haskell
    a045975 n k = a045975_tabl !! (n-1) !! (k-1)
    a045975_row n = a045975_tabl !! (n-1)
    a045975_tabl = f 1 [1..] where
       f k xs = ys : f (k+1) (dropWhile (<= last ys) xs) where
         ys | even k    = take k ms
            | otherwise = take k $ filter odd ms
         ms = filter ((== 0) . (`mod` k)) xs
    -- Reinhard Zumkeller, Jan 18 2012
  • Mathematica
    first[n_?EvenQ] := (n - 1)*n^2/2; first[n_?OddQ] := n*(n^2 - 2n + 3)/2; row[n_] := (ro = {first[n]}; next = first[n] + n; While[ Length[ro] < n, If[Mod[next , 2] == Mod[n, 2], AppendTo[ro, next]]; next = next + n]; ro); Flatten[ Table[row[n], {n, 1, 11}]](* Jean-François Alcover, Jun 08 2012 *)

Extensions

More terms from James Sellers
Keyword tabl added by Reinhard Zumkeller, Jan 18 2012

A117384 Positive integers, each occurring twice in the sequence, such that a(n) = a(k) when n+k = 4*a(n), starting with a(1)=1 and filling the next vacant position with the smallest unused number.

Original entry on oeis.org

1, 2, 1, 3, 4, 2, 5, 3, 6, 7, 4, 8, 5, 9, 6, 10, 11, 7, 12, 8, 13, 9, 14, 10, 15, 16, 11, 17, 12, 18, 13, 19, 14, 20, 15, 21, 22, 16, 23, 17, 24, 18, 25, 19, 26, 20, 27, 21, 28, 29, 22, 30, 23, 31, 24, 32, 25, 33, 26, 34, 27, 35, 28, 36, 37, 29, 38, 30, 39, 31, 40, 32, 41, 33, 42
Offset: 1

Views

Author

Paul D. Hanna, Mar 11 2006

Keywords

Comments

Positions where n occurs are A001614(n) and 4*n-A001614(n), where A001614 is the Connell sequence: 1 odd, 2 even, 3 odd, ...
From Paolo Xausa, Aug 27 2021: (Start)
Terms can be arranged in an irregular triangle T(r,c) read by rows in which row r is a permutation P of the integers in the interval [s, s+rlen-1], where s = 1+(r-1)*(r-2)/2, rlen = 2*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.
First column is A000124.
Terms in column c (where c >= 1) are of the form k*(k+1)/2+ceiling(c/2), for integers k >= floor((c-1)/2), each even column being equal to the column preceding it.
Row records (the positive terms of A000217) 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 gives the positive terms of A006003.
Row sums give A063488.
For rows r >= 2, row product is A057003(r)*A057003(r-1). (End)

Examples

			9 first appears at position: A001614(9) = 14;
9 next appears at position: 4*9 - A001614(9) = 22.
From _Paolo Xausa_, Aug 27 2021: (Start)
Written as an irregular triangle T(r,c) the sequence begins:
  r\c  1   2   3   4   5   6   7   8   9  10  11  12  13
  1:   1;
  2:   2,  1,  3;
  3:   4,  2,  5,  3,  6;
  4:   7,  4,  8,  5,  9,  6, 10;
  5:  11,  7, 12,  8, 13,  9, 14, 10, 15;
  6:  16, 11, 17, 12, 18, 13, 19, 14, 20, 15, 21;
  7:  22, 16, 23, 17, 24, 18, 25, 19, 26, 20, 27, 21, 28;
  ...
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.
               1
            2  1  3
         4  2  5  3  6
      7  4  8  5  9  6 10
  11  7 12  8 13  9 14 10 15
             ...
(End)
		

Crossrefs

Cf. A117385 (a(5*a(n)-n)=a(n)), A117386 (a(6*a(n)-n)=a(n)).
Cf. A001614 (Connell sequence).

Programs

  • Mathematica
    nterms=64;a=ConstantArray[0,nterms];For[n=1;t=1,n<=nterms,n++,If[a[[n]]==0,a[[n]]=t;If[(d=4t-n)<=nterms,a[[d]]=a[[n]]];t++]]; a (* Paolo Xausa, Aug 27 2021 *)
    (* Second program, triangle rows *)
    nrows = 8;Table[rlen=2r-1;Permute[Range[s=1+(r-1)(r-2)/2,s+rlen-1],Join[Range[2,rlen,2],Range[1,rlen,2]]],{r,nrows}] (* Paolo Xausa, Aug 27 2021 *)
  • PARI
    {a(n)=local(A=vector(n),m=1); for(k=1,n,if(A[k]==0,A[k]=m;if(4*m-k<=#A,A[4*m-k]=m);m+=1));A[n]}
    
  • PARI
    T(r,c) = my(k = r-1-((c+1) % 2)); k*(k+1)/2+ceil(c/2);
    tabf(nn) = {for (r=1, nn, for(c = 1, 2*r-1, print1(T(r,c), ", ");); print;);} \\ Michel Marcus, Sep 09 2021

Formula

a(4*a(n)-n) = a(n).
Lim_{n->infinity} a(n)/n = 1/2.
Lim_{n->infinity} (a(n+1)-a(n))/sqrt(n) = 1.
a( A001614(n) ) = n; a( 4n - A001614(n) ) = n.
T(r,c) = k*(k+1)/2+ceiling(c/2), where k = r-1-((c+1) mod 2), r >= 1 and c >= 1. - Paolo Xausa, Sep 09 2021

A133280 Triangle formed by: 1 even, 2 odd, 3 even, 4 odd, ... starting with zero.

Original entry on oeis.org

0, 1, 3, 4, 6, 8, 9, 11, 13, 15, 16, 18, 20, 22, 24, 25, 27, 29, 31, 33, 35, 36, 38, 40, 42, 44, 46, 48, 49, 51, 53, 55, 57, 59, 61, 63, 64, 66, 68, 70, 72, 74, 76, 78, 80, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120
Offset: 0

Views

Author

Omar E. Pol, Aug 27 2008

Keywords

Comments

This sequence is related to the Connell sequence (A001614).
First member of every row is a square (A000290).
A127366(T(n,k)) mod 2 = 0 or equal parity of T(n,k) and A000196(T(n,k)); complement of A195437. - Reinhard Zumkeller, Oct 12 2011
Written as a square array the main diagonal gives A002943. - Omar E. Pol, Aug 13 2013
Last member of every row is one less than a square (A005563). - Harvey P. Dale, Oct 02 2013

Examples

			Written as a triangle the sequence begins:
    0;
    1,   3;
    4,   6,   8;
    9,  11,  13,  15;
   16,  18,  20,  22,  24;
   25,  27,  29,  31,  33,  35;
   36,  38,  40,  42,  44,  46,  48;
   49,  51,  53,  55,  57,  59,  61,  63;
   64,  66,  68,  70,  72,  74,  76,  78,  80;
   81,  83,  85,  87,  89,  91,  93,  95,  97,  99;
  100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120;
		

Crossrefs

Column 1 is A000290. Right border gives A005563.
Cf. A001614.
Cf. A045991 (row sums). - R. J. Mathar, Jul 20 2009

Programs

  • Haskell
    a133280 n k = a133280_tabl !! n !! k
    a133280_tabl = f 0 1 [0..] where
       f m j xs = (filter ((== m) . (`mod` 2)) ys) : f (1 - m) (j + 2) xs'
         where (ys,xs') = splitAt j xs
    b133280 = bFile' "A133280" (concat $ take 101 a133280_tabl) 0
    -- Reinhard Zumkeller, Oct 12 2011
    
  • Mathematica
    Flatten[Table[Range[(n-1)^2,n^2-1,2],{n,20}]] (* Harvey P. Dale, Oct 02 2013 *)
  • PARI
    T(n,k) = n^2 + 2*k;
    for(n=0,10,for(k=0,n,print1(T(n,k),", "))); \\ Joerg Arndt, Aug 13 2013
    
  • Python
    from math import isqrt
    def A133280(n): return (m:=(n<<1)+1)-((isqrt(m+1<<2)+1)>>1) # Chai Wah Wu, Aug 01 2022

Formula

a(n) = A005408(n) - A002024(n+1). - Ivan N. Ianakiev, Aug 13 2013
T(n,k) = n^2 + 2*k. - Joerg Arndt, Aug 13 2013

A138609 List the first term from A042963, then 2 terms from A014601 (starting from 3), 3 terms from A042963, 4 terms from A014601, etc.

Original entry on oeis.org

1, 3, 4, 2, 5, 6, 7, 8, 11, 12, 9, 10, 13, 14, 17, 15, 16, 19, 20, 23, 24, 18, 21, 22, 25, 26, 29, 30, 27, 28, 31, 32, 35, 36, 39, 40, 33, 34, 37, 38, 41, 42, 45, 46, 49, 43, 44, 47, 48, 51, 52, 55, 56, 59, 60, 50, 53, 54, 57, 58, 61, 62, 65, 66, 69, 70, 63, 64, 67, 68, 71, 72
Offset: 1

Views

Author

Ctibor O. Zizka, May 14 2008

Keywords

Comments

The original name was "Generalized Connell sequence". However, this sequence has only a passing resemblance to Connell-like sequences (see A001614 and the paper by Iannucci & Mills-Taylor), which are all monotone, while this sequence is a bijection of natural numbers.
The sequence is formed by concatenating subsequences S1,S2,S3,..., each of finite length. The subsequence S1 consists of the element 1. The n-th subsequence has n elements. Each subsequence is nondecreasing. The difference between two consecutive elements in the same subsequence is varying, but >= 1.

Examples

			Let us separate natural numbers into two disjoint sets (A042963 and A014601):
  1,2,5,6,9,10,13,14,17,18,21,22,25,26,29,30,...
  3,4,7,8,11,12,15,16,19,20,23,24,27,28,31,32,...
then
  S1={1}
  S2={3,4}
  S3={2,5,6,}
  S4={7,8,11,12}
  S5={9,10,13,14,17}
  ...
  and concatenating S1/S2/S3/S4/S5/... gives this sequence.
		

Crossrefs

Formula

a(n) = A116966(A074147(n)-1). - Antti Karttunen, Oct 05 2009

Extensions

Edited, extended and keyword tabl added by Antti Karttunen, Oct 05 2009

A138608 List first F(1) numbers from A016777, then first F(2) numbers from A016789, then the first F(3) numbers from A008585 (starting from 3), then the next F(4) numbers from A016777, then the next F(5) numbers from A016789, then the next F(6) numbers from A008585, etc, where F(n) = A000045(n), the n-th Fibonacci number.

Original entry on oeis.org

1, 2, 3, 6, 4, 7, 10, 5, 8, 11, 14, 17, 9, 12, 15, 18, 21, 24, 27, 30, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 49, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84
Offset: 1

Views

Author

Ctibor O. Zizka, May 14 2008

Keywords

Comments

The original name was "Generalized FibCon sequence". However, this sequence has only a passing resemblance to Connell-like sequences (see A001614 and the paper by Iannucci & Mills-Taylor), which are all monotone, while this sequence is a bijection of natural numbers.

Examples

			Let us separate natural numbers into three disjoint sets (A016777, A016789 and A008585):
  1,4,7,10,13,16,19,22,25,28,31,...
  2,5,8,11,14,17,20,23,26,29,32,...
  3,6,9,12,15,18,21,24,27,30,33,...
then
  S0={1}
  S1={2}
  S2={3,6}
  S3={4,7,10}
  S4={5,8,11,14,17}
  S5={9,12,15,18,21,24,27,30}
  ...
and concatenating S0/S1/S2/S3/S4/S5/... gives this sequence.
		

Crossrefs

Inverse: A166015. A010872(a(n)) = A010872(A072649(n)). Cf. A138606-A138609, A138612.

Formula

If n < 4, a(n) = n. If n = A000045(A072649(n)+1), then a(n) = a(n-1-A000045(A072649(n)))+3, otherwise a(n) = a(n-1)+3. - Antti Karttunen, Oct 05 2009
1. The sequence is formed by concatenating subsequences S0,S1, S2, ..., each of finite length. 2. The subsequence S0 consists of the element 1. 3. The n-th subsequence has F(n) elements, F(n) denotes n-th Fibonacci number. 4. Each subsequence is nondecreasing and the difference between two consecutive elements in the same subsequence is 3.

Extensions

Edited, extended, starting offset changed from 0 to 1, and Scheme-code added by Antti Karttunen, Oct 05 2009

A238303 Triangle T(n,k), 0<=k<=n, read by rows given by T(n,0) = 1, T(n,k) = 2 if k>0.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 0

Views

Author

Philippe Deléham, Feb 24 2014

Keywords

Comments

Row sums are A005408(n).
Diagonals sums are A109613(n).
Sum_{k=0..n} T(n,k)*x^k = A033999(n), A000012(n), A005408(n), A036563(n+2), A058481(n+1), A083584(n), A137410(n), A233325(n), A233326(n), A233328(n), A211866(n+1), A165402(n+1) for x = -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 respectively.
Sum_{k=0..n} T(n,k)*x^(n-k) = A151575(n), A000012(n), A040000(n), A005408(n), A033484(n), A048473(n), A020989(n), A057651(n), A061801(n), A238275(n), A238276(n), A138894(n), A090843(n), A199023(n) for x = -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 respectively.
Sum_{k=0..n} T(n,k)^x = A000027(n+1), A005408(n), A016813(n), A017077(n) for x = 0, 1, 2, 3 respectively.
Sum_{k=0..n} k*T(n,k) = A002378(n).
Sum_{k=0..n} A000045(k)*T(n,k) = A019274(n+2).
Sum_{k=0..n} A000142(k)*T(n,k) = A066237(n+1).

Examples

			Triangle begins:
1;
1, 2;
1, 2, 2;
1, 2, 2, 2;
1, 2, 2, 2, 2;
1, 2, 2, 2, 2, 2;
1, 2, 2, 2, 2, 2, 2;
1, 2, 2, 2, 2, 2, 2, 2;
1, 2, 2, 2, 2, 2, 2, 2, 2;
1, 2, 2, 2, 2, 2, 2, 2, 2, 2;
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2;
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2;
...
		

Crossrefs

Cf. Diagonals: A040000.
Cf. Columns: A000012, A007395.
First differences of A001614.

Programs

Formula

T(n,0) = A000012(n) = 1, T(n+k,k) = A007395(n) = 2 for k>0.

Extensions

Data section extended to a(104) by Antti Karttunen, Jan 19 2025

A305847 Solution a() of the complementary equation a(n) + b(n) = 5*n, where a(1) = 1. See Comments.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 16, 17, 18, 20, 21, 22, 24, 25, 27, 28, 29, 31, 32, 33, 35, 36, 38, 39, 40, 42, 43, 45, 46, 47, 49, 50, 51, 53, 54, 56, 57, 58, 60, 61, 62, 64, 65, 67, 68, 69, 71, 72, 74, 75, 76, 78, 79, 80, 82, 83, 85, 86, 87, 89, 90
Offset: 1

Views

Author

Clark Kimberling, Jun 11 2018

Keywords

Comments

The increasing complementary sequences a() and b() are uniquely determined by the titular equation and initial value. Let x = (5 - sqrt(5))/2 and y = (5 + sqrt(5))/2. Let r = y - 2 = golden ratio (A001622). It appears that
2 - r <= n*x - a(n) < r and 2 - r < b(n) - n*y < r for all n >= 1.

Examples

			a(1) = 1, so b(1) = 5 - a(1) = 4.  In order for a() and b() to be increasing and complementary, we have a(2) = 2, a(3) = 3, a(4) = 5, etc.
		

Crossrefs

Programs

  • Mathematica
    mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
    u = 5; v = 5; z = 220;
    c = {v}; a = {1}; b = {Last[c] - Last[a]};
    Do[AppendTo[a, mex[Flatten[{a, b}], Last[a]]];
      AppendTo[c, u Length[c] + v];
      AppendTo[b, Last[c] - Last[a]], {z}];
    c = Flatten[Position[Differences[a], 2]];
    a  (* A305847 *)
    b  (* A305848 *)
    c  (* A305849 *)
    (* Peter J. C. Moses, May 30 2018 *)
Previous Showing 21-30 of 37 results. Next