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-10 of 12 results. Next

A274650 Triangle read by rows: T(n,k), (0 <= k <= n), in which each term is the least nonnegative integer such that no row, column, diagonal, or antidiagonal contains a repeated term.

Original entry on oeis.org

0, 1, 2, 3, 0, 1, 2, 4, 3, 5, 5, 1, 0, 2, 3, 4, 3, 5, 1, 6, 7, 6, 7, 2, 0, 5, 4, 8, 8, 5, 9, 4, 7, 2, 10, 6, 7, 10, 8, 3, 0, 6, 9, 5, 4, 11, 6, 12, 7, 1, 8, 3, 10, 9, 13, 9, 8, 4, 11, 2, 0, 1, 12, 6, 7, 10, 10, 11, 7, 12, 4, 3, 2, 9, 8, 14, 13, 15, 12, 9, 10, 6, 8, 1, 0, 11, 7, 4, 16, 14, 17
Offset: 0

Views

Author

Omar E. Pol, Jul 02 2016

Keywords

Comments

Similar to A274528, but the triangle here is a right triangle.
The same rule applied to an equilateral triangle gives A274528.
By analogy, the offset for both rows and columns is the same as the offset of A274528.
We construct the triangle by reading from left to right in each row, starting with T(0,0) = 0.
Presumably every diagonal and every column is also a permutation of the nonnegative integers, but the proof does not seem so straightforward. Of course neither the rows nor the antidiagonals are permutations of the nonnegative integers, since they are finite in length.
Omar E. Pol's conjecture that every column and every diagonal of the triangle is a permutation of the nonnegative integers is true: see the link. - N. J. A. Sloane, Jun 07 2017
It appears that the numbers generally appear for the first time in or near the right border of the triangle.
Theorem 1: the middle diagonal gives A000004 (the zero sequence).
Proof: T(0,0) = 0 by definition. For the next rows we have that in row 1 there are no zeros because the first term belongs to a column that contains a zero and the second term belongs to a diagonal that contains a zero. In row 2 the unique zero is T(2,1) = 0 because the preceding term belongs to a column that contains a zero and the following term belongs to a diagonal that contains a zero. Then we have two recurrences for all rows of the triangle:
a) If T(n,k) = 0 then row n+1 does not contain a zero because every term belongs to a column that contains a zero or it belongs to a diagonal that contains a zero.
b) If T(n,k) = 0 the next zero is T(n+2,k+1) because every preceding term in row n+2 is a positive integer because it belongs to a column that contains a zero and, on the other hand, the column, the diagonal and the antidiagonal of T(n+2,k+1) do not contain zeros.
Finally, since both T(n,k) = 0 and T(n+2,k+1) = 0 are located in the middle diagonal, the other terms of the middle diagonal are zeros, or in other words: the middle diagonal gives A000004 (the zero sequence). QED
Theorem 2: all zeros are in the middle diagonal.
Proof: consider the first n rows of the triangle. Every element located above or at the right-hand side of the middle diagonal must be positive because it belongs to a diagonal that contains one of the zeros of the middle diagonal. On the other hand every element located below the middle diagonal must be positive because it belongs to a column that contains one of the zeros of the middle diagonal, hence there are no zeros outside of the middle diagonal, or in other words: all zeros are in the middle diagonal. QED
From Hartmut F. W. Hoft, Jun 12 2017: (Start)
T(2k,k) = 0, for all k >= 0, and T(n,{(n-1)/2,(n+2)/2,(n-2)/2,(n+1)/2}) = 1, for all n >= 0 with n mod 8 = {1,2,4,5} respectively, and no 0's or 1's occur in other positions. The triangle of positions of 0's and 1's for this sequence is the triangle in the Comment section of A274651 with row and column indices and values shifted down by one.
The sequence of rows containing 1's is A047613 (n mod 8 = {1,2,4,5}), those containing only 1's is A016813 (n mod 8 = {1,5}), those containing both 0's and 1's is A047463 (n mod 8 = {2,4}), those containing only 0's is A047451 (n mod 8 = {0,6}), and those containing neither 0's nor 2's is A004767 (n mod 8 = {3,7}).
(End)

