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-9 of 9 results.

A084102 Inverse binomial transform of A084101.

Original entry on oeis.org

1, 2, -2, 0, 4, -8, 8, 0, -16, 32, -32, 0, 64, -128, 128, 0, -256, 512, -512, 0, 1024, -2048, 2048, 0, -4096, 8192, -8192, 0, 16384, -32768, 32768, 0, -65536, 131072, -131072, 0, 262144, -524288, 524288, 0, -1048576, 2097152, -2097152, 0, 4194304, -8388608, 8388608, 0, -16777216, 33554432
Offset: 0

Views

Author

Paul Barry, May 15 2003

Keywords

Comments

The sequence {2, -2, 0, 4, -8, 8, 0, -16, 32, -32, 0, 64, -128, 128, 0, ...} (without the leading 1) is the Lucas V(-2, 2) sequence. - R. J. Mathar, Jan 08 2013

Crossrefs

Yet another variation on A009545.

Programs

  • Magma
    [1] cat [n le 2 select 2*(-1)^(n-1) else -2*(Self(n-1) +Self(n-2)): n in [1..40]]; // G. C. Greubel, Oct 13 2022
    
  • Mathematica
    LinearRecurrence[{-2,-2},{1,2,-2},50] (* Harvey P. Dale, Aug 09 2017 *)
  • SageMath
    b=BinaryRecurrenceSequence(-2,-2,2,-2)
    def A084102(n): return 1 if (n==0) else b(n-1)
    [A084102(n) for n in range(41)] # G. C. Greubel, Oct 13 2022

Formula

G.f.: (1+2*x)^2/(1+2*x+2*x^2). - Paul D. Hanna, Nov 05 2009
From G. C. Greubel, Oct 13 2022: (Start)
a(n) = 2*A009116(n-1), n >= 1, with a(0) = 1.
a(n) = Real part of ( 2*(-1-i)^(n-1) + 2*[n=0] ).
a(n) = 2*(-1)^n*(2*(1+i)^(n-5) + i*(1-i)^(n-3)), n >= 1, with a(0) = 1.
E.g.f.: 2 - exp(-x)*(cos(x) - sin(x)). (End)

A266313 Period 8 zigzag sequence; repeat [0, 1, 2, 3, 4, 3, 2, 1].

Original entry on oeis.org

0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3
Offset: 0

Views

Author

Wesley Ivan Hurt, Dec 26 2015

Keywords

Comments

Decimal expansion of 1111/90009. - Elmo R. Oliveira, Mar 03 2024

Examples

			G.f. = x + 2*x^2 + 3*x^3 + 4*x^4 + 3*x^5 + 2*x^6 + x^7 + x^9 + ... - _Michael Somos_, Feb 27 2020
		

Crossrefs

Period k zigzag sequences: A000035 (k=2), A007877 (k=4), A260686 (k=6), this sequence (k=8), A271751 (k=10), A271832 (k=12), A279313 (k=14), A279319 (k=16), A158289 (k=18).
Cf. A084101.

Programs

  • Magma
    &cat[[0, 1, 2, 3, 4, 3, 2, 1]: n in [0..10]];
    
  • Maple
    A266313:=n->[0, 1, 2, 3, 4, 3, 2, 1][(n mod 8)+1]: seq(A266313(n), n=0..100);
  • Mathematica
    CoefficientList[Series[x*(1 + x + x^2 + x^3)/(1 - x + x^4 - x^5), {x, 0, 100}], x]
  • PARI
    x='x+O('x^100); concat(0, Vec(x*(1+x+x^2+x^3)/(1-x+x^4-x^5))) \\ Altug Alkan, Dec 29 2015
    
  • PARI
    {a(n) = abs((n+4)\8*8-n)}; /* Michael Somos, Feb 27 2020 */

Formula

G.f.: x*(1+x+x^2+x^3)/(1-x+x^4-x^5).
a(n) = a(n-1) - a(n-4) + a(n-5) for n > 4.
a(n) = Sum_{i = 1..n} (-1)^floor((i-1)/4).
a(2n) = 2*A007877(n); a(2n+1) = A084101(n).
a(n) = abs(n - 8*round(n/8)). - Jon E. Schoenfield, Jan 01 2016
Euler transform of length 8 sequence [2, 0, 0, -2, 0, 0, 0, 1]. - Michael Somos, Feb 27 2020
a(n) = a(n-8) for n >= 8. - Wesley Ivan Hurt, Sep 07 2022

A132429 Period 4: repeat [3, 1, -1, -3].

Original entry on oeis.org

3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1, -1, -3, 3, 1
Offset: 0

Views

Author

Paul Curtz, Nov 13 2007

Keywords

Comments

Nonsimple continued fraction expansion of (7 + 3*sqrt(5))/2 = 6.85410196624... = 1 + A090550. - R. J. Mathar, Mar 08 2012
Pisano period lengths: 1, 1, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ... . - R. J. Mathar, Aug 10 2012

Crossrefs

Cf. A084101 (1, 3, 3, 1), A090550.

Programs

Formula

G.f.: (3 + 4*x + 3*x^2)/((1+x)*(1+x^2)). - Jaume Oliver Lafont, Aug 30 2009
a(n) = (-1)^n + 2(-1)^((2n + (-1)^n - 1)/4). - Brad Clardy, Mar 10 2013
a(n) = 3 - 2*(n mod 4). - Joerg Arndt, Mar 10 2013
a(n) = (-1)^n + 2(-1)^floor(n/2). - Wesley Ivan Hurt, Apr 17 2014
From Wesley Ivan Hurt, Jul 10 2016: (Start)
a(n) + a(n-1) + a(n-2) + a(n-3) = 0 for n>2, a(n) = a(n-4) for n>3.
a(n) = 2*cos(n*Pi/2) + cos(n*Pi) + 2*sin(n*Pi/2). (End)

A322469 Irregular table: row i = 1, 2, 3, ... starts with 4*i - 1; then, as long as the number is divisible by 3, the next two terms are the result of dividing it by 3, then multiplying it by 2.

Original entry on oeis.org

3, 1, 2, 7, 11, 15, 5, 10, 19, 23, 27, 9, 18, 6, 12, 4, 8, 31, 35, 39, 13, 26, 43, 47, 51, 17, 34, 55, 59, 63, 21, 42, 14, 28, 67, 71, 75, 25, 50, 79, 83, 87, 29, 58, 91, 95, 99, 33, 66, 22, 44, 103, 107, 111, 37, 74
Offset: 1

Views

Author

Georg Fischer, Dec 09 2018

Keywords

Comments