Examples

			Triangle begins:
   0;
   1,  2;
   3,  0,  1;
   2,  4,  3,  5;
   5,  1,  0,  2,  3;
   4,  3,  5,  1,  6,  7;
   6,  7,  2,  0,  5,  4,  8;
   8,  5,  9,  4,  7,  2, 10,  6;
   7, 10,  8,  3,  0,  6,  9,  5,  4;
  11,  6, 12,  7,  1,  8,  3, 10,  9, 13;
   9,  8,  4, 11,  2,  0,  1, 12,  6,  7, 10;
  10, 11,  7, 12,  4,  3,  2,  9,  8, 14, 13, 15;
  12,  9, 10,  6,  8,  1,  0, 11,  7,  4, 16, 14, 17;
  ...
From _Omar E. Pol_, Jun 07 2017: (Start)
The triangle may be reformatted as an isosceles triangle so that the zero sequence (A000004) appears in the central column (but note that this is NOT the way the triangle is constructed!):
.
.                    0;
.                  1,  2;
.                3,  0,  1;
.              2,  4,  3,  5;
.            5,  1,  0,  2,  3;
.          4,  3,  5,  1,  6,  7;
.        6,  7,  2,  0,  5,  4,  8;
.     8,   5,  9,  4,  7,  2, 10,  6;
.   7,  10,  8,  3,  0,  6,  9,  5,  4;
...
(End)
		

Crossrefs

Cf. A000004 (middle diagonal).
Cf. A046092 (indices of the zeros).
Every diagonal and every column of the right triangle is a permutation of A001477.
The left and right edges of the right triangle give A286294 and A286295.
Cf. A274651 is the same triangle but with 1 added to every entry.
Other sequences of the same family are A269526, A274528, A274820, A274821, A286297, A288530, A288531.
Sequences mentioned in N. J. A. Sloane's proof are A000170, A274616 and A287864.
Cf. A288384.
See A308179, A308180 for a very similar triangle.

Programs

  • Mathematica
    (* function a274651[] is defined in A274651 *)
    (* computation of rows 0 ... n-1 *)
    a274650[n_] := a274651[n]-1
    Flatten[a274650[13]] (* data *)
    TableForm[a274650[13]] (* triangle *)
    (* Hartmut F. W. Hoft, Jun 12 2017 *)
  • PARI
    See Links section.

Formula

T(n,k) = A274651(n+1,k+1) - 1.

A047504 Numbers that are congruent to {1, 2, 3, 4, 5, 7} mod 8.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 9, 10, 11, 12, 13, 15, 17, 18, 19, 20, 21, 23, 25, 26, 27, 28, 29, 31, 33, 34, 35, 36, 37, 39, 41, 42, 43, 44, 45, 47, 49, 50, 51, 52, 53, 55, 57, 58, 59, 60, 61, 63, 65, 66, 67, 68, 69, 71, 73, 74, 75, 76, 77, 79, 81, 82, 83, 84, 85, 87
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A047451 (complement), A047422, A047519.