The sequence is the flattened form of an irregular table T(i, j) (see the example below) which has rows i >= 1 consisting of subsequences of varying length as defined by the following algorithm:
j := 1; T(i, j) := 4 * i - 1;
while T(i, j) is divisible by 3 do
T(i, j + 1) := T(i, j) / 3;
T(i, j + 2) := T(i, j + 1) * 2;
j := j + 2;
end while
The algorithm always stops.
The first rows which are longer than any previous row are 1, 7, 61, 547, 4921 ... (A066443).
Property: The sequence is a permutation of the natural numbers > 0.
Proof: (Start)
The values in the columns j of T for row indexes i of the form i = e * k + f,
k >= 0, if such columns are present, have the following residues modulo some power of 2:
j | Op. | Form of i | T(i, j) | Residues | Residues not yet covered
--+------+ -------------+--------------+------------+-------------------------
1 | | 1 * k + 1 | 4 * k + 3 | 3 mod 4 | 0, 1, 2 mod 4
2 | / 3 | 3 * k + 1 | 4 * k + 1 | 1 mod 4 | 0, 2, 4, 6 mod 8
3 | * 2 | 3 * k + 1 | 8 * k + 2 | 2 mod 8 | 0, 4, 6 mod 8
4 | / 3 | 9 * k + 7 | 8 * k + 6 | 6 mod 8 | 0, 4, 8, 12 mod 16
5 | * 2 | 9 * k + 7 | 16 * k + 12 | 12 mod 16 | 0, 4, 8 mod 16
6 | / 3 | 27 * k + 7 | 16 * k + 4 | 4 mod 16 | 0, 8, 16, 24 mod 32
7 | * 2 | 27 * k + 7 | 32 * k + 8 | 8 mod 32 | 0, 16, 24 mod 32
8 | / 3 | 81 * k + 61 | 32 * k + 24 | 24 mod 32 | 0, 16, 32, 48 mod 64
9 | * 2 | 81 * k + 61 | 64 * k + 48 | 48 mod 64 | 0, 16, 32 mod 64
..| ... | e * k + f | g * k + m | m mod g | 0, ...
The variables in the last, general line can be computed from the operations in the algorithm. They are the following:
e = 3^floor(j / 2)
f = A066443(floor(j / 4)) with A066443(n) = (3^(2*n+1)+1)/4
g = 2^floor((j + 3) / 2)
m = 2^floor((j - 1) / 4) * A084101(j + 1 mod 4) with A084101(0..3) = (1, 3, 3, 1)
The residues m in each column and therefore the T(i, j) are all disjoint. For numbers which contain a sufficiently high power of 3, the length of the rows in T grows beyond any limit, and the numbers containing any power of 2 will finally be covered.
(End)
All numbers > 0 up to and including 2^(2*j + 1) appear in the rows in T up to and including A066443(j). For example, 4096 and 8192 are the trailing elements in row 398581 = A066443(6).
Length of row n = 1, 2, ... is 1+2*A007949(A004767(n-1)). - M. F. Hasler, Dec 10 2018
From Georg Fischer, Oct 16 2020: (Start)
Whenever a row of T is longer than any previous rows, it defines the start values of the arithmetic progressions in the additional columns. These start values form the sequence A308709.
There is a hierarchy of such permutations of the positive integers derived by selecting and mapping the terms of the form 6*k - 2 to k:
Level 0: A307407, nodes in the graph of the "3x+1" or Collatz problem
Level 1: A322469 (this sequence), inverse is A338208
Level 2: A307048, inverse is A338207
Level 3: A160016, inverse is A338206
Level >= 4: A000027, the positive integers
Conjectures (verified for k = 0..11):
a(A338186(k)) = 4^k.
If A338186(k) <= j < A338186(k+1) then a(A338186(k)) <= a(j).
(End)

Examples

			Table T(i, j) begins:
  i\j   1  2  3  4  5  6  7
  -------------------------
  1:    3  1  2
  2:    7
  3:   11
  4:   15  5 10
  5:   19
  6:   23
  7:   27  9 18  6 12  4  8
		

Crossrefs

Cf. A066443, A084101, A160016 (level 3), A307048 (level 2), A307407 (level 0), A308709, A338186, A338206, A338207, A338208.

Programs

  • Maple
    T:= proc(n) local m, l; m:= 4*n-1; l:= m;
          while irem(m, 3, 'm')=0 do
             l:= l, m; m:= m*2; l:=l, m;
          od; l
        end:
    seq(T(n), n=1..40);  # Alois P. Heinz, Dec 10 2018
  • Mathematica
    s={}; Do[a=4n-1; AppendTo[s,a]; While[Divisible[a, 3], a/=3; AppendTo[s, a]; a*=2; AppendTo[s, a]], {n, 1, 30}]; s (* Amiram Eldar, Dec 10 2018 *)
  • PARI
    apply( A322469_row(n,L=[n=4*n+3])={while(n%3==0,L=concat(L,[n\=3, n*=2]));L}, [0..99]) \\ Use concat(%) to flatten the table if desired. - M. F. Hasler, Dec 10 2018
    
  • Perl
    use integer; my $n = 1; my $i = 1;
      while ($i <= 1000) { # next row
        my $an = 4 * $i - 1; print "$n $an\n"; $n ++;
        while ($an % 3 == 0) {
          $an /= 3; print "$n $an\n"; $n ++;
          $an *= 2; print "$n $an\n"; $n ++;
        } # while divisible by 3
        $i ++;
    } # while next row - Georg Fischer, Dec 12 2018
    
  • Sage
    def A322469_list(len):
        L = []
        for n in (1..len):
            a = 4*n - 1
            L.append(a)
            while 3.divides(a):
                a //= 3
                L.append(a)
                a <<= 1
                L.append(a)
        return L
    A322469_list(28) # Peter Luschny, Dec 10 2018

A084104 A period 6 sequence.

Original entry on oeis.org

1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7, 7, 4, 1, 1, 4, 7
Offset: 0

Views

Author

Paul Barry, May 15 2003

Keywords

Comments