Programs

  • Magma
    [n : n in [0..100] | n mod 8 in [1, 2, 3, 4, 5, 7]]; // Wesley Ivan Hurt, Jun 16 2016
  • Maple
    A047504:=n->(12*n-9+sqrt(3)*(3*sin(n*Pi/3)+sin(2*n*Pi/3)))/9: seq(A047504(n), n=1..100); # Wesley Ivan Hurt, Jun 16 2016
  • Mathematica
    Select[Range[0, 100], MemberQ[{1, 2, 3, 4, 5, 7}, Mod[#, 8]] &] (* Wesley Ivan Hurt, Jun 16 2016 *)

Formula

G.f.: x*(1+x^2+x^4+x^5) / ( (x^2-x+1)*(1+x+x^2)*(x-1)^2 ). - R. J. Mathar, Nov 06 2015
From Wesley Ivan Hurt, Jun 16 2016: (Start)
a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-2*a(n-4)+2*a(n-5)-a(n-6) for n>6.
a(n) = (12*n-9+sqrt(3)*(3*sin(n*Pi/3)+sin(2*n*Pi/3)))/9.
a(6k) = 8k-1, a(6k-1) = 8k-3, a(6k-2) = 8k-4, a(6k-3) = 8k-5, a(6k-4) = 8k-6, a(6k-5) = 8k-7. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = (2*sqrt(2)+1)*Pi/16 + (3-sqrt(2))*log(2)/8 + sqrt(2)*log(2-sqrt(2))/4. - Amiram Eldar, Dec 28 2021

A047557 Numbers that are congruent to {0, 3, 6, 7} mod 8.

Original entry on oeis.org

0, 3, 6, 7, 8, 11, 14, 15, 16, 19, 22, 23, 24, 27, 30, 31, 32, 35, 38, 39, 40, 43, 46, 47, 48, 51, 54, 55, 56, 59, 62, 63, 64, 67, 70, 71, 72, 75, 78, 79, 80, 83, 86, 87, 88, 91, 94, 95, 96, 99, 102, 103, 104, 107, 110, 111, 112, 115, 118, 119, 120, 123, 126
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

Formula

From R. J. Mathar, Oct 08 2011: (Start)
G.f.: x^2*(3+x^2) / ( (x^2+1)*(x-1)^2 ).
a(n) = 2*n-1-sin(Pi*n/2). (End)
a(n) = 2n-1-cos(Pi*(n-1)/2). - Wesley Ivan Hurt, Oct 22 2013
From Wesley Ivan Hurt, May 20 2016: (Start)
a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4) for n>4.
a(n) = 2*n-2-I^(1-n)*(I^(n-1)-1)^2/2 where I=sqrt(-1).
a(2n) = A004767(n-1) for n>0, a(2n-1) = A047451(n). (End)
Sum_{n>=2} (-1)^n/a(n) = 5*log(2)/8 - Pi/16. - Amiram Eldar, Dec 23 2021

Extensions

More terms from Wesley Ivan Hurt, May 20 2016

A225822 Lesser of adjacent odd numbers with different parity of binary weight and both isolated from odd numbers of same parity of binary weight.

Original entry on oeis.org

7, 23, 31, 39, 55, 71, 87, 95, 103, 119, 127, 135, 151, 159, 167, 183, 199, 215, 223, 231, 247, 263, 279, 287, 295, 311, 327, 343, 351, 359, 375, 383, 391, 407, 415, 423, 439, 455, 471, 479, 487, 503, 511, 519, 535, 543, 551, 567, 583, 599, 607, 615, 631
Offset: 1

Views

Author

Brad Clardy, Jul 30 2013

Keywords

Comments

Write the sequence of odious odd numbers above the sequence of evil odd numbers connecting all that are 2 apart:
1 7 11-13 19-21 25 31 35-37 41 47-49 55 59-61 67-69 73 79-81 87 91-93 97
3-5 9 15-17 23 27-29 33 39 43-45 51-53 57 63-65 71 75-77 83-85 89 95 99-
Remove the connected numbers:
1 7 25 31 41 55 73 87 97
9 23 33 39 57 71 89 95
Define these as "isolated".
The sequence is the smaller of the remaining pairs that are 2 apart.
The 1 is not a member since there is no change in parity between 1 and 7.
All of the differences between adjacent numbers in both the evil and odious sequences are either 2, 4 or 6, with 4 being the indicator that a transition in parity occurs. The program provided utilizes that fact to produce the sequence.
The sequence that includes all numbers along this path is A047522 (numbers congruent to {1,7} mod 8). This is also the same as the odd terms of A199398 (XOR of the first n odd numbers).
This sequence is similar to A044449 (numbers n such that string 1,3 occurs in the base 4 representation of n but not of n+1), but it contains additional terms. An example is 119. Its base 4 representation is 1313 while the base 4 representation of 120 is 1320. It may be that another workable definition of the sequence is -- numbers n in base 4 representation such that string 1,3 occurs one less time in n+1 than n, but I have not been able to check this.
The difference between the numbers in the sequence is always either 8 or 16, however there appears to be no recurring repetitions in it. Writing the 8 as a 0 and the 16 as a 1 (or dividing the difference pattern by 2 and subtracting a 1) produces a difference pattern of: 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1... which is an infinite word.
A similar process writing Even Odious over Even Evils produces 6, 22, 30, 38, 54, 70... which is twice A131323 (Odd numbers n such that the binary expansion ends in an even number of 1's), with all numbers along the path given by A047451 (numbers congruent to {0,6} mod 8) and yields the same difference pattern which produces the same infinite word.

Crossrefs

Cf. A001969 (evil numbers), A129771 (odd evil numbers).
Cf. A000069 (odious numbers), A092246 (odd odious numbers).
Cf. A047522 (numbers congruent to {1,7} mod 8).
Cf. A199398 (XOR of first n odd numbers).
Cf. A044449 (a subset of this sequence).
Cf. A131323 (odd numbers n such that the binary expansion ends in an even number of 1's).
Cf. A047451 (numbers congruent to {0,6} mod 8).
Cf. A000120 (binary weight of n).
Cf. A079523.

Programs

  • Magma
    //Function Bweight calculates the binary weight of an integer
    Bweight := function(m)
    Bweight:=0;
    adigs := Intseq(m,2);
    for n:= 1 to Ilog2(m)+1 do
      Bweight:=Bweight+adigs[n];
    end for;
    return Bweight;
    end function;
    prevodi:=0;
    currodi:=0;
    m:=0;
    count:=0;
    for n:= 1 to 20000 by 2 do
        m:=m+1;
        if (Bweight(n) mod 2 eq 1) then odious:=true; else odious:=false; end if;
        if (odious) then currodi:=n; end if;
           if (currodi - prevodi eq 4) then
              if (m mod 2 eq 1) then count:=count+1; count,n-2;
                 else count:=count+1;count,n-4;
           end if;
        end if;
        if(odious) then prevodi:=currodi; end if;
    end for;
    
  • Mathematica
    2*Select[Range[1, 320, 2], EvenQ[IntegerExponent[# + 1, 2]] &] + 1 (* Amiram Eldar, Jul 24 2023 *)
  • PARI
    is(n)=n%4==3 && valuation(n\4+1, 2)%2 \\ Charles R Greathouse IV, Aug 20 2013
    
  • Python
    from itertools import count, islice
    def A225822_gen(startvalue=1): # generator of terms >= startvalue
        return map(lambda m:(m<<1)+1,filter(lambda n:n&1 and not (~(n+1)&n).bit_length()&1,count(max(startvalue,1))))
    A225822__list = list(islice(A225822_gen(),30)) # Chai Wah Wu, Jul 09 2022

Formula

a(n) = 2*A131323(n) + 1.
a(n) = 4*A079523(n) + 3. - Charles R Greathouse IV, Aug 20 2013
a(n) ~ 12n. (In particular, a(n) = 12n + O(log n).) - Charles R Greathouse IV, Aug 20 2013

A047507 Numbers that are congruent to {0, 4, 6, 7} mod 8.

Original entry on oeis.org

0, 4, 6, 7, 8, 12, 14, 15, 16, 20, 22, 23, 24, 28, 30, 31, 32, 36, 38, 39, 40, 44, 46, 47, 48, 52, 54, 55, 56, 60, 62, 63, 64, 68, 70, 71, 72, 76, 78, 79, 80, 84, 86, 87, 88, 92, 94, 95, 96, 100, 102, 103, 104, 108, 110, 111, 112, 116, 118, 119, 120, 124
Offset: 1

Views

Author

Keywords

Examples

			G.f. = 4*x^2 + 6*x^3 + 7*x^4 + 8*x^5 + 12*x^6 + 14*x^7 + 15*x^8 + 16*x^9 + ... - _Michael Somos_, Dec 12 2023
		

Crossrefs

Programs

  • Magma
    [n : n in [0..150] | n mod 8 in [0, 4, 6, 7]]; // Wesley Ivan Hurt, May 27 2016
    
  • Maple
    A047507:=n->(8*n-3+I^(2*n)-(1+2*I)*I^(-n)-(1-2*I)*I^n)/4: seq(A047507(n), n=1..100); # Wesley Ivan Hurt, May 27 2016
  • Mathematica
    Table[(8n-3+I^(2n)-(1+2*I)*I^(-n)-(1-2*I)*I^n)/4, {n, 80}] (* Wesley Ivan Hurt, May 27 2016 *)
    a[ n_] := 2*n - Max[0, 2 - Mod[1-n, 4]]; (* Michael Somos, Dec 12 2023 *)
  • PARI
    {a(n) = 2*n - max(0, 2 - (1-n)%4)}; /* Michael Somos, Dec 12 2023 */

Formula

G.f.: x^2*(4+2*x+x^2+x^3) / ( (1+x)*(x^2+1)*(x-1)^2 ). - R. J. Mathar, Nov 06 2015
From Wesley Ivan Hurt, May 27 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(n) = (8*n-3+i^(2*n)-(1+2*i)*i^(-n)-(1-2*i)*i^n)/4 where i=sqrt(-1).
a(2k) = A047535(k), a(2k-1) = A047451(k). (End)
E.g.f.: (2 - 2*sin(x) - cos(x) + (4*x - 2)*sinh(x) + (4*x - 1)*cosh(x))/2. - Ilya Gutkovskiy, May 27 2016
Sum_{n>=2} (-1)^n/a(n) = (6-sqrt(2))*log(2)/16 + sqrt(2)*log(2+sqrt(2))/8 - sqrt(2)*Pi/16. - Amiram Eldar, Dec 23 2021
a(n) = -A003485(-n) = a(n+4) - 8 for all n in Z. - Michael Somos, Dec 12 2023

A047551 Numbers that are congruent to {0, 1, 6, 7} mod 8.

Original entry on oeis.org

0, 1, 6, 7, 8, 9, 14, 15, 16, 17, 22, 23, 24, 25, 30, 31, 32, 33, 38, 39, 40, 41, 46, 47, 48, 49, 54, 55, 56, 57, 62, 63, 64, 65, 70, 71, 72, 73, 78, 79, 80, 81, 86, 87, 88, 89, 94, 95, 96, 97, 102, 103, 104, 105, 110, 111, 112, 113, 118, 119, 120, 121, 126
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

Formula

a(n+1) = Sum_{k>=0} A030308(n,k)*b(k) with b(0)=1, b(1)=6 and b(k)=2^(k+1) for k>1. - Philippe Deléham, Oct 19 2011
a(n) = 2n - A010873(n+1). - Wesley Ivan Hurt, Jul 07 2013
G.f.: x^2*(1+5*x+x^2+x^3) / ( (1+x)*(1+x^2)*(x-1)^2 ). - R. J. Mathar, Jul 14 2013
From Wesley Ivan Hurt, May 29 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(n) = (4*n-3-i^(2*n)+(1-i)*i^(-n)+(1+i)*i^n)/2 where i=sqrt(-1).
a(2k) = A047522(k), a(2k-1) = A047451(k). (End)
E.g.f.: 1 - sin(x) + cos(x) + (2*x - 1)*sinh(x) + 2*(x - 1)*cosh(x). - Ilya Gutkovskiy, May 29 2016
Sum_{n>=2} (-1)^n/a(n) = Pi/16 + (5-sqrt(2))*log(2)/8 + sqrt(2)*log(2+sqrt(2))/4. - Amiram Eldar, Dec 20 2021

A047553 Numbers that are congruent to {0, 2, 6, 7} mod 8.

Original entry on oeis.org

0, 2, 6, 7, 8, 10, 14, 15, 16, 18, 22, 23, 24, 26, 30, 31, 32, 34, 38, 39, 40, 42, 46, 47, 48, 50, 54, 55, 56, 58, 62, 63, 64, 66, 70, 71, 72, 74, 78, 79, 80, 82, 86, 87, 88, 90, 94, 95, 96, 98, 102, 103, 104, 106, 110, 111, 112, 114, 118, 119, 120, 122, 126
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n : n in [0..150] | n mod 8 in [0, 2, 6, 7]]; // Wesley Ivan Hurt, May 29 2016
  • Maple
    A047553:=n->(8*n-5-I^(2*n)+(1-2*I)*I^(-n)+(1+2*I)*I^n)/4: seq(A047553(n), n=1..100); # Wesley Ivan Hurt, May 29 2016
  • Mathematica
    Select[Range[0,200], MemberQ[{0,2,6,7}, Mod[#,8]]&] (* Harvey P. Dale, Aug 09 2013 *)

Formula

From Wesley Ivan Hurt, May 29 2016: (Start)
G.f.: x^2*(2+4*x+x^2+x^3) / ((x-1)^2*(1+x+x^2+x^3)).
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(n) = (8*n-5-i^(2*n)+(1-2*i)*i^(-n)+(1+2*i)*i^n)/4 where i=sqrt(-1).
a(2k) = A047524(k), a(2k-1) = A047451(k). (End)
E.g.f.: (2 - 2*sin(x) + cos(x) + (4*x - 2)*sinh(x) + (4*x - 3)*cosh(x))/2. - Ilya Gutkovskiy, May 29 2016
Sum_{n>=2} (-1)^n/a(n) = (8-sqrt(2))*log(2)/16 + sqrt(2)*log(2+sqrt(2))/8 - (sqrt(2)-1)*Pi/16. - Amiram Eldar, Dec 21 2021

A047575 Numbers that are congruent to {0, 5, 6, 7} mod 8.

Original entry on oeis.org

0, 5, 6, 7, 8, 13, 14, 15, 16, 21, 22, 23, 24, 29, 30, 31, 32, 37, 38, 39, 40, 45, 46, 47, 48, 53, 54, 55, 56, 61, 62, 63, 64, 69, 70, 71, 72, 77, 78, 79, 80, 85, 86, 87, 88, 93, 94, 95, 96, 101, 102, 103, 104, 109, 110, 111, 112, 117, 118, 119, 120, 125
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n : n in [0..150] | n mod 8 in [0, 5, 6, 7]]; // Wesley Ivan Hurt, May 29 2016
  • Maple
    A047575:=n->(4*n-1+I^(2*n)-(1+I)*I^(-n)-(1-I)*I^n)/2: seq(A047575(n), n=1..100); # Wesley Ivan Hurt, May 29 2016
  • Mathematica
    Select[Range[0,120], MemberQ[{0,5,6,7}, Mod[#,8]]&] (* Harvey P. Dale, Jun 30 2011 *)

Formula

From Wesley Ivan Hurt, May 29 2016: (Start)
G.f.: x^2*(5+x+x^2+x^3) / ((x-1)^2*(1+x+x^2+x^3)).
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(n) = (4*n-1+i^(2*n)-(1+i)*i^(-n)-(1-i)*i^n)/2 where i=sqrt(-1).
a(2k) = A047550(k), a(2k-1) = A047451(k). (End)
E.g.f.: 1 - sin(x) - cos(x) - sinh(x) + 2*x*exp(x). - Ilya Gutkovskiy, May 30 2016
Sum_{n>=2} (-1)^n/a(n) = 5*log(2)/8 - (2*sqrt(2)-1)*Pi/16. - Amiram Eldar, Dec 23 2021

A047589 Numbers that are congruent to {6, 7} mod 8.

Original entry on oeis.org

6, 7, 14, 15, 22, 23, 30, 31, 38, 39, 46, 47, 54, 55, 62, 63, 70, 71, 78, 79, 86, 87, 94, 95, 102, 103, 110, 111, 118, 119, 126, 127, 134, 135, 142, 143, 150, 151, 158, 159, 166, 167, 174, 175, 182, 183, 190, 191, 198, 199, 206, 207, 214, 215, 222, 223, 230, 231
Offset: 1

Views

Author

Keywords

Comments

These are the values of n for which binomial(n,6) is odd. See Maple code. - Gary Detlefs, Nov 29 2011

Crossrefs

Union of A017137 and A004771.

Programs

  • Maple
    for i from 1 to 240 do if(floor((i mod 8)/6) <>0) then print(i) fi od; # Gary Detlefs, Nov 30 2011
  • Mathematica
    LinearRecurrence[{1,1,-1},{6,7,14},60] (* Harvey P. Dale, Sep 11 2017 *)

Formula

a(n) = 8*n-a(n-1)-3 with n>1, a(1)=6. - Vincenzo Librandi, Aug 06 2010
a(n) = 6*floor((n-1)/2) + n + 5. - Gary Detlefs, Nov 29 2011
a(n) = a(n-1)+a(n-2)-a(n-3). G.f.: x*(6+x+x^2)/((1-x)^2*(1+x)). - Colin Barker, Mar 18 2012
a(n) = (1-3*(-1)^n+8*n)/2. - Colin Barker, May 14 2012
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(2)*Pi/16 - log(2)/8 - sqrt(2)*log(sqrt(2)+1)/8. - Amiram Eldar, Dec 18 2021

A255846 a(n) = 2*n^2 + 14.

Original entry on oeis.org

14, 16, 22, 32, 46, 64, 86, 112, 142, 176, 214, 256, 302, 352, 406, 464, 526, 592, 662, 736, 814, 896, 982, 1072, 1166, 1264, 1366, 1472, 1582, 1696, 1814, 1936, 2062, 2192, 2326, 2464, 2606, 2752, 2902, 3056, 3214, 3376, 3542, 3712, 3886, 4064, 4246, 4432
Offset: 0

Views

Author

Avi Friedlich, Mar 08 2015

Keywords

Comments

This is the case k=7 of the form (n + sqrt(k))^2 + (n - sqrt(k))^2.
Equivalently, numbers m such that 2*m - 28 is a square.

Crossrefs

Cf. A117619.
Subsequence of A047235 and A047451.
Cf. similar sequences listed in A255843.

Programs

  • Magma
    [2*n^2+14: n in [0..50]];
  • Mathematica
    Table[2 n^2 + 14, {n, 0, 50}]
  • PARI
    vector(50, n, n--; 2*n^2+14)
    
  • Sage
    [2*n^2+14 for n in (0..50)]
    

Formula

G.f.: 2*(7 - 13*x + 8*x^2)/(1 - x)^3.
a(n) = a(-n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = 2*A117619(n).
From Amiram Eldar, Mar 28 2023: (Start)
Sum_{n>=0} 1/a(n) = (1 + sqrt(7)*Pi*coth(sqrt(7)*Pi))/28.
Sum_{n>=0} (-1)^n/a(n) = (1 + sqrt(7)*Pi*cosech(sqrt(7)*Pi))/28. (End)
E.g.f.: 2*exp(x)*(7 + x + x^2). - Elmo R. Oliveira, Jan 25 2025

Extensions

Edited by Bruno Berselli, Mar 13 2015
Showing 1-10 of 12 results. Next