Partial sums of A084103.

Crossrefs

Programs

  • PARI
    {a(n)=[1, 4, 7, 7, 4, 1][n%6+1]}
    
  • PARI
    a(n)=2*sqrt(3)*sin((n+5)*Pi/3)+4 \\ Jaume Oliver Lafont, Aug 27 2009

Formula

Euler transform of length 6 sequence [ 4, -3, -1, 0, 0, 1]. - Michael Somos, Nov 07 2006
G.f.: (1+x)^3/((1-x)(1+x^3)).
G.f.:(1+x)^2/((1-x)*(1-x+x^2)). - Jaume Oliver Lafont, Aug 27 2009

A178593 Decimal expansion of (7 + 5*sqrt(29))/26.

Original entry on oeis.org

1, 3, 0, 4, 8, 3, 9, 3, 8, 5, 9, 8, 7, 4, 0, 4, 6, 2, 1, 3, 9, 4, 3, 6, 7, 4, 0, 2, 2, 1, 9, 2, 9, 4, 1, 4, 5, 4, 4, 1, 3, 6, 9, 2, 6, 1, 8, 5, 4, 7, 6, 7, 0, 8, 4, 1, 6, 9, 3, 0, 5, 5, 1, 3, 4, 6, 4, 7, 3, 9, 6, 0, 8, 2, 3, 6, 0, 8, 8, 2, 1, 0, 1, 6, 8, 5, 8, 3, 4, 1, 9, 5, 5, 3, 8, 1, 4, 5, 1, 6, 2, 3, 4, 3, 6
Offset: 1

Views

Author

Klaus Brockhaus, May 31 2010

Keywords

Comments

Continued fraction expansion of (7+5*sqrt(29))/26 is A084101.

Examples

			(7+5*sqrt(29))/26 = 1.30483938598740462139...
		

Crossrefs

Cf. A010484 (decimal expansion of sqrt(29)), A084101 (repeat 1, 3, 3, 1).

Programs

  • Magma
    SetDefaultRealField(RealField(100)); (7+5*Sqrt(29))/26; // G. C. Greubel, Jan 29 2019
    
  • Mathematica
    RealDigits[(7+5*Sqrt[29])/26,10,120][[1]] (* Harvey P. Dale, Apr 09 2015 *)
  • PARI
    default(realprecision, 100); (7+5*sqrt(29))/26 \\ G. C. Greubel, Jan 29 2019
    
  • Sage
    numerical_approx((7+5*sqrt(29))/26, digits=100) # G. C. Greubel, Jan 29 2019

A206543 Period 10: repeat 1, 3, 5, 7, 9, 9, 7, 5, 3, 1.

Original entry on oeis.org

1, 3, 5, 7, 9, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 9, 7, 5, 3, 1, 1
Offset: 1

Views

Author

Wolfdieter Lang, Feb 09 2012

Keywords

Comments

For general Modd n (not to be confused with mod n) see a comment on A203571. The present sequence gives the residues Modd 11 for the positive odd numbers not divisible by 11, which are given in A204454.
The underlying period length 22 sequence with offset 0 is P_11, also called Modd11, periodic([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]).

Examples

			Residue Modd 11 of the positive odd numbers not divisible by 11:
A204454: 1, 3, 5, 7, 9, 13, 15, 17, 19, 21, 23, 25, 27, ...
Modd 11: 1, 3, 5, 7, 9,  9,  7,  5,  3,  1,  1,  3,  5, ...
		

Crossrefs

Cf. A000012 (Modd 3), A084101 (Modd 5), A110551 (Modd 7).

Programs

  • Mathematica
    PadRight[{},120,{1,3,5,7,9,9,7,5,3,1}] (* or *) LinearRecurrence[{2,-2,2,-2,1},{1,3,5,7,9},120] (* Harvey P. Dale, Oct 15 2017 *)
  • PARI
    a(n)=[1, 3, 5, 7, 9, 9, 7, 5, 3, 1][n%10+1] \\ Charles R Greathouse IV, Jul 17 2016

Formula

a(n) = A204454(n) (Modd 11) := Modd11(A204454(n)), with the periodic sequence Modd11 with period length 22 given in the comment section.
O.g.f.: x*(1+x^9+3*x*(1+x^7)+5*x^2*(1+x^5)+7*x^3*(1+x^3)+9*x^4*(1+x))/(1-x^10) = x*(1+x)*(1-x^5)/((1+x^5)*(1-x)^2).

A206544 Period 12: repeat 1, 3, 5, 7, 9, 11, 11, 9, 7, 5, 3, 1.

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 11, 9, 7, 5, 3, 1
Offset: 1

Views

Author

Wolfdieter Lang, Feb 09 2012

Keywords

Comments

For general Modd n (not to be confused with mod n) see a comment on A203571. The present sequence gives the residues Modd 13 of the positive odd numbers not divisible by 13, which are given in A204457.
The underlying periodic sequence with period length 26 is periodic([0,1,2,3,4,5,6,7,8,9,10,11,12,0,12,11,10,9,8,7,6,5,4,3,2,1]), called, with offset 0, P_13 or Modd13.

Examples

			Residue Modd 13 of the positive odd numbers not divisible by 13:
A204457: 1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, ...
Modd 13: 1, 3, 5, 7, 9, 11, 11,  9,  7,  5,  3,  1,  1,  3,  5,  7, ...
		

Crossrefs

Cf. A000012 (Modd 3), A084101 (Modd 5), A110551 (Modd 7), A206543 (Modd 11).

Programs

  • Mathematica
    LinearRecurrence[{1, 0, 0, 0, 0, -1, 1},{1, 3, 5, 7, 9, 11, 11},72] (* Ray Chandler, Aug 08 2015 *)
  • PARI
    a(n)=[1, 1, 3, 5, 7, 9, 11, 11, 9, 7, 5, 3][n%12+1] \\ Charles R Greathouse IV, Jul 17 2016

Formula

a(n) = A204457(n) (Modd 13) := Modd13(A204457(n)), n>=1, with the period length 26 periodic sequence Modd13 given in the comment section.
O.g.f.: x*(1+x^11+3*x*(1+x^9)+5*x^2*(1+x^7)+7*x^3*(1+x^5)+9*x^4*(1+x^3)+11*x^5*(1+x))/(1-x^12) = x*(1-x^6)*(1+x)/((1+x^6)*(1-x)^2).

A206545 Period length 16: repeat 1, 3, 5, 7, 9, 11, 13, 15, 15, 13, 11, 9, 7, 5, 3, 1.

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 15, 15, 13, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 13, 15, 15, 13, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 13, 15, 15, 13, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 13, 15, 15, 13, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, 9, 11, 13, 15, 15, 13, 11, 9, 7, 5, 3, 1
Offset: 1

Views

Author

Wolfdieter Lang, Feb 09 2012

Keywords

Comments

For general Modd n see a comment on A203571. This sequence gives the Modd 17 residues of the odd numbers not divisible by 17, which are given in A204458.
The underlying periodic sequence with period length 34 is periodic (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 4, 3, 2, 1). This sequence with offset 0 is called P_17 or Modd17.

Examples

			Residue Modd 17 of the positive odd numbers not divisible by 17:
A204458: 1, 3, 5, 7, 9, 11, 13, 15, 19, 21, 23, 25, 27, 29,...
Modd 17: 1, 3, 5, 7, 9, 11, 13, 15, 15, 13, 11,  9,  7,  5,...
		

Crossrefs

Cf. A000012 (Modd 3), A084101 (Modd 5), A110551 (Modd 7), A206543 (Modd 11), A206544 (Modd 13).

Programs

  • Mathematica
    PadRight[{},120,Join[Range[1,15,2],Range[15,1,-2]]] (* Harvey P. Dale, Sep 21 2018 *)

Formula

a(n) = A204458(n) (Modd 17) := Modd17(A204458(n)), n>=1, with the periodic sequence Modd17, with period length 34, defined in the comment section.
O.g.f.: x*(1+x^15+3*x*(1+x^13)+5*x^2*(1+x^11)+7*x^3*(1+x^9)+9*x^4*(1+x^7)+11*x^5*(1+x^5)+ 13*x^6*(1+x^3)+15*x^7*(1+x))/(1-x^16) = x*(1+x)^2*(1+x^2)*(1+x^4)/((1+x^8)*(1-x)).
Showing 1-9 of 9 results.